Repository navigation
fix(sidebar): show crew groups whenever Chat on a crew is on - #18767
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Check that people who had only "Remote crew sessions" on are fine with now also getting the "New chat on crew" entry. [DESIGN-REVIEWED] f1dd2b3 Description read[DESCRIPTION-READ] 82eacf18d4ad90ff8b4a9215335d8932c8d95a8f3a975bacaa8e204c667b9b28 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Check that someone who had only Remote crew sessions on now sees "New chat on crew" in the create menu without having turned it on. [UX-REVIEWED] f1dd2b3 Description read[DESCRIPTION-READ] ca1ea011988320541ffbf83cd1f89abd6f02f490647e4cf6af47142bf963dcbe 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 |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Devices that turned on only the old "Remote crew sessions" switch now also get "New chat on crew", which they never chose. Confirm that's intended. Not justified as shipped
What this change shipsInventory (8 items) — 6 justifiedIntent: let someone who started a chat on a crew find it again in the Sessions sidebar. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] f1dd2b3 Description read[DESCRIPTION-READ] b74ac6ef872f0bf2db22e201b46d0e51f0de72a010f70198106a1a300fe960f8 That sha256 names the PR description this verdict read. Recompute it with |
7384309 to
8c865d3
Compare
8c865d3 to
6ccdda8
Compare
Fold the "Remote crew sessions" preview into "Chat on a crew": one switch now gates both "New chat on crew" and the per-crew groups in the Sessions list. With the two split, a user could start a chat on a crew and find no crew group to return to it from. The retired mc-preview-instance-sessions key still reads as on, so a device that turned it on keeps the feature; turning the one switch off clears it. Old highlight ids land on the Chat on a crew card, and that card inherits the retired card's place on the guide's never-point list. Closes #18750
6ccdda8 to
f1dd2b3
Compare
|
|
buluoray
left a comment
There was a problem hiding this comment.
Verdict: approve. One preview switch now holds both halves of "Chat on a crew". Default users see no change, and nothing blocking survived verification.
What it brings
Someone who turned on Chat on a crew could start a chat on another machine and then find no crew group in the Sessions sidebar to get back to it. The second half lived behind a different switch, Remote crew sessions. Now one switch shows both the "New chat on crew" entry and the per-crew groups. Feature Previews has one card instead of two, and the card's text shows under its label.
Verified (at f1dd2b365437abef9119b35ffccfe0146fbde2ca)
- Default users are unchanged.
useRemoteCrewChat()(website/src/hooks/usePreviewFlag.ts:43-46) iscurrent || legacy. With neither key set it is off, souseInstanceSessionsgetsenabled=false(website/src/pages/chat-sidebar/sessionSources.ts:35,:68-70) and sends no per-crew request, the same as before. - Upgrade keeps the feature on. A device with only the old
mc-preview-instance-sessions=1still reads as on through the same hook. Its one new effect is that the create menu gains "New chat on crew", which is the point of the change and is stated in the description. - There are exactly three readers, and all go through the hook:
create.ts:198,sessionSources.ts:35andFeaturePreviewsSection.tsx:135. No other source file reads either key directly.PREVIEW_INSTANCE_SESSIONSis still exported only so existing test fixtures keep working. - Turning it off really turns it off.
setRemoteCrewChat(false)(website/src/utils/previewFlags.ts:178-182) clears both keys. Without that, a device carrying the old key would stay on behind a switch that reads off. If the storage write fails, the function returns false and the toggle keeps showing on, so the failure is visible (fail-closed). - Old highlight links still land on the card. Both retired ids map to
developer.chat-on-a-crew(website/src/hooks/useSettingHighlight.ts:60-61). - The guide's never-point list stays in sync. The browser list (
website/src/guide/findTargetPolicy.ts:51) and the gateway list (src/kiro_crew/guide_catalog.py,_EXCLUDED_SETTING_IDS) swap the same id, so the gateway list is still a superset of the browser's. - Translations are updated. Every locale updates
chat_on_a_crew_descand drops the two keys the removed card used. The old wording ("not listed in this dashboard's sessions yet") is gone from all of them. - Specs and docs match. The feature-map peer-session row, the
developertab row ("Six of the seven previews"), the sidebar paragraph indocs/system-specs/modules/history.mdandsrc/kiro_crew/docs/remote-crew.mdall name the single switch. I found no stale reference to the retired card in docs or source. - No recorded decision is contradicted. Nothing in
docs/decisions/covers preview-switch placement or crew-group gating. - Relationship with #18766 (crew folders in a crew group, same sidebar):
git merge-tree --write-treereports no conflicts between the two heads, and neither head conflicts withmain.- On the merged tree, the related vitest files pass (5 files, 77 tests) and
tsc -p tsconfig.app.jsonis clean. - #18766's tests still seed the old key, which this PR keeps reading as on, so it does not break them.
- Suggested order: this PR first. It is the fix that makes crew groups appear for Chat on a crew users, and #18766 only shows up once a group renders. Neither PR depends on the other at the code level. Re-run CI on whichever lands second.
Non-blocking follow-ups
- One reader has no test. Mutating
create.tsto read only the new key leaves every related suite green (previewSurfaces,ChatSidebar.machineGroupsand five other crew sidebar files: 162 tests). So "a device with only the old switch gets New chat on crew" is stated but not tested. A test that seeds only the old key and checks the create menu would cover it. - A side effect of the id swap. Because
developer.chat-on-a-crewis now on the never-point list, the guide can no longer walk someone to this switch. That matches what the old card had, but the description could say so.
Tests and mutations
- I ran the targeted tests only:
- vitest:
ChatSidebar.machineGroups,previewSurfacesandsettingHighlightAliases, 59/59 passed. - pytest:
test_remote_crew_doc.pyandtest_guide_ui_find.py, 155 passed.
- vitest:
- Mutations (each restored afterwards, worktree clean):
- Dropping the old key from
useRemoteCrewChatturns redreads the retired instance-sessions key as on, and clears it when turned offand seven older crew-group tests inChatSidebar.machineGroups(renders Local and one group per connected crew…,keeps the selection when the crew group holding it collapses, and others). - Not clearing the old key on off turns red
reads the retired instance-sessions key as on, and clears it when turned off. - Gating
sessionSources.tson the old key again turns redshows the crew groups with only Chat on a crew on. - Reading only the new key in
create.tsturns nothing red (see follow-ups).
- Dropping the old key from
- CI at this head: 98 success, 10 skipped, 0 failure, 0 pending. Auto-merge is off and there are no reviews yet.
Not verified
- I did not run the full frontend or backend suites; CI covers those.
- I did not re-check the regenerated
settingsRegistry.gen.ts,settings-registry.generated.jsonandui-index.generated.jsonagainst their generators beyond the tests above. - I did not look at the screenshots against a live two-machine setup.
Problem / Motivation
Goal: With Chat on a crew on, the Sessions sidebar shows a group per connected crew, so a chat started on a crew has a place to come back to.
On a real two-machine test the user opened a chat on a crew ("hello · On shizuka"), but the local Sessions sidebar showed no crew groups at all. No "shizuka" group, and the remote sessions that used to show were gone.
Why it matters
Anyone who turned on Chat on a crew but not Remote crew sessions can start a chat on another machine and then lose it. The crew window closes, and nothing in the sidebar leads back.
Not a goal
CrewGroups.tsx), which another PR handles.What changed (motivation → approach → change)
Symptom: chat on a crew works, but the sidebar has no crew group.
Cause: two preview switches held two halves of one feature. Chat on a crew (
mc-preview-remote-crew-chat) held "New chat on crew". Remote crew sessions (mc-preview-instance-sessions) held the crew groups insessionSources.ts. One on and one off gives exactly this.Change: one switch. Chat on a crew now holds both halves, read through a new
useRemoteCrewChat()hook and written throughsetRemoteCrewChat()inpreviewFlags.ts. The old key still counts as on, so nobody loses the feature. Turning the switch off clears both keys. The Remote crew sessions card is gone. The Chat on a crew text now says it lists crew sessions too, and it shows under the label instead of behind an info tip.Board view was checked and is not the cause here. It already says how many peer rows it leaves out.
Side effects of removing the card:
settingsRegistry.gen.ts,settings-registry.generated.json,ui-index.generated.jsonand en-XA are regenerated.remote-crew.md, the feature map and the sidebar paragraph ofhistory.mdare updated.Backwards compatibility
Compatible: a device with either key set to
1still has the feature on, and old highlight ids still resolve. A device that had only the old Remote crew sessions switch on now also gets New chat on crew: that is the one-switch change itself.Reader: website/src/pages/chat-sidebar/sessionSources.ts:useSessionSources -- crew page -- reads
useRemoteCrewChat(), which counts the old key; testshows the crew groups with only Chat on a crew onReader: website/src/pages/settings/FeaturePreviewsSection.tsx:FeaturePreviewsSection -- crew page -- one card now; tests
has one Chat on a crew switch for both crew halves, and no second card,reads the retired instance-sessions key as on, and clears it when turned offReader: website/src/hooks/useSettingHighlight.ts:LEGACY_ID_EXACT -- crew page -- both old ids map to
developer.chat-on-a-crew; testmaps both peer-session preview ids to the Chat on a crew cardReader: website/src/guide/findTargetPolicy.ts:SENSITIVE_IDS -- chat -- now names
developer.chat-on-a-crew; testtest_instances_settings_are_guidable_and_the_trust_root_is_notReader: src/kiro_crew/guide_catalog.py:_EXCLUDED_SETTING_IDS -- chat -- same id swap, kept a superset of the browser list
Reader: website/src/i18n/locales/.json:featurePreviewsTab.remote_instance_sessions -- release -- key had one reader (the removed card); the deadKeys and catalog parity tests pass
Reader: website/src/test/.test.tsx:PREVIEW_INSTANCE_SESSIONS -- release -- the constant is kept, so the 30-odd tests that seed it still turn the feature on
Tests
ChatSidebar.machineGroups.test.tsx›shows the crew groups with only Chat on a crew on: seeds only the Chat on a crew key and expects the crew group with its peer row and relay slot. Red on main.previewSurfaces.test.tsx›has one Chat on a crew switch for both crew halves, and no second card: red on main.previewSurfaces.test.tsx›reads the retired instance-sessions key as on, and clears it when turned off: red on main.settingHighlightAliases.test.ts,test_remote_crew_doc.pyandtest_guide_ui_find.pyfollow the id and card change.Red on main: these test files were copied onto a detached
origin/mainworktree and run there. 4 failed, the ones above. On the branch: 243 related frontend spec files (3981 tests) and 39 related backend files (2196 tests) pass.tsc -p tsconfig.app.jsonand eslint on the changed files are clean.Determinism: the new tests use the file's existing fixtures and mocks, with no timers or clock reads. The new sidebar test's waits name a 5 s ceiling for the two chained queries.
ChatSidebar.machineGroups.test.tsx+previewSurfaces.test.tsxwere run 5 times with--sequence.shuffle: the new tests passed every time. Three older tests increw is preview-gated end to endfail under some shuffle seeds; they fail the same way on main (seed 7), so that is not from this PR.Manual verification
website/scripts/capture-crew-groups-one-flag.mjswas run against a builtdistfrom main and from this branch, both seeded with onlymc-preview-remote-crew-chat=1and one connected crew "shizuka". The script is not committed. Main:crew group "shizuka" in the sidebar: no. Branch:YES.Screenshots / video
Sidebar, only Chat on a crew on. Before (main): no crew group.
After: the shizuka group with its session.
Settings > Developer > Feature Previews
Before: two cards.
After: one card, its text shown under the label.
Related Issues
Closes #18750
Pattern harvest
Not generalizable: two preview flags were added for the two halves of one feature. It is a one-off product split, not a code pattern a rule can match.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)