Skip to content

Add a visible pencil/rename icon to sidebar agent rows (rename is currently double-click-only) #865

Description

@adamshawvipps

Summary

Agent sessions in the "WITH AGENTS" sidebar list (e.g. rows like ok — "ok · Codex", or fix-issue-context-capture — "Stjørdal · Claude") can already be renamed, but the only way to do it is to double-click the name. There is no visible affordance, so the feature is undiscoverable — users don't know renaming is possible. Add a visible pencil (edit) icon to each agent row that triggers the existing rename flow.

Issue Type

Enhancement / UX (discoverability)

Priority

P2 — the capability exists and works; this is a discoverability/usability improvement, not a broken feature.

Area

area:renderer — Repositories sidebar agent list.

Current Behavior

  • Renaming works: double-clicking the bold name turns it into an inline <input>; Enter saves, Escape cancels, blur saves. It persists as session.displayName all the way through agent:renamesessionManager.renameSession.manifold.json.
    • Inline edit + double-click handler: src/renderer/components/sidebar/AgentItem.tsx:87 (startEditing), :99 (commitRename), :176 (onDoubleClick).
    • The only hint is a hover tooltip "Double-click to rename" (AgentItem.tsx:177) — invisible until you happen to hover the name.
  • No rename affordance exists anywhere else (no pencil icon, no context menu, no rename on the dock tab).

Expected Behavior

Each agent row shows a visible pencil/edit icon (alongside the existing lock and delete × controls) that, when clicked, enters the same inline-rename edit mode. Ideally it appears on row hover/focus like the other row actions, and is keyboard-accessible.

Suggested Implementation

The row already renders an action cluster that's the natural home for a pencil button:

  • src/renderer/components/sidebar/AgentItem.tsx:203-217 — the <div className="sidebar-item-actions"> currently holds LockToggleButton and the delete × button (both styled sidebar-icon-button).
  • Add a rename button in that cluster that calls the existing startEditing callback (AgentItem.tsx:87). No new IPC/persistence needed — the whole rename path already exists and is wired via onRename from ProjectList.tsx:155 (onRenameAgent).

Details to decide during implementation:

  • Icon: a standard pencil glyph consistent with the app's icon set / design system.
  • Visibility: match the existing hover-reveal behavior of the row actions; keep an aria-label like Rename ${name} and a title "Rename".
  • Keep double-click-to-rename working as-is (additive change).
  • Consider whether a locked session (session.locked) should disable rename, mirroring how delete is disabled when locked (AgentItem.tsx:209).

Evidence

Screenshot of the sidebar rows was provided in chat (not uploaded): repository MANIFOLD with two agent rows, "ok" (ok · Codex) and "fix-issue-context-capture" (Stjørdal · Claude), neither showing any rename affordance.

Validation After Fix

  1. Hover an agent row → a pencil icon is visible next to the lock/delete controls.
  2. Click the pencil → the name becomes an editable input; typing + Enter renames it; Escape cancels.
  3. The new name persists across a repo switch / app restart (written to the worktree's .manifold.json).
  4. Double-clicking the name still enters rename mode (unchanged).
  5. Icon has an accessible label and is reachable/operable by keyboard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions