Skip to content

Allow renaming session tabs (custom tab names) #53

Description

@computerbox124

Summary

Session tabs are always named after the host's label (or "Local"). When several tabs connect to the same host — or when the user wants a task-oriented name like "db-migration" — they are indistinguishable. Add the ability for the user to rename a tab, with the custom name persisted in saved workspaces.

Proposed behavior

  • Rename interaction: double-click the tab in the strip to edit inline, plus a "Rename" entry in the tab context menu. Enter commits, Escape cancels, empty/whitespace input falls back to the default name.
  • Custom name takes precedence over auto-derived titles and is shown everywhere the title is used: tab strip, tooltips, close aria-labels, "Move to …" menu entries, drag chips.
  • Cap name length; duplicate names are allowed.

Implementation notes

  • Tab.title already exists in desktop/src/stores/tabs.ts and is rendered in TerminalArea.vue.
  • Add a customTitle/lockedTitle flag on Tab so syncTabTitle (which re-derives the title whenever panes are closed, moved, or swapped) does not clobber a user-set name. Decide whether the name survives splits/merges or resets.
  • Persistence: TabLayout.title is already saved/restored by saveCurrentLayout/restoreWorkspace in WorkspaceView.vue, so custom tab names survive workspace save/restore — but the customTitle flag must be persisted in TabLayout too, otherwise a restored tab loses its name on the first structural change.
  • Precedence: user-given name > setPaneTitle-derived/auto-derived title.
  • Optional follow-up (out of scope): per-pane rename. Note that pane titles are currently not persisted — paneTreeToLayout/layoutToPaneTree recompute them from host.label — so this would need a title field on PaneLayout.

Acceptance criteria

  • User can rename a tab via double-click and context menu
  • Custom name survives pane close/move/split within the tab
  • Custom name (and its stickiness) persists through workspace save/restore
  • Empty rename input reverts to the auto-derived name

Activity

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

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions