Repository navigation
fix(ui): preserve Daybreak choices across chats - #185039
vyctorbrzezowski merged 7 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. |
|
Codex review: blocked before merge. What this changesThis PR remembers authenticated users’ Daybreak choices across chats and aligns displayed Access defaults with runtime requests. Example: An authenticated user selects Daybreak Red for agent main, reloads, and starts another chat.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it fixes a concrete preference-persistence gap, but native forwarding and saved-Access recovery regressions block merge. Priority: P2 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherControl UI preferences supply draft and session selections; model catalogs describe defaults and entitlements, and runtime plans prepare provider or native-runtime requests. flowchart LR
A[Chat controls] --> B[Authenticated preference owner]
B --> C[New Session draft]
D[Model catalog] --> C
C --> E[Session settings]
E --> F[Runtime plan]
F --> G[Provider or native runtime]
Technical reviewBest possible solution: Keep the existing preference owners while preserving native forwarding opt-outs and allowing saved Access to return to Standard without a usable model catalog. Do we have a high-confidence way to reproduce the issue? Base preference codecs and session-creation payloads omit Access, establishing the persistence gap from source; this read-only review ran no reproduction. Is this the best way to solve the issue? Extending the existing authenticated preference owner is appropriate, but automatic defaults and replacement recovery controls must preserve supported native settings and catalog-independent clearing. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0a35a93c1545. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +496, Tests +288. Total +784 across 49 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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, 5:37 PM ET / 21:37 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* fix(ui): preserve Daybreak choices across chats * fix(ui): preserve unknown Daybreak entitlement state * fix(runtime): align Access defaults with catalog * fix(ui): keep new-session setup out of chat boot * test(gateway): retain known Access defaults without route observations * fix(ui): prepare Daybreak settings without rebuilding controls * test(ui): align composer coverage with integrated controls
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 run40403374751 completed: all E2E, type and security jobs passed; the only failed job is the unchanged Codex diagnostic expectation described below. 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
Supersedes #184785, which GitHub closed when its stacked base branch was merged and deleted. The integrated branch could not reopen the closed PR.