Skip to content

fix: pane title respects session rename#75

Merged
InbarR merged 3 commits into
mainfrom
omersegal/new-branch
Apr 28, 2026
Merged

fix: pane title respects session rename#75
InbarR merged 3 commits into
mainfrom
omersegal/new-branch

Conversation

@omer91se
Copy link
Copy Markdown
Collaborator

@omer91se omer91se commented Apr 26, 2026

Summary

Single fix on top of fresh main: the pane title now stays in sync when an AI session is renamed.

Changes

Pane title respects session renames (src/renderer/state/terminal-store.ts)

updateTerminalTitleFromSession now reads sessionNameOverrides[session.id] first and falls back to session.summary only if no override exists. This matches the behavior of the CopilotPanel session list, so renaming an AI session keeps the new name in the pane title instead of reverting to the auto-generated summary.

Dependency

Installed missing @xterm/addon-serialize (was listed in package.json but absent from node_modules); only package-lock.json changed.

Reverted in this PR

A scroll-lock-during-output change was applied earlier (commit 354d100) but reverted in 432012f because the per-flush term.scrollLines() callback froze selection and wheel scrolling in 3 of 4 panes. A less invasive approach (e.g. wheel/scroll listener that only intervenes when the buffer just trimmed) will be designed in a follow-up.

Testing

  • Renamed an AI session → pane title updates correctly.
  • All 4 panes scrollable / selectable / copyable again after revert.

… title

- Scroll lock: in TerminalPanel flushPendingData, snapshot linesFromBottom
  before each term.write and restore via term.scrollLines() if the buffer
  trim shrank the distance. Keeps viewport pinned when user is scrolled up.
- Pane title: updateTerminalTitleFromSession now reads sessionNameOverrides
  before falling back to session.summary, so renamed AI sessions keep their
  name in the pane title (matching CopilotPanel session list behavior).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@omer91se omer91se force-pushed the omersegal/new-branch branch from 23318d9 to 354d100 Compare April 27, 2026 07:46
@omer91se omer91se changed the title Stability, performance & bug fixes (from PR #66) fix: scroll lock during output + pane title respects session rename Apr 27, 2026
The flushPendingData scroll-lock callback caused selection and wheel
scrolling to freeze in 3 of 4 panes. Reverting to plain term.write while
a less invasive approach is designed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@omer91se omer91se changed the title fix: scroll lock during output + pane title respects session rename fix: pane title respects session rename Apr 27, 2026
@InbarR InbarR merged commit e6641db into main Apr 28, 2026
8 of 13 checks passed
yoziv added a commit to yoziv/tmax that referenced this pull request Apr 29, 2026
Pure-function tests (run without Electron packaging):
- PR InbarR#53/InbarR#56: extractLinkFromHtml + unwrapSafelinks (16 tests)
  Extracted to src/renderer/utils/link-extract.ts, shared by
  TerminalPanel.tsx and DetachedApp.tsx (deduplication)
- PR InbarR#57: path traversal guard (10 tests)
  Extracted to src/main/utils/security-guards.ts
- PR InbarR#58: OPEN_PATH extension blocklist (28 tests)
- PR InbarR#60: WSL distro name validation (9 tests)

E2E tests (require npm run package):
- PR InbarR#75: session rename propagates to pane title
- PR InbarR#13: minimum pane size enforcement
- PR InbarR#14: DEC focus sequence injection on pane switch
- PR InbarR#9: ShortcutsHelp escape in capture phase
- PR InbarR#10: pane title doesn't overlap terminal content
- PR InbarR#8: shifted key character in Ctrl+Shift+/ binding

Also extracts duplicated link-extract functions from
TerminalPanel.tsx and DetachedApp.tsx into a shared utility.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
InbarR pushed a commit that referenced this pull request May 2, 2026
Pure-function tests (run without Electron packaging):
- PR #53/#56: extractLinkFromHtml + unwrapSafelinks (16 tests)
  Extracted to src/renderer/utils/link-extract.ts, shared by
  TerminalPanel.tsx and DetachedApp.tsx (deduplication)
- PR #57: path traversal guard (10 tests)
  Extracted to src/main/utils/security-guards.ts
- PR #58: OPEN_PATH extension blocklist (28 tests)
- PR #60: WSL distro name validation (9 tests)

E2E tests (require npm run package):
- PR #75: session rename propagates to pane title
- PR #13: minimum pane size enforcement
- PR #14: DEC focus sequence injection on pane switch
- PR #9: ShortcutsHelp escape in capture phase
- PR #10: pane title doesn't overlap terminal content
- PR #8: shifted key character in Ctrl+Shift+/ binding

Also extracts duplicated link-extract functions from
TerminalPanel.tsx and DetachedApp.tsx into a shared utility.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants