Repository navigation
feat(dashboard): put an open side panel in the segment opposite the transcript beside a fold - #38238
jeeshofone wants to merge 2 commits into
Conversation
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: every rule is gated on a reported fold, the stored dock, pin and list width are read but never written, and screenshots plus a recording of this revision are attached. Notes
[DESIGN-REVIEWED] 5b8e806 Description read[DESCRIPTION-READ] 1f489343712b22c77058ad845aeec2fec2edd9d3edb797fb5e3eb65701698b4d 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 |
First Principles Review (Opus 5.5, fork) — 🔴 BLOCKPremise-level review of First-Principles-Verdict: BLOCK product-shape change without accepted RFC: on unflagged Chrome 138+ foldables this changes where an open side panel goes and takes away the dock toggle, resize handle and preview expand. The only decision cited, What this change shipsInventory (8 items) — 7 justifiedIntent: on a half-open book-style foldable, show the chat and an open side panel side by side instead of the panel replacing the chat. ADDITION.
Blockersproduct-shape change without accepted RFC — Items 1–3 [FIRST-PRINCIPLES-REVIEWED] 5b8e806 Description read[DESCRIPTION-READ] 2c9eb445c6274a9bcd69650b7ef089c65fc1716dc7d2846ee601264936004ba4 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. Screenshots cover the closed and open panel and both Preview states, and a recording covers the morph. This lane has no blind read; pushing the branch to this repository gets one. Notes
[UX-REVIEWED] 5b8e806 Description read[DESCRIPTION-READ] a7730a2c035b6a667a75a960fa447942fffd1dfc63c7769509701d7a4f3229ba 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 |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
4f48c6d to
d6afe44
Compare
|
Rebased onto current Why: on 4f48c6d the SAST (Semgrep) job reported five Nothing in either commit changed: |
d6afe44 to
ca1ed3d
Compare
|
Round 2, head ca1ed3d. #33546's commit is unchanged in the stack (range-diff Opus 5.5, BLOCKING GPT 6.1, F2 ( GPT 6.1, F1 ( UX, recording of the transcript moving between halves and of the sessions toggle with the panel open. Attached to the description (https://github.com/user-attachments/assets/a9488836-f216-45ff-adc7-a2458da22cc9): a recording with the fold emulated in Chromium (CDP display features, the same harness as the Playwright spec) at the iPhone Duo's 951 by 537 book pose. It shows Changes opening and closing, the same with reduced motion on (the panes snap), and the sessions toggle with the panel open (the panel closes and the list returns). The simulator's console was unavailable for a capture on the device itself; that recording follows as a comment. The hover-tip note on the rail toggle is about First Principles, BLOCK on the premise (product-shape change without an accepted RFC). Facts for the maintainers:
This cannot be cleared in code. It waits on the maintainers' ruling on the RFC, alongside #33546. First-pass check: R1-R8 OK. |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the careful fold work. One thing must be fixed on this head before it can move forward.
website/src/components/WebPreviewPanel.tsx:648: the preview toolbar's expand toggle is now wrapped in(!foldHoldsWidth || expanded). Beside a fold the toggle is hidden, and a preview that was already expanded keeps only Minimize. This is a user-visible control the PR changes, and nobody has seen it rendered. The UX review on this head says "cannot evaluate: missing the web preview toolbar in the fold layout". The two committed images (book-tab-panel-closed.png,book-tab-panel-open.png) both show the Changes tab, and the recording never opens a preview. Under the coverage rule indocs/ci/ci-and-reviews.md, a missing screenshot of a changed control is an evidence gap, so that review blocks. Smallest fix: add a book-pose screenshot with a Preview tab open and the expand toggle gone, plus one of a preview expanded before folding that still shows Minimize, undertemp-screenshots/fold-companion-pane/. Reference both in the body. No code change is needed.
Optional:
- This branch carries all of #33546. Please land #33546 first, then rebase so this diff is only the last commit. The design also waits on a maintainer's ruling on the draft fold-layout RFC, as you noted.
- A test where the preview is already expanded when the fold layout appears, asserting that Minimize stays, would pin the
expandedhalf of the condition. - The body says the Home Screen web-app capture will follow as a comment, and that comment has not been posted yet.
ca1ed3d to
033a208
Compare
|
@KiroCrewCaptain, answering your review of ca1ed3d (CHANGES_REQUESTED, 17 Nov 08:01 UTC). New head: 033a208. Required (
Both rules sit behind the fold gate: the toggle is hidden only while the companion layout holds, and that layout needs a reported fold, which no shipping browser reports without its feature flag. With no fold the toolbar is unchanged. The simulator's console is still locked, so these were taken in Chromium with CDP fold emulation at the iPhone Duo's 951 by 537 book pose, as the recording was. Taking the second capture found a real defect, fixed in the same commit. In the render a fold arrived, Optional, a test with the preview already expanded when the fold layout appears: taken. Optional, land #33546 first and rebase: declined for now. #33546 waits on the maintainers' own ruling on its fold-at-640 precedence rule, so this branch stays stacked; only the last commit is this PR's. It will be rebased onto Optional, the Home Screen web-app capture: still owed. The rig's console is locked, so the capture is blocked. It follows as a comment once the console is available. Please take another look when you have a moment. |
…sion list ending at the fold
a42f383 to
e993585
Compare
|
Restacked on #33546's 41ee2fd after main moved. Main's #23215 moved the touch Return rule into |
|
Thanks for the steady follow-up. I checked the earlier review items on this head (e993585):
This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here. To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/). The decision is The review found no correctness or security defect in this PR's own commit. The fold overrides read the stored dock, pin and width and never write them, so flattening the device restores the earlier layout. Optional:
|
e993585 to
61151d0
Compare
|
Correction: my 20 Nov restack note pointed the design decision at #39436, which is a different RFC. The decision for this PR is RFC #33463, On head 61151d0:
|
|
Thanks for the 20 Nov follow-up. I checked my earlier review items on this head (61151d0):
From my last comment, the body now names #33463 as the decision and says the dock lock holds on any route. It also has a This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here. To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/). Review result: this PR's own commit has no correctness or security defect. Every fold rule checks for a reported fold first. The dock, pin and width overrides read what is stored and never write it, so flattening the device brings back the earlier layout. The new tests wait on signals and never sleep. The Playwright spec binds port 0 and checks real pane geometry for three fold shapes. The merge order is still #33463, then #33546, then this PR. Optional:
|
61151d0 to
e8383fb
Compare
|
Follow-up to @KiroCrewCaptain's review. The new head is e8383fb, restacked on #33546's 41ee2fd.
The design decision is still the maintainers' on RFC #33463 ( |
|
Thanks for the 21 Nov follow-up. I checked my earlier review items on this head (e8383fb):
This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here. To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/). Review result: this PR's own commit has no correctness or security defect. Every fold rule checks for a reported fold first. The dock, pin and width overrides read what is stored and never write it, so flattening the device brings back the earlier layout. The edit box now follows the same Return rule as the composer. The merge order is still #33463, then #33546, then this PR, and this head should be rebased to its last commit once #33546 lands. For the maintainer's decision: the phone composer form ( Optional:
|
|
Follow-up to @KiroCrewCaptain's review. Round 24 changes only tests, the fold helper and the body; there is no production-code change.
The design decision is still the maintainers' on RFC #33463 ( |
|
Thanks for round 24. I checked this head (2641a70). One item needs a maintainer, and one item is a strong recommendation. Earlier review items, checked on this head:
Review result: this PR's own commit has no correctness or security defect. Every fold rule checks for a reported fold first. The dock, pin and width overrides read what is stored and never write it, so flattening the device brings back the earlier layout. The merge order is still #33463, then #33546, then this PR. Rebase to the last commit once #33546 lands. Optional:
|
…ranscript beside a fold On a book-style foldable held half open, the chat page has three panes and two segments. The transcript always holds one segment. An open side panel takes the other at that segment's reported width, and the sessions list steps aside without its pin changing. With the panel closed, the sessions list and the transcript split at the fold as before. While a fold is reported the panel never fills the chat column, docks right without writing the stored dock, and is placed with no width reveal. The transcript and composer move between segments inside the existing view transition, which snaps under reduced motion. The rail stays compact so the transcript keeps its minimum, a reported hinge gap is kept clear before the panel, the preview's expand toggle is not offered (an expanded preview keeps Collapse), and asking for the sessions list closes the panel. The render a fold arrives in already shows the new layout, so an open panel is never drawn hidden. The panel picks its host from the form the device would have without a fold, as of useIsMobile's last commit. A touch-first phone takes the desktop form when folded, and its panel stays inline instead of moving to the shell's column, so folding and unfolding keep the same panel and every live frame in it. Pane widths beside a fold are each segment's part inside the shell's safe-area box, so a safe-area inset never pushes a pane across the hinge. The fold-aware layout RFC records the allocation and the rejected alternative. With no fold reported nothing changes. Part of kirodotdev#29143
|
Follow-up to @KiroCrewCaptain's review. Round 25 removes the phone composer form.
The design decision is still the maintainers' on RFC #33463 ( |
|
On the First Principles review's product-shape item: round 25 removes the send-key half. The phone composer form beside a fold is gone. The The remaining fold rules (the panel in the trailing segment, the dock drawn right, no resize handle or preview expand beside the fold) are still for the maintainers to decide on RFC #33463 ( |
|
This changes behaviour users already rely on, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here. To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/). Earlier review items, checked on this head (5b8e806):
Review result: this head has no correctness or security defect. Every fold rule checks for a reported fold first. The dock, pin and list width are read and never written, so flattening the device brings back the earlier layout. The Playwright spec checks real pane geometry in LTR, RTL and with a hinge gap. The merge order is still #33463, then #33546, then this PR. The second of #40358 and this stack to merge will need to pass the fold width into the single kept Optional:
|
|
Follow-up to @KiroCrewCaptain's review. The head is unchanged; this round edits only the body.
The design decision is still the maintainers' on RFC #33463 ( |
Stacked on #33546 (head 41ee2fd): review only the last commit. The diff includes #33546 until it merges. Merge order: #33463, #33546, this PR. The design decision is RFC #33463 (
rfc-foldable-viewport-segments.md,status: draft). A phone-width composer is deferred to the Phase 3 chat page split, keyed on width.Problem / Motivation
Goal: On a book-style foldable held half open, an open side panel takes the half of the screen opposite the chat, so the person sees the chat and the panel side by side.
With #33546 a folded iPhone Duo shows the list left and the chat right. An opened panel fills the chat column, so the chat is gone; a bottom dock crosses the fold.
Why it matters
On a phone you read what an agent produced while telling it what next. Half folded there are two halves for that; today the panel replaces the chat.
Not a goal
What changed (motivation → approach → change)
The RFC gains "Book pose with the side panel open" and Phase 3b. An open panel takes the segment opposite the transcript and the list steps aside. Every rule needs a reported fold; the layout rules also need the full chat page, while the dock lock holds on any route and width, as a bottom dock crosses the fold anywhere.
lib/foldCompanion.ts: the rule, the panel width and fold gap, the layout on screen from the render a fold arrives (useFoldCompanionLayout), and the flag the shell reads.page/sessionsDrawer.ts:sidebarOpenreads false while the layout shows. The stored pin is untouched.page/paneLayout.tsx,page/ChatSidePanels.tsx: the panel never fills the chat column; it takes the trailing segment's width (panelFoldWidth), with no width reveal, and keeps a reported fold gap clear (panelFoldInset, plus the 8px reclaim in RTL). Widths stay inside the safe-area box (segmentContentWidth).hooks/useSidePanelDock.ts,SidePanel.tsx: while folded the dock readsright, the storedmc-side-panel-dockis never written, and no dock toggle.lib/layoutFormTransition.ts,styles/layout-morph.css:runPaneAllocationChangemoves the transcript and composer inside the existing morph; the layout trails the store one render for the old snapshot; reduced motion snaps.shell/appShell.tsx,sidebarWidth.ts: the rail stays compact; the transcript keeps 320px. The safe-inset change tofoldSidebarWidth/foldHoldsRailCompact(feat(dashboard): add the fold-detection primitives from the foldable layout RFC #33546's split) is this PR's.WebPreviewPanel.tsx: no expand toggle, since the segment sets the width; an expanded preview keeps Collapse.messageActions.ts,sessionsDrawer.ts: the sessions toggle and a new reveal request close the panel and pin the list (foldYieldToList).panelInlineHost) is in feat(dashboard): add the fold-detection primitives from the foldable layout RFC #33546's commit; here the inline panel takes the trailing segment.Why not the panel in the leading segment: it would sit left of the chat (RFC alternatives).
Why a one-render lag: several store actions open the panel; one lag covers them.
Changed since review
Removed the phone composer form beside a fold (
foldPhoneFormApplies, thephoneFormprop and hook argument, the edit-box rule, their four test files and the RFC lines). The composer, the edit box and the send key are #33546's on every fold.Backwards compatibility
Every rule needs a reported fold. Chrome 138 and later report one on a book-style foldable without a flag, Android included; Safari needs its flags. With no fold, everything takes today's values.
Removes no value, key or path; the stored dock, pin and list width are read and kept. Take-aways for folded users: the dock toggle (a stored bottom dock is drawn at the right; both come back on unfold); with the panel open, the resize handle and the preview's expand control (back when the panel closes or on unfold) and the sessions list beside the panel (back when the panel closes).
Tests
src/test/foldCompanion.test.tsx: the rule; panel widths (tab, web app, RTL); fill suppressed, fold width and inset; the morph, the fold's first render, the touch-first sequence; the rail hold; reveals and the yield.src/test/ChatPage.foldAppFrame.test.tsx: folded, the sessions toggle and a folder reveal close the panel so the list comes back (each fails without its yield).src/test/App.foldRailHold.test.tsx: the real shell holds the rail compact with the panel open, not closed (fails withoutpaneMin).src/test/foldSafeInsets.test.tsx: a turn moving the inset re-sizes the list.src/test/sidePanelDockFoldLock.test.ts,sidePanelDockToggleFold.test.tsx: folded, the dock reads right, storage untouched, no dock toggle; flat, both return.src/lib/layoutFormTransition.test.ts: the morph's markers, the closing marker after the old snapshot, reduced motion and no API snap.src/test/WebPreviewPanel.test.tsx: the expand toggle with and without the layout; an expanded preview keeps Collapse.src/test/viewportSegmentsParity.test.ts: pins the closing rule to the fold two-pane query.playwright/fold-companion-pane.spec.ts,playwright/helpers/fold.ts(CDP fold emulation; fold and unfold polled up to 2 s;MIN_EXECUTED_SPECS257): meeting segments, a 20px hinge, RTL. Closed and open, each pane stays in its segment and nothing crosses the fold; a bottom dock stays stored. Fails with the rule off. A touch-first phone's Preview frame keeps its node, window and typed value across fold and unfold.Proof: not provable -- frontend test (prove.py runs Python only)
Real-machine verification
N/A -- no physical foldable here. The Phase 0 probe readings and test table are in RFC #33463. A local run of
playwright/fold-companion-pane.spec.tswas refused with 403 (no test token for this machine's gateway); CI run 44889049287 ran its 4 tests underMIN_EXECUTED_SPECS257 with no skips allowed.Manual verification
iPhone Duo simulator (iOS 27.2, Safari 27.2, flags on), demo data, book pose in a Safari tab, panel closed and open (shots below). The Preview shots use Chromium fold emulation.
Screenshots / video
Phase 3b's Home Screen capture is pending: there is no physical foldable here and the simulator rig's console is locked.
Recording (Chromium fold emulation, 951x537): Changes opens and closes, with reduced motion, then the sessions toggle.
book-pose-companion-pane.webm
Book pose, panel closed (the chat page split):
Book pose, panel open:
Book pose with a Preview tab open (Chromium fold emulation): the panel starts at the fold, with no expand toggle.
A preview expanded before folding, then folded: it keeps its Collapse control.
Related Issues
Part of #29143
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.