Skip to content

feat(agent-rows): label sidebar and dashboard rows with conversation names - #9989

Merged
brennanb2025 merged 8 commits into
mainfrom
brennanb2025/agent-row-conversation-name
Jul 24, 2026
Merged

brennanb2025 merged 8 commits into
mainfrom
brennanb2025/agent-row-conversation-name

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

Sidebar worktree-card and dashboard agent rows label with the last message sent to the agent, so rows relabel every turn and short replies such as "continue" become the row name. Tabs already carry stable conversation names through manual renames, quick commands, semantic session titles, generated titles, and agent-set live titles.

What

Both row surfaces now prefer the conversation name and fall back to the last message when no usable name exists. There is no additional preference: row identity consistently follows tab identity.

Resolution (src/shared/agent-row-conversation-name.ts) mirrors tab-title precedence:

  1. Manual tab rename (customTitle)
  2. Quick-command label
  3. OpenCode semantic session title (OC | …)
  4. Generated title, only when the existing auto-generate-titles setting is on
  5. Agent-set live title, accepted only when it carries a real name

Leading status decoration is stripped. Pure status titles, provider identity echoes, generic Terminal N placeholders, default titles, and POSIX/Windows/UNC path-like titles are rejected. Subagent child rows keep their own descriptions because the parent tab name would mislabel them.

Performance

Mounted rows use a WeakMap-backed per-tab-array index. One immutable worktree tab array is indexed once and shared across rows, replacing repeated linear scans on store writes while allowing old arrays to be collected.

Testing

  • Resolver coverage for precedence, fallback, provider/status filtering, Windows/UNC paths, and default terminal placeholders
  • Hook coverage for always-on behavior, stale row snapshots, subagent exclusion, generated-title gating, and one index build per immutable tab array
  • Dashboard, sidebar, title, settings, localization, typecheck, lint/react rules, and max-lines suites pass locally (25 files / 227 tests)
  • Full PR workflow runs lint, reliability gates, typecheck, Git compatibility, repository tests, unpacked build, and packaged CLI smoke

Notes

  • The generated-title source remains controlled by the existing auto-generate-title setting.
  • Persisted values from the earlier opt-in iteration are ignored; no migration is required.
  • The earlier manual-QA comment validated both behaviors while the toggle existed. Its conversation-name screenshots represent the final row behavior; the toggle itself has now been removed by product decision.

Sidebar worktree-card and dashboard agent rows always show the last
message sent to the agent, so rows relabel on every turn and a 'continue'
prompt becomes the row's name. Add an opt-in Agents setting that labels
rows with the conversation name instead, resolved with the tab bar's
precedence: manual rename, quick-command label, OpenCode session title,
generated title (behind its existing setting), then the agent-set live
title. Live titles count only when they carry a real name - status
decoration is stripped, and pure status, identity-echo, spinner+cwd, and
placeholder titles fall back to the last-message label. Subagent child
rows keep their own descriptions.

Locale note: sync:localization-catalog also restored parity for keys
already missing on main (add-host, sleep-worktree copy).
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: eaee25b2-c7f7-4d24-a3a1-b58665f87e59

📥 Commits

Reviewing files that changed from the base of the PR and between 628fb0d and 515feb7.

📒 Files selected for processing (3)
  • src/renderer/src/components/dashboard/use-agent-row-conversation-name.test.ts
  • src/renderer/src/components/dashboard/use-agent-row-conversation-name.ts
  • src/renderer/src/components/sidebar/WorktreeList.lineage-agent-expansion-coupling.test.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/dashboard/use-agent-row-conversation-name.test.ts

📝 Walkthrough

Walkthrough

Adds shared conversation-name resolution with title precedence and filtering, live-tab lookup with subagent handling, and tests for both. Dashboard and compact sidebar agent rows now use conversation names with existing text fallbacks. Locale files add workspace connection, sleep failure, SSH, agent-row, and editor settings strings.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change and testing, but it omits required template sections for Screenshots, AI Review Report, and Security Audit. Add the missing template sections, including either screenshots or 'No visual change', plus the AI review and security audit summaries.
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the main user-facing change: labeling agent rows with conversation names.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 550a7d9f-2b34-4d05-ba70-8ba73a59f1e8

📥 Commits

Reviewing files that changed from the base of the PR and between 56a31a5 and a3a2771.

📒 Files selected for processing (16)
  • src/renderer/src/components/dashboard/DashboardAgentRow.tsx
  • src/renderer/src/components/dashboard/use-agent-row-conversation-name.test.ts
  • src/renderer/src/components/dashboard/use-agent-row-conversation-name.ts
  • src/renderer/src/components/settings/AgentsPane.tsx
  • src/renderer/src/components/settings/agent-row-conversation-name-copy.ts
  • src/renderer/src/components/settings/agents-search.ts
  • src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/agent-row-conversation-name.test.ts
  • src/shared/agent-row-conversation-name.ts
  • src/shared/constants.ts
  • src/shared/types.ts

Comment thread src/renderer/src/i18n/locales/en.json Resolved
Row data patches live entries in place and keeps the tab snapshot from
row creation, so a rename or agent-set title landing after the row was
built never reached the conversation-name resolver. Select the current
tab from the store in the hook; retained rows without a live tab keep
the snapshot fallback.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Manual QA (dev build, CDP-driven, this branch)

Verified live on the rendered app (electron-vite dev build of this branch, isolated temp profile; seeded one workspace prohealth-sync with a working Claude status row prompt="continue", tool line Bash: pnpm test).

