Repository navigation
feat(mates): hide a crewmate's sessions from the person's lists behind a preview - #30220
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Every user-visible item matches step 6 of the accepted RFC Notes
What this change shipsInventory (8 items) — 7 justifiedIntent: let a person turn on a preview so that the chats a Bot opens leave their own lists and show on the Bot's Sessions tab instead. This is an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] ba8952b Description read[DESCRIPTION-READ] a8aa70a87b63e65bb0143ac620e1c81bae8f538ae548bed06da556a6c7ff4595 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change is off by default behind a preview, easy to reverse, and the screenshots cover this revision's new surfaces. Notes
[DESIGN-REVIEWED] ba8952b Description read[DESCRIPTION-READ] 10fb6aa14eb7b54caa71b6126594ac9aa23748e6ff52482b972cd180f9461816 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 Nothing blocks. The blind reader understood both the preview switch and the Bot crumb correctly and would use them. Notes
[UX-REVIEWED] ba8952b Description read[DESCRIPTION-READ] da8abb79ac85c28e2a85a6c49e4cd14883b4bb40511fe778d20c7f600b5da356 That sha256 names everything this verdict read: the PR description, plus the 9 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 |
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: |
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: |
a020b60 to
751aea4
Compare
751aea4 to
3075422
Compare
3075422 to
b9c0853
Compare
…d a preview Step 6 of rfc-crewmate-workers-under-the-crewmate.md. A new Feature Preview, "Bot sessions on the Bot's profile" (mate_sessions, default off), takes every session whose lineage reaches a mate thread (mate_root) out of the person's lists: - server: list_view drops mate_root rows from a person's default GET /api/chat/slots read; crew=all and agent reads keep every row. - client: crewModeView drops a row whose mate_root is a live mate thread of the full slot store (before the Crew Mode early return, so that branch is unchanged); autoOpenRows never opens one; the unread count skips them. Sidebar, flyout, Recents and command center read the same rule. - A hidden session opened from the Sessions tab, History, search or a link shows the worker breadcrumb; its root crumb names the crewmate and opens its profile on the Sessions tab. On a phone the transcript keeps its top gap under the breadcrumb (Crew Mode workers too). The mate thread itself carries no mate_root and stays listed. With the preview off nothing changes. Closes #30023
b9c0853 to
ba8952b
Compare
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Reviewed ba8952b after it merged. The preview is off by default ( |
…reads mate_root" crew-mode.md still says no list reads mate_root and mate_dispatched_by, and no row covers the Bot sessions preview that kirodotdev#30220 put behind dashboard.feature_previews.mate_sessions. Two lists read the stamps with it on: crew_mode.list_view on the server and crewModeView in the dashboard. The new row records what the code does, including that the two halves hide different rows (the server drops every mate_root row, the dashboard only while the Bot's thread is live), that the setting is stored in the gateway config so it applies gateway-wide, and the breadcrumb a hidden session shows. The Bot thread row now points at it. Refs kirodotdev#30721
…a timed-out close back (#31312) (cherry picked from commit 53eb62e) Backport note: the ChatSidebar.tsx and dashboardSlice.ts import lines keep release/0.12.0's crew-mode imports; main's adjacent useMateSessionsHidden, mateSessionsHidden and selectLiveMateThreads come from #30220, which is not on release.
Problem / Motivation
Goal: Behind a new Feature Preview, the chats a Bot opens leave your own session lists and show on that Bot's Sessions tab instead.
Today every chat a Bot (crewmate) opens lands in your sidebar, Recents and grid, next to the chats you opened yourself. A busy Bot fills your list with its work.
Why it matters
The accepted RFC rfc-crewmate-workers-under-the-crewmate.md (path B, picked in #27837, accepted via #28858) moves a Bot's chats under the Bot. This is step 6 of that plan. The earlier steps already shipped: the
mate_rootstamps (#26952), the mate session routes (#28869), hidden workers' approvals and questions reaching the Bot's chat (#29276), and the Bot profile Sessions tab (#28931). Without this step those chats stay in your lists.Not a goal
What changed (motivation → approach → change)
A Bot's chats crowd your lists. Every chat a Bot opens carries a
mate_rootstamp, the key of the Bot's own chat. So the lists can drop those rows by that stamp, the same way they already drop Crew Mode workers bycrew_root. The Bot's own chat has no stamp, so it stays.A new preview, "Bot sessions on the Bot's profile" (
mate_sessions, default off), turns the rule on. It is registered insrc/kiro_crew/config/sections_dashboard.pyandwebsite/src/utils/previewFlags.ts, read throughuseMateSessionsHiddeninwebsite/src/hooks/usePreviewFlag.ts, and labelled in everywebsite/src/i18n/localescatalog. The settings search indexsrc/kiro_crew/docs/settings-registry.generated.jsonand thefind_uiindexsrc/kiro_crew/docs/ui-index.generated.jsonare regenerated for the new row, and so isconfig-baseline.json. On the server,crew_mode.list_viewleavesmate_rootrows out of a person's defaultGET /api/chat/slotsread;crew=alland agent reads still get every row. In the dashboard,crewModeViewdrops a row whosemate_rootnames a live Bot chat.autoOpenRowsnever opens one, and unread counts skip them. The sidebar, flyout, Recents and command center all read that same rule.A hidden chat you open from the Sessions tab, History, search or a link shows the worker breadcrumb. Its first crumb names the Bot and opens the Bot's profile on its Sessions tab. On a phone the breadcrumb sits under the top bar, so the transcript now keeps its top gap there. Before, the breadcrumb covered the first rows; Crew Mode workers had the same bug on main.
Backwards compatibility
Compatible: the preview is off by default, and with it off every list and read answers as before.
Reader: src/kiro_crew/crew_mode.py:list_view -- chat (person
GET /api/chat/slots) --mate_rootrows left out only with the preview on;crew=alland agent reads keep them (test/test_chat_slots_crew_view.py)Reader: website/src/lib/crewMode.ts:crewModeView -- chat (sidebar, flyout, Recents, grid) -- rows hidden only with the preview on (crewMode.test.ts)
Reader: website/src/store/dashboard/unread.ts -- chat (unread badge) -- hidden rows not counted only with the preview on
Reader: website/src/pages/members (Bot Sessions tab) -- crew page -- reads its own mate session route, so it still lists every chat
Reader: History and search -- chat -- read saved sessions, not the person list, so they still find every chat
Tests
test/test_chat_slots_crew_view.py: the person read dropsmate_rootrows only with the preview on;crew=alland agent reads keep them; the Bot's own chat stays.website/src/lib/crewMode.test.ts:crewModeViewandautoOpenRowshide a live Bot's chats only with the preview on.website/src/components/crew/CrewWorkerBreadcrumb.test.tsx: the Bot crumb names the Bot and goes to/members?member=<name>asking for the Sessions tab, not the main chat.website/src/pages/members/MembersPage.loop.test.tsx: that request opens the named Bot's profile on Sessions; a plain member link leaves the profile closed.website/src/test/previewSurfaces.test.tsx: the Feature Previews row count includes the new row.pre_push_gate.pypassed; type check passed; semgrep found nothing; the related frontend tests passed. Some backend tests fail on this host (enterprise profile,~/.mcp.json). The same tests fail the same way on clean main.Gate proof: tree 1547fdf9cbc1; ran 24; skipped none
Manual verification
I ran the built dashboard against stubbed APIs in a headless browser (Playwright, scripted). It checked: the switch is in Settings › Developer › Feature Previews; with the preview off a Bot's chat is listed, with it on it is not; a Bot's chat opened by link shows the breadcrumb naming the Bot, on desktop and on a phone. The phone top gap was checked in code, not in pixels: the stubbed chat had no messages.
Screenshots / video
The new switch in Feature Previews:
Sidebar with the preview off (the Bot's chat "Fix the flaky test" is listed) and on (it is gone; "Plan my week" stays):
A hidden chat opened by link, with the breadcrumb back to the Bot (desktop, phone):
Related Issues
Closes #30023
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.