Skip to content

fix(chat): open a Crew Mode chat's side panel on the Crew tab - #25936

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/crew-panel-default-tab
Oct 30, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/crew-panel-default-tab

Conversation

@iamwhatever

@iamwhatever iamwhatever commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A Crew Mode chat's side panel opens on the Crew tab until the user picks another tab.

Opening the right side panel in a Crew Mode chat (a conductor root, or one of its worker views) lands on Changes. The Crew tab (workers and goal board) is on the strip, but the user has to click it every time.

Why it matters

The Crew tab is what a Crew Mode user opens the panel for. Landing on Changes costs a click on every visit and hides the workers the chat is about.

Not a goal

What changed (motivation → approach → change)

Root cause: when the panel mounts, the pinned-block reconcile writes Changes as the strip's focus first. The Crew Mode effect then adds Crew with offerPanelView, which took focus only on a strip with no focus at all, so it never did.

Fix: offerPanelView in website/src/hooks/usePanelTabs.ts focuses Crew when nobody has picked a tab. "Not picked" is read from what the strip already stores: no focus, or focus still on Changes with the focus history never having left it and no tab asked for in this page session (a PR chip that opens Changes counts as asked). Any other stored focus is kept, so a tab the user picks wins on every later open. The comment in website/src/pages/chat/SidePanel.tsx says the same.

The decision is recorded in rfc-crew-panel-default-tab.md (status: accepted, merged in #26002), which amends Crew Mode UI rule U1.

Chat Nothing picked User picked a tab
Crew Mode root Crew that tab
Crew Mode worker Crew that tab
Normal chat Changes that tab

Backwards compatibility

Compatible: the stored strip shape is unchanged; only which tab an unpicked Crew Mode strip focuses changes.

Removes nothing: no key, record, path or function is taken away.

Tests

Proof: not provable -- frontend test (prove.py runs Python only)

The three Crew-tab cases in sidePanelCrewDefaultTab.test.tsx fail with the usePanelTabs.ts change reverted (checked locally).

  • website/src/test/sidePanelCrewDefaultTab.test.tsx (new, renders the real SidePanel): a Crew Mode root opens on Crew; a Crew Mode worker view opens on Crew; a normal chat opens on Changes with no Crew tab; a tab the user clicks is kept when the panel opens again; switching Crew Mode → normal → Crew Mode → normal picks the right default each time.
  • website/src/test/crewModeUiR1.test.tsx: the default Changes focus is taken, but Changes picked after another tab is kept; Changes asked for before the panel mounted (a PR chip) is kept.
  • Local gates: 156 panel-related vitest files pass, tsc -p tsconfig.app.json and eslint clean.

Manual verification

Checked in a real browser (Chromium) against the real SidePanel in an isolated capture page: the Crew Mode chat selects Crew, the normal chat selects Changes; with the fix reverted the Crew Mode chat selects Changes. Not run against a live gateway.

Screenshots / video

Real SidePanel in an isolated capture page (dark theme, 460px dock), with the slot list seeded with one Crew Mode root and one normal chat.

Crew Mode chat Normal chat
Before
After

Before: the Crew Mode chat opens on Changes. After: it opens on Crew; the normal chat opens on Changes in both.

Related Issues

Closes #25934

Sibling sweep

Swept: git grep -n "offerPanelView|activeId: b.activeId ?? " -- website/src/
Siblings: none -- offerPanelView has one caller (SidePanel's Crew Mode effect); other opens are explicit tab choices that already take focus.

Pattern harvest

Not generalizable: a one-off ordering between two effects on one strip; the fix reads stored focus history rather than effect order.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • 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

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners October 29, 2026 20:31
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this fixes the cause (the order of two effects on one strip), reuses the strip's stored focus history instead of adding a store, and the rendered before/after evidence is attached.

Notes

  • If a user closes Crew, recent is reduced to [changes], so the next visit adds Crew back and also gives it focus. One sentence in the offerPanelView doc comment saying whether closing the tab counts as picking another would make that intended rather than accidental.

[DESIGN-REVIEWED] aac36cd

Description read

[DESCRIPTION-READ] aa937b68319ee1a588f49775ba76a8223a99e726d89f0f5a92294c606a1cefa8

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The diff adds no controls or copy; it only changes which existing tab opens by default. The before and after screenshots show Crew selected for a Crew Mode chat and Changes for a normal chat.

Notes

  • The blind reader would not click the × on the now-default "Crew" tab, "because I don't know whether closing it gets rid of the Crew or just hides the tab." Users will now see Crew first, so they will see this × more often. A follow-up could give the × an accessible label and tooltip such as "Close Crew tab".
  • With Crew active, the Changes, Artifacts and Files tabs shrink to bare icons (shot-03). The reader said "Without the earlier screenshots I wouldn't know what they are." This behaviour already existed, but Crew Mode users will now meet it on every first open. A follow-up could give each icon a tooltip with its tab name.

[UX-REVIEWED] aac36cd

Description read

[DESCRIPTION-READ] f68c4df5d2067be038d8cf531831ccae965b3d1e4943c5a23461e362c78d3581

That sha256 names everything this verdict read: the PR description, plus the 7 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. The default this changes is recorded in rfc-crew-panel-default-tab.md, which is accepted on base and amends U1 by name. The reversed "without taking focus" pin is cited in that RFC. offerPanelView gains no new parameters or stored fields.

What this change ships

Inventory (7 items) — 7 justified

Intent: let a Crew Mode user land on the Crew tab when they open the side panel, without clicking it on every visit. This is a FIX to the default focus, and it changes a default the RFC decided.

  1. A Crew Mode root chat's panel opens on Crew, not Changes — justified
  2. A Crew Mode worker view's panel opens on Crew — justified
  3. A tab the user picks stays focused on later opens, including Changes picked after another tab — justified
  4. Changes asked for before the panel mounts (a PR chip) stays focused — justified
  5. A chat that gains Crew Mode while on the default Changes tab moves focus to Crew — justified
  6. Normal chats still open on Changes — justified
  7. The U1 comment and test header now say Crew takes the default focus but never a picked one — justified

[FIRST-PRINCIPLES-REVIEWED] aac36cd

Description read

[DESCRIPTION-READ] 99c6e4db305c0eced1e25c4cd235d298ba2b8bc901e3d0046fcf475d4113cfce

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] aac36cd

Verdict parsed from the review's SHA-scoped output markers for commit aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2.

False positive or not applicable? A repository writer can comment:
/ai-review override fable aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] aac36cd

False positive or not applicable? A repository writer can comment:
/ai-review override gpt aac36cd21865d6dd15ba5c5053d153d3cf2e1fd2 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 29, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor Author

The decision this PR needs is recorded in the RFC #26002 (amends Crew Mode UI rule U1). Once it merges, this PR is rebased onto main once and pushed once.

@iamwhatever
iamwhatever force-pushed the fix/crew-panel-default-tab branch from 6a18c58 to aac36cd Compare October 30, 2026 04:36
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 30, 2026
@KiroCrewCaptain
KiroCrewCaptain enabled auto-merge (squash) October 30, 2026 06:05

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: fix (4 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: frontend bug fix; a Crew Mode chat's side panel opens on the Crew tab until the user picks another, with tests.

@KiroCrewCaptain
KiroCrewCaptain merged commit 787d273 into main Oct 30, 2026
96 of 104 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/crew-panel-default-tab branch October 30, 2026 06:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 30, 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.

Crew Mode side panel opens on Changes instead of the Crew tab

2 participants