1. Default (toggle off) — rows label by last message sent (unchanged behavior):

default last message

2. Toggle on + agent-set title ✳ Fix patient intake sync — row labels by conversation name (decoration stripped, tool activity stays as secondary):

conversation name

3. Manual tab rename Prohealth intake spike — rename wins over the agent title:

manual rename

4. Settings → Agents switch, findable via search ("conversation name"):

settings toggle

Also verified: toggling off reverts the row to the last message immediately, even while a custom name exists (default stays last-message per product decision).

Fix found during QA

Sidebar row data patches live entries in place and keeps the tab snapshot from row creation, so a rename/agent title landing after the row was built never reached the resolver. Pushed a839195 — the hook now reads the current tab from the store (retained rows keep the snapshot fallback), with a regression test.

Not covered

  • Dashboard surface (DashboardAgentRow) uses the identical hook/resolver but wasn't visually exercised in this pass.
  • OpenCode OC | … and quick-command label sources are unit-tested only.

(Screenshots hosted on the qa-images/pr-9989 orphan branch; safe to delete after merge.)

Reject native provider/status titles and Windows/UNC cwd frames so conversation-name mode falls back to the user's last message instead of relabeling rows with identity or path text. Keep default-off and subagent rows off the tab map, and share a WeakMap-backed tab index across mounted rows to avoid repeated linear scans on store writes.
Always prefer a usable conversation name for sidebar and dashboard agent rows, falling back to the last message when the resolver rejects a title. Remove the preference, settings UI, search copy, and catalog entries. Keep subagent labels unchanged and reject generic Terminal N placeholders so partial tab snapshots cannot hide meaningful prompts.
@brennanb2025 brennanb2025 changed the title feat(agent-rows): opt-in conversation-name labels for sidebar and dashboard agent rows feat(agent-rows): label sidebar and dashboard rows with conversation names Jul 23, 2026
@brennanb2025

Copy link
Copy Markdown
Contributor Author

CI note for the always-on revision (b75ab61575): local row/title/settings suites pass (25 files / 227 tests), along with typecheck, localization, lint/react rules, and max-lines. The latest PR workflow stopped before typecheck/tests/build on verify:skill-bundle-manifest because current main contains the #10007 emulator skill-guide changes without refreshed resources/skills/* manifests. This PR does not touch skill files, and its previous head completed the full workflow successfully. I am leaving those unrelated release manifests out of this feature diff; rerunning after the base manifest is refreshed should clear the gate.

…w-conversation-name

# Conflicts:
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/ja.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/zh.json
@brennanb2025
brennanb2025 merged commit 34e0233 into main Jul 24, 2026
1 check passed
pythonstrup added a commit to pythonstrup/orca that referenced this pull request Aug 15, 2026
…ne's title

Sidebar and dashboard agent rows render per pane but took their name from
`tab.title`, which by design carries only the focused pane's live title —
pty-connection keeps it that way so two agents in splits do not make the tab
title flicker. In a split tab that title names one pane and mislabels its
siblings, and it flips as focus moves, so every row in the tab showed the
same name and all of them changed when the user clicked another split.

Drop the live title for rows whose tab has more than one pane and let each
row keep its own per-pane label. Tab-owned names (customTitle,
quickCommandLabel, generatedTitle) still apply to every row in the tab —
those are names the user gave the tab, not one pane. Single-pane tabs, which
are the case stablyai#9989 was written for, are untouched.

The split test is the layout root being a split node, so the row subscribes
to splits rather than to every title frame.

Fixes stablyai#11069

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…names (stablyai#9989)

* feat(agent-rows): opt-in conversation-name labels for agent rows

Sidebar worktree-card and dashboard agent rows always show the last
message sent to the agent, so rows relabel on every turn and a 'continue'
prompt becomes the row's name. Add an opt-in Agents setting that labels
rows with the conversation name instead, resolved with the tab bar's
precedence: manual rename, quick-command label, OpenCode session title,
generated title (behind its existing setting), then the agent-set live
title. Live titles count only when they carry a real name - status
decoration is stripped, and pure status, identity-echo, spinner+cwd, and
placeholder titles fall back to the last-message label. Subagent child
rows keep their own descriptions.

Locale note: sync:localization-catalog also restored parity for keys
already missing on main (add-host, sleep-worktree copy).

* fix(agent-rows): read the live tab so late renames and titles surface

Row data patches live entries in place and keeps the tab snapshot from
row creation, so a rename or agent-set title landing after the row was
built never reached the conversation-name resolver. Select the current
tab from the store in the hook; retained rows without a live tab keep
the snapshot fallback.

* fix(agent-rows): reject status labels and bound lookup work

Reject native provider/status titles and Windows/UNC cwd frames so conversation-name mode falls back to the user's last message instead of relabeling rows with identity or path text. Keep default-off and subagent rows off the tab map, and share a WeakMap-backed tab index across mounted rows to avoid repeated linear scans on store writes.

* feat(agent-rows): make conversation names the default

Always prefer a usable conversation name for sidebar and dashboard agent rows, falling back to the last message when the resolver rejects a title. Remove the preference, settings UI, search copy, and catalog entries. Keep subagent labels unchanged and reject generic Terminal N placeholders so partial tab snapshots cannot hide meaningful prompts.

* chore(i18n): sync catalog after main merge

* fix(agent-rows): preserve same-tab child labels
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.

1 participant