Repository navigation
fix(ui): preserve Daybreak choices across chats - #184785
vyctorbrzezowski wants to merge 6 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
8c32e80 to
d12b074
Compare
c4ea54b to
40e006a
Compare
d12b074 to
248b6d4
Compare
40e006a to
3cd359a
Compare
cb73ebc to
9f3642a
Compare
|
Codex review: blocked before merge. What this changesThis PR remembers authenticated users’ Daybreak choices across chats and aligns catalog defaults with runtime Access parameters. Example: An authenticated user selects Daybreak Red, reloads the chat, then starts another chat for agent main.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open: it addresses a real preference-persistence gap, but introduces native-runtime compatibility, Access recovery, and typing-work regressions. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe Control UI stores agent-scoped choices through the existing authenticated preference owner; model catalogs supply runtime defaults, and runtime plans translate selections into provider request parameters. flowchart LR
A[Chat and New Session controls] --> B[Authenticated preference owner]
B --> C[Draft selection]
D[Model catalog defaults] --> C
C --> E[Session settings]
E --> F[Runtime plan]
F --> G[Provider or native runtime]
Technical reviewBest possible solution: Keep the existing preference owners, resolve Access without constructing UI props, preserve recovery without a usable catalog, and respect disabled native forwarding. Do we have a high-confidence way to reproduce the issue? The base preference codecs and creation payload omit Access selections, establishing the reported persistence gap from source; this read-only review did not execute a reproduction. Is this the best way to solve the issue? Extending the existing authenticated preference owner is appropriate, but the submission accessor should read domain state directly and the default and recovery paths must preserve supported native settings. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e923309c2978. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +499, Tests +311. Total +810 across 43 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 26, 2026, 2:10 PM ET / 18:10 UTC. |
113d5ba to
1f9025e
Compare
61bb55a to
629d5ec
Compare
|
Continued in #185039. GitHub automatically closed this PR when the stacked base branch was merged and deleted, then refused reopening after the source branch was rebased. The replacement targets main and preserves the implementation and visual evidence, with the verified integration-test repairs. |
What Problem This Solves
Fixes lost Access choices when creating or reopening a chat, including drafts that use configured model defaults.
User Impact
Daybreak has a toggle with the Blue and Red choices available to the selected account. Turning it off selects Standard; turning it back on restores the last permitted Daybreak choice. A first submission without a previous choice or configured default explicitly uses Standard, including existing conversations whose Access setting has never been saved.
Why This Change Was Made
The session keeps its own Access selection. Authenticated user preferences remember the latest choice and the last Daybreak choice for each agent, independently of model-default policy. Changing effort before preferences finish loading preserves the saved Access choice. The model catalog and runtime request preparation share the same configured Access or Standard baseline, separately from account entitlements. Unknown entitlement metadata is not treated as a confirmed loss of access and does not prevent returning to Standard. Explicit empty Access configuration retains its existing inheritance behavior. Shared browser preferences do not transfer Access choices between people.
The existing preference owner and codecs use shared boot assets, without importing New Session setup or catalog UI into chat startup. The control uses the shared disclosure motion and keeps the menu anchored while expanding upward. Its additional height applies only when Access is present. The shared disclosure-motion module matches #184466 so both controls use one motion definition.
Evidence
After integrating the landed composer controls, all 31 tests across the attachment menu, media picker, pointer activation and prompt-attachment suites pass. The tests retain safe-area, activation, focus, growth and overflow checks without fixing obsolete labels or scrollbar styling.
Updated branch
72dcf32passes 49 focused UI tests, 12 affected browser E2E cases, six extra-parameter tests, the affected test typechecks, core and Control UI typechecks, changed-file lint/format, and the production Control UI build. The existing typing test reproduces three unnecessary model-control preparations before the repair and none afterward.E2E repairs exercise the approved Daybreak switch and preserve entitlement, revocation, selection and authenticated-preference assertions. They advertise the session mutation method and retain the actual created session across a mock-page reload. No new tests were added.
Review confirmed that unsent draft recovery is isolated by the authenticated Gateway recovery scope and route. It does not write Access into shared browser-origin preferences; accepted submission retires the draft selection.
The OpenAI route and Access catalog suites passed all 14 cases after updating the expected known default while preserving strict omission checks for unobserved route metadata.
All 33 tests across the five Access catalog, extra-parameter, runtime-plan, Gateway model-list, and prompt-prefix-stability files passed on macOS arm64 at
9f3642ausing the repository's serial test wrapper.pnpm ui:check-performance:base 3cd359apassed on macOS arm64 for9f3642a, with all existing budgets unchanged: chat loads 20 JavaScript and 3 CSS assets, with 1,241,589 bytes of compressed JavaScript (limit: 1,274,861). Startup stays at 5 JavaScript/1 CSS assets; new-session stays at 17 JavaScript/3 CSS assets.124 focused preference, migration, submission, catalog, model-control, and chat tests passed. The static dependency graph no longer reaches the New Session setup or route-controls packages through the preference owner.
Seven Chromium tests passed, including remembered Daybreak choices and recovery when entitlement metadata is absent.
The application against a mocked Gateway sent Standard on first creation, saved Red from the chat, retained Red after reload, restored it in a new draft and sent Red on the next creation. The menu bottom remained fixed during expansion.
A real HTTP request through the runtime plan, provider wrapper and SDK used a local synthetic endpoint. The previous resolver omitted
access_programs; the fix sent Standard with no selection, preserved configured Blue and explicit Red, and preserved explicit Standard over configured Blue.A direct runtime-plan probe passed for both runtime routes. Native parameter projection was checked separately; the native runtime itself was not executed.
Risk and coverage
CI is running on the updated main-based branch. The prior run also exposed an inherited Codex containment-diagnostic expectation: #184901 added a model-visible recovery hint, while its unchanged test still expects the old complete string. That unrelated implementation and test are not modified here. A full local build currently stops in unchanged
llm-coredeclaration generation:Promise.withResolversis compiled with an ES2023 library target. Its source, build configuration and lockfile match the parent; this repair does not change them. The HTTP proof used a synthetic endpoint; no native runtime binary or live provider account was exercised.Visual validation
Before and after use the same content, theme, viewport, and state.
Expand, select, collapse, and restore Daybreak
daybreak-expansion-final.mp4