Skip to content

feat(members): hide a Bot's sessions from the session list by default - #37713

Merged
iamwhatever merged 1 commit into
mainfrom
feat/bot-sessions-hidden-by-default
Nov 16, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
feat/bot-sessions-hidden-by-default

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A Bot's sessions stay out of the main session list by default, and each Bot has one switch to show them there again.

Bot sessions crowd the main session list. The "Bot sessions on the bot's profile" Feature Preview already moves them to the Bot's Sessions tab, and it ran for a week with no reported problems, but it is off by default.

Why it matters

Every chat a Bot opens lands in the person's sidebar, Recents and grid, so the person's own chats get buried. The Bot's Sessions tab already lists those chats, so the main list does not need them.

Not a goal

  • No change to the Bot profile's Sessions tab: it keeps listing every session.
  • No change to History or search, which still find every chat.
  • No global switch: the choice is per Bot.

What changed (motivation → approach → change)

Before After
Bot sessions in the main list unless a Feature Preview is on Bot sessions out of the main list by default
One global preview switch One per-Bot switch: Show in my Sessions list, off by default

The preview is retired: its Feature previews row, flag, config name and copy are gone, and a stored mate_sessions value is ignored. This is step 9 of rfc-crewmate-workers-under-the-crewmate.md (status partial on main): the flag's default flips by the owner's call, recorded in a new decision entry.

The switch lives on the Bot's record (show_sessions_in_list). The gateway stamps it on the Bot thread's own slot row (crew_mode.py), and both the server's person-facing slot list (crew_mode.list_view) and the dashboard's lists (crewModeView in lib/crewMode.ts, the store/personSlots.ts selectors and store/dashboard/unread.ts counts) read that one stamp; types/index.chat.ts and api/client/agents.ts carry the field. A change to the switch, from the dashboard or a config edit, re-sends the slot list, so the lists follow it at once. The flag leaves utils/previewFlags.ts and the settings search (components/commandPalette/settingsSearchCore.ts). Docs, config-baseline.json, the generated src/kiro_crew/docs registry and UI index, and the locale catalogs (i18n/locales/en.json and each translation) are updated.

Backwards compatibility

Compatible: the new field defaults to off and a missing or non-bool value reads as off; the API refuses a non-bool show_sessions_in_list with 400.

Reader: src/kiro_crew/config/loader_builders.py:feature_previews -- release -- names outside FEATURE_PREVIEW_FLAGS are dropped on load, so a stored mate_sessions is ignored (test_lts_feature_previews_off.py)
Reader: website/src/hooks/usePreviewFlagServerSync.ts -- crew page -- syncs only PREVIEW_FLAGS, so the stale mc-preview-mate-sessions key is an unused localStorage key (previewSurfaces.test.tsx)
Reader: src/kiro_crew/dashboard/chat_api/slot_detail.py:api_chat_slots -- chat -- crew=all and agent reads still keep every row (test_chat_slots_crew_view.py::test_crew_all_and_an_agents_read_keep_a_mates_sessions)
Reader: website/src/pages/members/MateSessionsList.tsx -- crew page -- reads the raw slot store, not the person's list, so the Sessions tab is unchanged (MateSessionsList.test.tsx)

Tests

  • test_crew_show_sessions_setting.py: default off and round trip, junk reads off, the PUT persists and refuses a non-bool, the stamp lands on the Bot thread's row only, and a flip re-sends the slot list.
  • test_chat_slots_crew_view.py: a person's read drops a Bot's sessions (switch off, unset or junk), keeps them with it on, and crew=all and agent reads keep them.
  • crewMode.test.ts: crewModeView, unread counts and auto-open with the switch off and on.
  • CrewProfileSettings.test.tsx: the toggle reads off by default, writes the record, updates the roster row and reports a failed write.
  • Existing preview tests updated for the retired flag.

Proof: not provable -- other: feature PR, not a fix; the behavior is pinned by the tests listed above

Manual verification

Built the SPA and ran scripts/capture-crewmate-profile-settings.mjs against stubbed APIs: the Bot's Settings page shows the new switch, off, with its caption, above "Send replies in one click".

Screenshots / video

Bot Settings, light and dark:

Bot settings light

Bot settings dark

Related Issues

Closes #37712

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 November 15, 2026 22:52
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 15, 2026
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the retired preview has no readers left in the tree, and the LTS default change is a recorded maintainer decision.

Notes

  • The decision entry covers it, but the PR description doesn't say that LTS builds now hide Bot sessions too. Before this PR, the LTS edition lock kept the preview off, so those sessions stayed listed. An LTS operator reading only the PR won't see that coming.

[DESIGN-REVIEWED] 7fed4da

Description read

[DESCRIPTION-READ] 8854325e8c03e8e32a3c086aaab03a8ac234a60c4cdb3b201cc0437641a71a0f

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 Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

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

UX-Verdict: PASS

cannot evaluate: missing the failed-save state of the new "Show in my Sessions list" switch. Neither screenshot shows its error notice, so nobody has seen how a failed save looks next to the switch.

Evidence gaps

  • Failed save of "Show in my Sessions list": the crew-profile-show-sessions-in-list-error notice ("Couldn't save this setting. It's unchanged. Try again.") doesn't appear in shot-01 or shot-02. To close this, attach a screenshot of the Bot Settings page with that notice showing under the switch.

Notes

  • The caption "Chats {{name}} opens also show in your Sessions list. Its Sessions tab always lists them." confused the blind reader. It couldn't tell whether this was "the on state or the current state", and it couldn't place "Its" ("your Sessions list" and "its Sessions tab" read as one place). Suggested replacement: "On: chats {{name}} opens also appear in your Sessions list. Off: they appear only on {{name}}'s Sessions tab."
  • "Couldn't save this setting." doesn't say which setting. Suggested replacement: "Couldn't change where {{name}}'s chats are listed. Nothing changed. Try again."

[UX-REVIEWED] 7fed4da

Description read

[DESCRIPTION-READ] 95eaab3098c2aba3115892eea298a7c8f318419e8b151f3ef3beaf2b594a92f5

That sha256 names everything this verdict read: the PR description, plus the 5 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 Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 7fed4da488de96362933046d14cdf3e9befd1943 — 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 flip is RFC step 9 ("flag default on (owner call)") of rfc-crewmate-workers-under-the-crewmate.md, which is partial on base. The LTS change is not stated in the description.

Notes

  • Item 4 — undeclared: the description never says LTS changes. The diff drops crew_mode.mate_sessions_hidden from the edition_locks.feature_previews readers, and the decision entry says "with the preview gone there is no lock to hold". So LTS builds, which D12 held at "sessions listed", now hide Bot sessions too. RFC step 9 does not mention editions, so whether it covers LTS is a judgement call and only a note.
  • Item 2 — rides along: RFC step 9 only says "flag default on". This diff also deletes the global switch and replaces it with a per-Bot one. The RFC's "Turning the flag off brings every live mate worker back" now means flipping each Bot one at a time.

What this change ships

Inventory (8 items) — 6 justified

Intent: keep a person's own chats from being buried under the sessions their Bots open. ADDITION (the default changes).

  1. A Bot's sessions leave the sidebar, Recents, grid and unread counts by default. — justified
  2. The "Bot sessions on the bot's profile" Feature Preview row is gone, and a stored mate_sessions value is ignored. — rides along
  3. A new Show in my Sessions list switch in each Bot's Settings, off by default. — justified
  4. LTS builds now hide Bot sessions as well (before, the edition lock kept them listed). — undeclared
  5. A person's GET /api/chat/slots drops a Bot's sessions unless that Bot's switch is on. — justified
  6. Flipping the switch, from the dashboard or a config edit, re-sends the slot list and roster right away. — justified
  7. The agent update API refuses a non-bool show_sessions_in_list with 400. — justified
  8. The roster reply carries the new show_sessions_in_list field. — justified

[FIRST-PRINCIPLES-REVIEWED] 7fed4da

Description read

[DESCRIPTION-READ] 610b0d0c0e5909d0ed01180fa523c903339bd0086e003154e144374e4347dac7

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 Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] 7fed4da

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

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

@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7fed4da

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

@iamwhatever
iamwhatever force-pushed the feat/bot-sessions-hidden-by-default branch from 816bb34 to 1449ce7 Compare November 15, 2026 23:06
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Refresh the Bot roster when its listing switch changes span=9c8c288eb3c0 -- fixed

fixed in 1449ce7: _push_mate_listing also pushes push_refresh("agents"), which prefix-invalidates the ['kirocrew-agents'] roster query, so another dashboard's Bot Settings switch re-reads the saved value; test_a_flip_resends_the_slot_list asserts both frames on a flip and neither on an unrelated change.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/agent_capabilities.py, src/kiro_crew/agent_state.py, src/kiro_crew/mate_capabilities.py and related tests since this head went green (5b9d204 -> 59ce18f); CI re-running.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 15, 2026
@iamwhatever
iamwhatever force-pushed the feat/bot-sessions-hidden-by-default branch from 1449ce7 to fb95a80 Compare November 15, 2026 23:28
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/system-specs/modules/platform-context.md (conflict, resolved by keeping main's rows and dropping the retired reader), src/kiro_crew/crew_mode.py, src/kiro_crew/config/sections_dashboard.py, config-baseline.json and docs/system-specs/modules/crew-mode.md since this head was pushed (59ce18f -> fa4e40d); CI re-running.

@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 15, 2026
@iamwhatever
iamwhatever force-pushed the feat/bot-sessions-hidden-by-default branch from fb95a80 to d63cd6e Compare November 15, 2026 23:41
@iamwhatever

Copy link
Copy Markdown
Contributor Author
  • Refresh the hub unread badge when Bot session visibility changes span=52a46b44d117 -- fixed

fixed in d63cd6e: on a changed slot list, applySlots relays the unread count with relayUnreadCount (returns early when not embedded; covers the hold case relayUnreadIfHolding handled), so a flipped show_sessions_in_list stamp re-relays the hub count; dashboardSliceRelay.test.ts pins 0 -> 1 -> 0 across hide/show/hide.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in src/kiro_crew/dashboard/handlers/terminal.py and its tests (no file this PR touches) while fixing the GPT finding (fa4e40d -> 4372f48); CI re-running.

@iamwhatever

Copy link
Copy Markdown
Contributor Author

Backend Tests (3.12, 1) fails on test/test_wakatime_handlers.py::test_status_loads_config_off_the_event_loop (assert [False, False] == [False]). The same node id fails on a clean origin/main (e8c0957), so it is not this PR's red; the open fix is #37726. This PR waits for it and rebases once it lands.

@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 Nov 16, 2026
The "Bot sessions on the bot's profile" Feature Preview is retired and its
behavior is the default: the sessions a live Bot thread dispatched leave the
person's session lists, Recents, grid and unread counts, and show on the
Bot's Sessions tab. A stored mate_sessions switch is ignored.

Each Bot's Settings gets one switch, "Show in my Sessions list"
(show_sessions_in_list on the Bot record, off by default). The gateway
stamps it on the Bot thread's slot row, a person's GET /api/chat/slots and
the dashboard's crewModeView both read that stamp, and a change to it
re-sends the slot list. The Bot's Sessions tab is unchanged.

Closes #37712
@iamwhatever
iamwhatever force-pushed the feat/bot-sessions-hidden-by-default branch from d63cd6e to 7fed4da Compare November 16, 2026 01:34
@iamwhatever

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in test/test_wakatime_handlers.py (the inherited-red fix #37726) plus config and dashboard files this PR sits beside (4372f48 -> c2f1b32); targeted tests pass locally; CI re-running.

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

@buluoray buluoray 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.

Approve on 7fed4da. The new head is a pure rebase of the commit I approved at d63cd6e. git range-diff shows the patch unchanged ("1: d63cd6e = 1: 7fed4da"), and the diff stat is the same: 57 files, +518/-301. It sits on 11 newer main commits, including #37726, which fixed the wakatime flake that turned shard 1 red last time. Main and this PR both touched only text files (locale catalogs, crew-mode.md, the RFC README, config-baseline.json), and they merge cleanly. None of the 11 main commits touch mate_root, show_sessions_in_list, crewModeView or list_view. The earlier findings stand unchanged. Ray decided the decision entry stands, because the repository owner (iamwhatever) asked for the change. He also decided that users who had the preview off need no migration and no notice. CI on this head is done: 85 success, 11 skipped, 0 failed, 0 running. All five AI review lanes reviewed this head and none blocks. Decisive lines: src/kiro_crew/crew_mode.py:497-499, src/kiro_crew/crew_mode.py:621-624, src/kiro_crew/dashboard/server_runtime/config_watch.py:304-311, src/kiro_crew/dashboard/agent_admin/crew_update.py:369-374, src/kiro_crew/config/sections_dashboard.py:61-67, website/src/lib/crewMode.ts:68-74, website/src/lib/crewMode.ts:292-293, website/src/store/dashboardSlice.ts:814-818, docs/decisions/2026-11-15-a-bots-sessions-leave-the-session-list-by-default.md

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 16, 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.

Hide Bot sessions from the session list by default, with a per-Bot switch to show them

2 participants