Repository navigation
fix(ultra-mode): keep a chat's side panel tab and collapsed state on a return - #35606
Conversation
UX Review (Opus 5.5) — ✅ PASSUX-level review of 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of 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 shipsInventory (3 items) — 3 justifiedIntent: 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.
[FIRST-PRINCIPLES-REVIEWED] d8aa186 Description read[DESCRIPTION-READ] 22cb85362b1bd2598ebb7f9904600bb7b24a038110d91a19b0e8820ba3753549 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 fix reuses the chat's existing saved panel state as the "first entry" marker, so the change can be reverted in one line. Notes
[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 |
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: |
buluoray
left a comment
There was a problem hiding this comment.
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
|
The two red Windows shards on head d8aa186 are main's, not this PR's: 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. |
Pull request was closed
Pull request was closed
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
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.
hasSavedActivityOpenis the one new read of that saved choice. It lives instore/chat/state.tsbeside the writer and is re-exported from thechatSlicefacade, 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.tsxadds 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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)