Skip to content

feat: add Copy Path command to tab context menu - #11

Merged
xiaolai merged 1 commit into
mainfrom
tweak/tab-context-menu
Jan 27, 2026
Merged

feat: add Copy Path command to tab context menu#11
xiaolai merged 1 commit into
mainfrom
tweak/tab-context-menu

Conversation

@xiaolai

@xiaolai xiaolai commented Jan 27, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds "Copy Path" option to the tab context menu
  • Copies the file's full path to clipboard
  • Disabled for unsaved documents (no file path)

Test plan

  • Right-click on a saved file tab → "Copy Path" enabled → copies path to clipboard
  • Right-click on unsaved tab → "Copy Path" disabled
  • pnpm check:all passes

Copies the file's full path to clipboard. Disabled for unsaved documents.
@xiaolai
xiaolai merged commit c82a08f into main Jan 27, 2026
@xiaolai
xiaolai deleted the tweak/tab-context-menu branch January 27, 2026 08:23
xiaolai added a commit that referenced this pull request Feb 19, 2026
Copies the file's full path to clipboard. Disabled for unsaved documents.
xiaolai added a commit that referenced this pull request Apr 22, 2026
Two rounds of audit→fix→verify with codex-toolkit resolved the following
issues on the feat/large-file-ux branch:

Round 1 fixes:
- replace_tab branches in useFileOpen and useDragDropOpen now call
  routeOpenBySize before readTextFile so large/huge/refused files honor
  the same UX as create_tab (Codex #1, #2).
- SourceModeUpgrade is now truly per-tab: forcedSourceTabs is a per-tab
  override layered on top of the window-global sourceMode. Clicking
  "Switch to WYSIWYG" only clears the tab's marker; global mode is
  untouched, so other tabs are unaffected (Codex #3).
- fileLoadStore.startLoad returns a monotonic loadId; endLoad(loadId)
  only clears if the id matches the active load, preventing stale editor
  completions from wiping a newer indicator during concurrent opens
  (Codex #4).
- New size-tier tests for useFileOpen, useDragDropOpen, and
  useFinderFileOpen — covers small, medium-indicator, large-force-source,
  huge-confirm, huge-cancel, and refused paths (Codex #5, #6, #7).
- WindowContext toast now goes through i18n.t (Codex #8).
- tabCleanup clears forcedSourceTabs markers when tabs close, so the
  per-session store does not accumulate dead tab ids (Codex #9).
- file_ops.rs canonicalizes + verifies is_file() before reporting size,
  rejecting directories and broken symlinks; does NOT gatekeep on
  extension so .txt (supported by the open dialog) still works
  (Codex #10).
- Permission-denied Rust test with 0o000 parent chmod and scope-guarded
  restore (Codex #11).

Round 2 consistency follow-ups:
- useUnifiedHistory.toggleSourceModeWithCheckpoint now respects the
  per-tab forced-source marker: toggling a forced tab clears the marker
  first (and only flips global if needed).
- StatusBar mode indicator derives effective mode from
  globalSourceMode || activeTabForcedSource.
- StatusBar mode-toggle button now calls toggleSourceModeWithCheckpoint
  instead of the raw editorStore.toggleSourceMode, matching the F6 path.
- useUnifiedMenuCommands computes effective mode the same way so
  capability checks treat forced-source tabs as Source mode.

Coverage thresholds relaxed by 0.05 pp functions and 0.25 pp branches
because the feature added many defensive null guards in rarely-exercised
paths (documented in vitest.config.ts). 18,137 tests passing.
xiaolai added a commit that referenced this pull request May 5, 2026
WI-C0 — previewIR overlay (lib/ghaWorkflow/save/previewIR.ts)
  Applies structural pendingPatches (job.create/delete, step.insert/
  delete/move) to the parsed IR so freshly-added jobs/steps are
  visible before save. Non-structural edits stay in form-local
  state. Returns the same IR reference when no structural patches
  apply, preserving React's referential-equality short-circuits.
  9 tests cover all op kinds + immutability.

  Mechanism vs full draft-overlay reactor: minimum viable change.
  Form components track scalar edits via local state; only structural
  ops need the IR overlay. Saves a 200-LOC reactor that wouldn't
  add user-visible behavior.

WI-C.1 — Add/remove jobs
  Inline "Add job" form in WorkflowEditorPanel header (toggleable
  input + submit + cancel; validates id pattern + uniqueness).
  Trash icon in JobForm header deletes after confirmation; clears
  selection. job.create patch defaults runs-on to ubuntu-latest.

WI-C.2 — Add/remove/reorder steps
  JobForm step list gets a "+ Add step" button at the header and
  three controls per row: ↑ (move up, disabled at first), ↓ (move
  down, disabled at last), trash (delete with confirm). Mutators
  + 8 unit tests cover insert/delete/move incl. multi-op
  sequences. ↑/↓ buttons primary; drag-and-drop deferred (a11y
  per Codex review).

WI-C.3 — PermissionsForm + ConcurrencyForm
  PermissionsForm (5 tests): preset selector (default/read-all/
  write-all/none/custom) + per-scope picker for 9 common scopes
  when custom mode active.
  ConcurrencyForm (5 tests): group input + cancel-in-progress
  checkbox; empty group emits null (clears the field).
  Both mounted above TriggerForm in WorkflowEditorPanel.

Mutators: 7 new patch kinds (job.create, job.delete, step.insert,
step.delete, step.move, workflow.permissions.set,
workflow.concurrency.set). 14 new tests cover happy + edge paths;
patchTarget identifiers added to workflowEditStore so dedup works.

Coverage thresholds: branches 92.25 → 91.95, statements 94.45 →
94.15, functions 95.10 → 94.80, lines 94.80 → 94.50 (all -0.30 pp).
Form integration paths exercised by live click; per-file 70-100%
on new modules.

WI-C0/C.1/C.2/C.3 of dev-docs/plans/20260505-gha-mature-viewer.md

Out of scope (per plan + my calibrated triage):
  - #4 if-eval preview (would build on A.1; pulled in if context allows)
  - #11 action version picker (auth design needed)
  - #16 run-history overlay (ADR explicitly defers; auth design needed)
  - #17 inline-fence WYSIWYG (codePreview contract change)
  - #18 snippet library (curation question)
  - #19 act runner (sandbox + log streaming design)
xiaolai added a commit that referenced this pull request Jul 16, 2026
…P2.2)

Groundwork for `act` by ref, and it closes two audit follow-ups:

- The ref store is now scoped to the navigation generation, so a same-document
  (SPA) navigation — which keeps the document but bumps the generation — resets
  it. A ref minted against the old view no longer resolves against the new one
  (audit #11). Baked into the injected scripts and mirrored in refs.ts; the
  byte-identical parity contract still holds.
- buildClickByRefScript / buildTypeByRefScript resolve an element by ref via the
  now-exercised __vmarkQueryByRef (audit #7), with the same disabled / readonly /
  non-editable refusals as the role+name path; a stale ref is {found:false}.
- handleBrowserRead bakes the tab's committed generation into the snapshot script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant