Skip to content

chat, session: rename a conversation from its tab (double-click, /rename), and an opt-in hue for the live tab signal #1087

Description

@santoshkumarradha

Problem

Two gaps in the one row a person looks at all day (internal/tui3/chattabs.go).

  • A name nobody can change. A conversation names itself once, from its first exchange (internal/session/title.go's setTitleIfUnnamed, eight words), and there is no user-facing rename anywhere in the tree. A wrong name is a wrong tab with no way to fix it.
  • A signal nobody can make their own. The tab's one status cell is drawn in two fixed hues (tabsignal.go's tabSignalInk: #9DC3E6 accent for working, amber for needs-you), and the selected tab's fill is a fixed blue (chattabs.go's tabActivePaint). A person who wants the strip's live signal in their own color cannot have it.

They are one issue because they are one row and one repaint: both edits land in tabsRow, and both must invalidate the strip's memo (tabBar.same).

Ask

  1. A conversation has ONE person-facing name, and /rename sets it. Rename overwrites the session's name and the whole surface follows in one write. The engine may still keep a full and a short title, but the person owns one: the tab draws it cut and nothing else is a second name to keep in step. This follows the surface's own row law, stated in taskident.go: the identity comes to the row whole, and the ROW decides what it can afford.

  2. /rename <name> is the command. It sets the name of the conversation in front, joins the one command table (internal/tui3/commands.go) and its dispatch switch, and is discoverable in / completion and /help. /rename with no argument opens the same inline editor (item 3) on the front conversation rather than refusing.

  3. Double-click a tab's label to rename it in place. The first press of the pair still switches to the tab, so single-click behaviour is unchanged; the second, inside the existing navDoubleTap window (room.go, 600 ms) on the same tab, opens the label for editing. Enter writes, Esc cancels and changes nothing. While the editor is open the strip's memo is bypassed and the row draws the caret.

  4. The write is an engine path, not a surface patch. setTitleIfUnnamed is gated on the name being empty and is the wrong door: a rename must overwrite. It writes Agent.title/Agent.shortTitle, appends the title to the session file (file.appendTitle), re-stamps the folder row (stampTitle), and publishes EventTitleChanged, so the tab, the breadcrumb (roomcrumbs.go), the switcher row (hop.go) and the terminal title (title.go's terminalTitle) all move on one write. It survives /resume.

  5. An opt-in hue for the live signal. One setting chooses the hue that means "this tab is live", and it paints BOTH the working status mark and the selected tab's inner accent, so the chosen color is in both places. Needs-you stays amber: that meaning is shared with home, the switcher and the terminal title (titleWhere) and is not the person's to re-mean. Off by default; at the default the frame is unchanged.

    • The hue is chosen from the existing contrast-gated palette steps, never free hex. internal/tui2/tokens/palette.go values are literals fenced by contrast_test.go and parity_test.go, and styles.go's "one lit element per screen" budget governs the selected tab's ground.
    • The setting is one registry row in internal/config/settings.go (display.*), whose off value keeps today's #9DC3E6.
    • A change invalidates tabBar, the same as a rename.

Related

Acceptance

  • e2e: /rename Ship the parser sets the name; the strip, the breadcrumb, the switcher row and the terminal title all show it, and it survives codeaf resume.
  • e2e: a rename applies to an already-named session, proving the setTitleIfUnnamed gate is bypassed.
  • e2e: double-click a tab opens the inline editor; Enter writes, the tab shows the cut name and hover reveals it whole (tabTitlePreview); Esc cancels and changes nothing.
  • e2e: turn the hue on; the working mark and the selected tab's accent both take it, needs-you stays amber; at the default value the frame is byte-identical to today.
  • Unit: a rename overwrites rather than no-ops; tabBar invalidates on a rename and on the settings write; the mark and the accent read the same chosen hue.
  • The manual page that covers the tab strip quotes the new /rename line, and the change entry's invalidates names what people believed before.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:chatThe v3 surface a person sits in front of (internal/tui3)area:sessionThe engine — turns, tasks, the toolbelt, checkpointsfeatureWork that adds a capability; developers break it into tasks

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions