Skip to content

fix(app): save session titles on blur and add tab context menu - #46113

Open
opencode-agent[bot] wants to merge 2 commits into
v2from
session-rename-tabs
Open

fix(app): save session titles on blur and add tab context menu#46113
opencode-agent[bot] wants to merge 2 commits into
v2from
session-rename-tabs

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • Save an edited session heading when focus leaves the field, rather than silently discarding it. Enter still saves; Escape cancels. Failed saves retain the draft, and empty titles leave the existing title unchanged.
  • Add a session-tab context menu with Rename and Close tab, reusing the existing actions. Keep the hover preview hidden while the menu is open and hand focus to the inline title editor after selecting Rename.
  • Keep right-click renaming on an inactive tab from switching the active session.

Report: https://x.com/yeargun24/status/2093599753497874795

Validation

  • Reproduced the heading-blur failure and missing tab menu before the fix; Enter already worked.
  • 8 new Playwright regression tests pass, covering Enter, Tab, clicking outside, Escape, empty titles, failed saves, keyboard menu activation, persistence after reload, inactive-tab rename, and closing without deleting the session.
  • 8 adjacent browser tests pass: home session actions, cross-server tab close, tab mousedown/keyboard navigation, cramped tabs, vertical tabs, and mobile fallback.
  • 15 titlebar unit tests pass.
  • bun run typecheck passes for packages/app.
  • Scoped E2E typecheck for the new spec passes. The full E2E typecheck has a pre-existing error in new-session-workspace-pending.spec.ts:38 (dir on HTMLElement | SVGElement), also observed before production-code edits.
  • Prettier and git diff --check pass.
  • Production build: 8/8 new browser tests and 6/6 tab-switch benchmark cases pass. Three samples per scenario show stable-paint median/p95 of 110.90/111.10 → 110.20/110.90 ms cold and 63.30/78.70 → 63.40/77.40 ms warm. All measured switches had zero blank/wrong-destination samples and zero message requests. This is a small-sample check, not a statistical performance claim. Baseline review-open scenarios had existing setup timeouts; comparison is limited to the complete review-closed scenarios.

Browser coverage uses the real app with fixture-backed API responses in Chromium; native macOS desktop behavior was not exercised.

Requested by: @Brendonovich (Brendan via Slack)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant