Skip to content

fix(ultra-mode): keep a chat's side panel tab and collapsed state on a return - #35606

Merged
bolichen97 merged 1 commit into
mainfrom
feat/ultra-panel-remember-tab
Nov 12, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
feat/ultra-panel-remember-tab

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: An Ultra Mode chat opens its side panel on the Board only the first time; after that, coming back keeps the tab the person picked and keeps a collapsed panel collapsed.

With the Ultra Mode feature preview on, every return to an Ultra Mode chat on a desktop opens the side panel and puts the Board tab in front. A person who switched to Changes, or collapsed the panel, loses that choice each time they leave the chat and come back.

Why it matters

Everyone who uses Ultra Mode on a desktop has to re-pick their tab, or re-collapse the panel, on every visit to the chat. It reads as the panel ignoring them.

Not a goal

  • Changing what turning Ultra Mode on does: the press still opens the panel on the Board.
  • Changing phones: they still never auto-open the panel.
  • Changing plain (non Ultra Mode) chats, or the Keep side panel open setting.

What changed (motivation → approach → change)

Each chat already saves its own panel open or closed choice and its own tab strip with the tab in front. The effect that runs when an Ultra Mode chat is entered overrode both on every visit: it opened the panel and focused the Board.

That effect now runs only when the chat has no saved panel choice yet, which is its first entry. After that the chat's own saved state applies, so the picked tab stays in front and a collapsed panel stays collapsed.

Visit to an Ultra Mode chat (desktop) Before After
First entry panel opens on Board panel opens on Board
Return, person picked Changes Board in front Changes in front
Return, person collapsed the panel panel opens on Board panel stays collapsed
Phone, any visit no auto-open no auto-open

hasSavedActivityOpen is the one new read of that saved choice. It lives in store/chat/state.ts beside the writer and is re-exported from the chatSlice facade, with the facade's pinned-surface and ownership tests updated to list it.

Backwards compatibility

Compatible: nothing that works today stops working. A chat with no saved panel choice still auto-opens on the Board; an existing Ultra Mode chat that was auto-opened before already has a saved choice and now simply keeps it.

Removes nothing: no key, route, function or stored data is removed; the change only skips an automatic open.

Tests

website/src/pages/chat/page/crewModeSwitch.test.tsx adds two cases under "entering an Ultra Mode root": a chat whose saved choice is closed stays closed and the Board is not focused, and a chat whose saved choice is open does not get the Board focused over the picked tab. Both fail with the fix reverted and pass with it. The existing first-entry and phone cases still pass.

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

Manual verification

N/A - unit coverage sufficient: the change is one guard in one effect, and the saved per-chat panel state and tab strip it hands over to are the existing, already-tested restore paths.

Screenshots / video

Why no screenshot: no component, layout, style or string changes; only an automatic panel open is skipped on return visits.

Related Issues

Closes #35584

Sibling sweep

Swept: git grep -nE "openActivityPanel()" -- website/src/pages/chat website/src/components/crew
Sibling: website/src/pages/chat/page/crewModeSwitch.ts -- changed here
Sibling: website/src/pages/chat/page/paneLayout.tsx -- not affected -- the Git auto-open runs once per chat behind its own stored marker
Sibling: website/src/pages/chat/page/transcriptPins.ts -- not affected -- opens the panel only when the person pins a message

Pattern harvest

Not generalizable: one effect overrode per-chat state that the panel already saved; no other auto-open runs on every chat entry.

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

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 11, 2026 21:32
@bolichen97
bolichen97 requested a review from CrysisDeu November 11, 2026 21:32
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing to check. The diff adds or changes no control, string or layout. It only skips an automatic panel open when a chat has a saved choice, so the panel keeps states people already use.

[UX-REVIEWED] d8aa186

Description read

[DESCRIPTION-READ] 37f7060f64a00e6a3786d9fc58d4a6f2176b236267e8235f00d7369ae0318353

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

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of d8aa186468930d59bfca8ef2bd3d1351de67f467 — 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: a single guard stops the automatic re-open on return visits, and it reuses the per-chat saved panel choice that already exists. The defect is tracked as #35584.

What this change ships

Inventory (3 items) — 3 justified

Intent: a person returning to an Ultra Mode chat on a desktop keeps the tab they picked and keeps a collapsed panel collapsed. This is a FIX.

  1. Coming back to an Ultra Mode chat no longer opens the side panel or brings the Board tab to the front once the chat has a saved panel choice. — justified
  2. A new read of whether a chat has a saved panel choice (hasSavedActivityOpen), re-exported from the chatSlice facade. It has 1 consumer (crewModeSwitch.ts), and grepping mc-activity-open found no existing per-slot presence check. — justified
  3. The "entering an Ultra Mode root" tests now clear localStorage and turn the preview on before each case. — justified

[FIRST-PRINCIPLES-REVIEWED] d8aa186

Description read

[DESCRIPTION-READ] 22cb85362b1bd2598ebb7f9904600bb7b24a038110d91a19b0e8820ba3753549

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 11, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the fix reuses the chat's existing saved panel state as the "first entry" marker, so the change can be reverted in one line.

Notes

  • "First entry" now means the chat has no mc-activity-open:<slot> key. Any earlier panel toggle in that chat therefore counts as a visit. A plain chat that becomes Ultra Mode some way other than the turn-on press, such as a switch from another client, will not open on the Board. If that matters, a separate per-chat marker like the Git auto-open's would fix it.

[DESIGN-REVIEWED] d8aa186

Description read

[DESCRIPTION-READ] 85ffce454be0ea22374e87d17b1fcf0e776456ad3089d38c852c683385c67157

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 11, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] d8aa186

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

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

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] d8aa186

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

@bolichen97
bolichen97 enabled auto-merge (squash) November 11, 2026 21:48

@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 d8aa186. Before this change, every return to an Ultra Mode chat on a desktop opened the side panel and put the Board tab in front. A person who had picked another tab, or collapsed the panel, lost that choice on each visit. Now the automatic open runs only when the chat has no saved open or closed choice yet, which means its first entry. After that, the chat's own saved panel state and tab apply. The new check reads the same per-chat key (mc-activity-open:<chat>) that the panel's open, close and toggle actions already write, so one chat's state cannot reach another chat or another Bot. No stored data is removed or reinterpreted. Existing Ultra Mode chats already hold a saved choice from their earlier automatic opens, so they keep it. Removing the new check makes both new tests fail; with it, the three related test files pass (48 tests). No strings, layout or focus handling change. Decisive lines: website/src/pages/chat/page/crewModeSwitch.ts:105, website/src/store/chat/state.ts:43, website/src/pages/chat/page/crewModeSwitch.test.tsx:211-222

@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 11, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

The two red Windows shards on head d8aa186 are main's, not this PR's: test/test_wait_discipline_ratchet.py::test_the_scan_matches_known_sites and test/test_updates_handlers_facade.py::test_every_name_served_from_outside_the_family_is_visible_to_type_checkers fail the same way on main's push run https://github.com/kirodotdev/KiroCrew/actions/runs/43105640841 (this PR changes only website/src files).

Fixes in flight: #35614 (updates facade type-checking import) and #35625 (wait ceiling). Once both land, this PR rebases onto them and CI re-runs.

@bolichen97 bolichen97 closed this Nov 12, 2026
auto-merge was automatically disabled November 12, 2026 02:17

Pull request was closed

@bolichen97 bolichen97 reopened this Nov 12, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) November 12, 2026 02:17
@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 12, 2026
@bolichen97 bolichen97 closed this Nov 12, 2026
auto-merge was automatically disabled November 12, 2026 03:46

Pull request was closed

@bolichen97 bolichen97 reopened this Nov 12, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Nov 12, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) November 12, 2026 03:47
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Nov 12, 2026
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 12, 2026
@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 Nov 12, 2026
@bolichen97
bolichen97 merged commit 9dc068e into main Nov 12, 2026
393 of 399 checks passed
@bolichen97
bolichen97 deleted the feat/ultra-panel-remember-tab branch November 12, 2026 07:31
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 12, 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.

Ultra Mode: side panel reopens on Board every visit instead of keeping the chat's last tab or collapsed state

2 participants