Skip to content

feat(sidebar): add title-only session cards - #36625

Closed
bolichen97 wants to merge 2 commits into
mainfrom
crew/CommunityCrew/23512
Closed

bolichen97 wants to merge 2 commits into
mainfrom
crew/CommunityCrew/23512

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Let people reduce sidebar session cards to their titles with one optional setting.

The sidebar has separate controls for some card details, but no single title-only mode. People who organize many sessions by title still see repeated agent metadata, timestamps, activity previews, and linked-source chips.

Why it matters

A title-only option makes dense session lists faster to scan and keeps unrelated issue or pull-request references out of screenshots and screen shares.

Not a goal

What changed (motivation → approach → change)

Takeover of #23512 by Rio (credit kept). His commit was rebased onto main; conflict resolutions only:

  1. src/kiro_crew/docs/ui-index.generated.json: regenerated with npm run gen:ui, not hand-merged.
  2. website/src/pages/chat-sidebar/SessionRow.tsx: kept main's slotStatusText block (with its compacting parameter) and main's lucide-react import line, and added Rio's COMPACT_LIVE_ROW_STATE_KEYS and Pause import.
  3. website/src/pages/chat/ChatSettings.tsx: kept both DEFAULTS entries (main's reasoningStartsExpanded: false and Rio's compactSessionCards: false).

Nothing else in his commit changed; it keeps his author name, email and date.

Rio's commit (feat(sidebar): add title-only session cards): a browser-local Title-only session cards switch under Settings → Chat → Sessions, default off. When on, a session row keeps its title and hides the agent/timestamp line, the activity or message line and linked source chips. A row that needs the user keeps one labelled icon in front of its title (an owed approval, a question, a waiting loop, an interrupted turn, a blocked monitor, an unread result); a goal loop, workflow run or monitor action lights the live dot; a collapsed conductor shows its hidden sessions' needs-you icon or live dot; a Crew Mode root keeps its bolt and a paused crew its Paused icon; a Slack code channel conductor keeps its crew state, badge and worker fold; a muted session keeps its mute icon.

Fix commit (Bolin Chen), for Crew Captain's change request on #23512:

  • Symptom: on a title-only card, a Crew Mode root whose remote worker waits on an approval (group: "approval", no local slot), or whose ledger has an item on a person (crew_work.person > 0), showed a bare title.
  • Cause: the title marker counted only local crew rows waiting on a tool approval (crewWaitingApprovals), while the hidden status line counts the server's worker list, live approvals and the ledger (crewNeedsYou).
  • Change: one hook, useCrewSubtreeNeedsYou, now gives that count to both the status line and the title marker. The marker uses the status line's Hand glyph and "N needs you" label (state crew_needs_you). The hook reads nothing for a row that is not a title-only crew root.
  • SessionRow.tsx was over the 2,000-line cap after the rebase (2,117 lines), so whole definitions move to sibling modules: the crew summary line, its hook and the Paused mark to chat-sidebar/CrewRootSummaryLine.tsx; the row line classes and icon size to chat-sidebar/rowLineStyle.ts; the row's prop types to chat-sidebar/sessionRowTypes.ts. SessionRow.tsx is now 1,923 lines.
  • The sidebar test mocked chatTags and chatFolders as {}. An awaited crew read let those queries land after the test, so Vitest exited 1 with unhandled errors. Both mocks now resolve to lists.

The generated settings registry, command-palette registry, UI index and locale catalogs come from Rio's commit.

Backwards compatibility

Compatible: the new browser-local preference defaults to false, so existing installations keep detailed session cards.

Reader: website/src/pages/ChatSidebar.tsx:ChatSidebar -- chat -- reads the preference and passes it through the shared row shell.
Reader: website/src/pages/chat-sidebar/SessionRow.tsx:SessionRow -- chat -- hides only rendered card details when the preference is on; slot payloads and row actions are unchanged.
Reader: website/src/pages/settings/ChatPanel.tsx:ChatPanel -- settings -- writes the preference through the existing mc-chat-config path.

Tests

  • ChatSettings.test.tsx covers the detailed default, a stored opt-in and repair of invalid stored values.
  • ChatSidebar.sourceLinkChip.test.tsx covers the title-only card: hidden preview, timestamp and source chips; the labelled title markers; the live dot for a workflow run and a goal loop; the stalled-loop marker; a collapsed conductor's needs-you icon; a Crew Mode root's needs-you marker for a local worker's approval, a remote worker's approval with no local slot and a ledger item waiting on a person (the two cases from the change request, added in the fix commit); the Crew Mode and Paused marks; the running-crew marker; and no extra cues on full cards.
  • ChatSidebar.codeChannelCrew.test.tsx covers a title-only code channel conductor.
  • Run here on the head: Vitest on the sidebar, crew and ChatSettings suites, 2519 tests in 198 files, exit 0; tsc --noEmit, targeted ESLint, npm run build, i18n:check, npm run gen:ui (no changes) and scripts/check_file_line_cap.py (0 failures) passed.

Manual verification

From Rio's PR, in an isolated local dashboard profile: detailed cards showed metadata, timestamps, previews and source chips; enabling the setting reduced each card to its title; a refresh kept the preference; disabling it restored detailed cards. The fix commit's marker is covered by the tests above.

Screenshots / video

Rio's screenshots (synthetic sessions and links). They show the title-only layout, not the title-line icons, which the tests cover.

Detailed cards Title-only cards
Detailed session cards Title-only session cards

Title-only session cards setting enabled

Related Issues

Part of #21239
Refs #23512

Follow-ups left out of this PR: #29861 (collapsed-parent live-dot test), #29862 (pinned, incognito/temporary, popped-out and released icons), #29863 (setting description copy), #29864 (history.md spec paragraph).

Related overlap: #21925 provides a narrower preview-only setting and keeps status indicators and other card details visible.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

Rio Evrard and others added 2 commits November 13, 2026 12:39
A title-only card hides the Ultra Mode root's status line, and its
title marker counted only local crew rows waiting on a tool approval.
A remote worker in the approval group and a ledger item on a person
left the title bare. The marker now reads the status line's own
needs-you count (useCrewSubtreeNeedsYou), so both say the same thing.

SessionRow.tsx was past the 2,000-line cap, so the root summary line,
the row line styles and the row's prop types move to sibling modules.
The sidebar test's tag and folder mocks resolve to lists, so an awaited
crew read no longer throws after the test ends.
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 13, 2026 13:10
@bolichen97
bolichen97 marked this pull request as draft November 13, 2026 13:11
@bolichen97

Copy link
Copy Markdown
Contributor Author

Fallback only. Rio updated #23512 on 11-13 11:47Z, so his PR stays primary. This draft will close if Rio pushes by 11-14 12:00Z.

@bolichen97
bolichen97 removed the request for review from iamwhatever November 13, 2026 13:11
@bolichen97

Copy link
Copy Markdown
Contributor Author

Closing: Rio pushed the fix to #23512.

@bolichen97 bolichen97 closed this Nov 13, 2026
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