Skip to content

fix(terminal): wire Edit menu to active terminal#57

Open
htazq wants to merge 1 commit into
GOODBOY008:mainfrom
htazq:fix/issue-56-edit-menu
Open

fix(terminal): wire Edit menu to active terminal#57
htazq wants to merge 1 commit into
GOODBOY008:mainfrom
htazq:fix/issue-56-edit-menu

Conversation

@htazq

@htazq htazq commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Root cause

The web MenuBar exposed optional Edit callbacks, but App.tsx never supplied them. The terminal implementations therefore existed only inside each PtyTerminal, so menu clicks closed the menu without reaching the active split/tab. Find Next/Previous also discarded the search bar's current query.

Fix

  • Route Edit commands through a tab-id-scoped terminal event so only the active terminal responds.
  • Wire Copy, Paste, Select All, Find, Find Next, Find Previous, and Clear Screen.
  • Keep unsupported Cut disabled; disable terminal actions for non-terminal tabs and Paste while disconnected.
  • Reuse the search bar's actual query/options for Find Next/Previous.
  • Cover disabled states, every menu callback, split-view targeting, Find focus/display, and current-query navigation.

Duplicate check

No duplicate issue or PR was found.

Related but distinct:

Verification

  • pnpm test — 36 files, 498 tests passed.
  • pnpm build — passed.
  • pnpm exec tsc --noEmit — passed.
  • pnpm i18n:check — passed, 945 keys in both locales.
  • Changed source files: eslint --quiet — passed.
  • Full pnpm lint remains blocked by the existing unrelated src/components/settings-modal.tsx:308 unnecessary assertion error.

Closes #56

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.

[Bug] Edit menu commands do nothing in active terminal

1 participant