Repository navigation
refactor(ui): inline sidebar presentation owners - #177887
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5f76efe57e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| import { hasSameOriginGatewayTransport } from "../dev-gateway.ts"; | ||
| import { normalizeAgentLabel, resolveAgentTextAvatar } from "../lib/agents/display.ts"; | ||
| import { resolveAgentAvatarUrl } from "../lib/avatar.ts"; | ||
| import { createIdentityAvatars } from "../lib/identity-avatar-loader.ts"; |
There was a problem hiding this comment.
Regenerate the boot-module manifest after inlining
This moves the agent-card implementation into an existing boot-path module without regenerating ui/config/control-ui-boot-modules.json, which still lists the deleted ui/src/components/sidebar-agent-card.tsx and ui/src/components/theme-mode-toggle.ts files. Because control-ui-chunking.ts consumes that generated capture to assign boot chunks, the checked-in manifest no longer represents the reachable module graph; run pnpm ui:boot-manifest:gen, commit its output, and verify with pnpm ui:build.
AGENTS.md reference: ui/AGENTS.md:L78-L79
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. What this changesThis PR inlines sidebar presentation layers and settings event handlers into their existing callers. Example: A settings save transitions from saving to saved with changes awaiting application.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored cleanup open; the refactor preserves the existing owners, but a redundant menu-role assignment causes a focused UI check to fail. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI sidebar consumes application owners and presentation props, renders navigation and settings controls, and forwards interactions to existing callbacks. flowchart LR
A[Application owners] --> B[Sidebar presentation]
B --> C[Solid components]
C --> D[Native controls]
D --> E[Existing action callbacks]
E --> A
Technical reviewBest possible solution: Remove the duplicate theme-toggle role assignment and retain the shared menu bindings as its existing owner. Do we have a high-confidence way to reproduce the issue? The exact-head CI annotation records the ownership assertion failure, and the changed literal role matches its source scanner; no target code was executed during this review. Is this the best way to solve the issue? Inlining single-caller layers is consistent with the completed Solid migration, and the retained conditional avatar component preserves its resource lifetime. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7988bf3bdc00. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource -130, Tests +16. Total -114 across 17 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 19, 2026, 8:54 PM ET / October 20, 2026, 00:54 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* refactor(ui): inline sidebar presentation owners * test(ui): drop retired theme bridge diagnostics * fix(ui): leave theme menu role with shared bindings * test(ui): open owner assignment proof through keyboard navigation
Sidebar and settings rendering passed through single-caller component and event-handler layers that repeated props and obscured the existing lifetime owners. Inline those layers into their callers, remove the three unused files, and retain the same rendered hosts, classes, routes and callbacks.
The agent card remains a local component beneath its existing
Show, so avatar loading and cleanup stay conditional. Save feedback retains its two-second saved interval, the theme toggle stays in the lazy identity menu, and native controls preserve rejected-change rollback, disabled behavior, reselection and RTL keyboard navigation. Current main’s directThemeBrandIconrenderer and removal of the unusedariaPressedoption are preserved. The remaining reductions inline single-caller toolbar/plugin-tab adapters and the settings-search predicate, and remove absent-context branches from the required-context owner.e417802; six tests 1,477 → 1,491 (+14); test helper unchangedpnpm tsgo:uipassedsettings-save-indicator.test.ts,settings-ui.browser.test.tsx,control-ui-environment.test.ts; each file once,--maxWorkers=1, default pinned runtimepnpm deadcode:knippassed24afcdf→ pre-integration head0830ea065d878b(92ca95e+d073ed4): 325,793 B startup JS gzip, 7 requests; 38,492 B CSS gzip, 1 request. Hosted check passed, with a separate 303.7 KiB Russian locale-budget advisory.ci:fullrun39361481358ond073ed4: 38 successful jobs, 24 skipped. Six E2E shards and the dependent CI aggregate fail; all 22 failed test names also fail on both completed scheduled main run39360046029(84e1848a) and the newer completed run39365230806(0244bb44), with zero PR-only failures. Native inherited-failure evidence records complete attempt 1.Visual proof compares base
ba61d5d995261fe6c919ab61b68bd30f7400acc6with production head5f76efe57e4cc5103de96643b2fc54d9390489b3; subsequent repairs remove two retired bridge fields from E2E failure diagnostics and one redundant literal role already supplied by the shared Menu. The verified production caller always supplies those bindings, so the rendered DOM remains identical and the visual proof is reused. Startup proof was refreshed separately after the main integration: one build and strict measurement each on base24afcdfebe8ea39e89ceb6b48e6a531fa48df8ddand pre-integration head0830ea0a3eb365bcac631d83cca62e83f28c420b. Both strict checks fail only the identical Russian locale-pair budget; neither has a startup violation. The bounded 1200×1400 gallery exercises initial/saved/apply/recovery states, theme cycling, rejected switch changes, row actions, disabled controls, radio keyboard navigation and RTL rejection. Both sides use exact source snapshots (including deleted modules on the before side), with no unlanded prerequisite code. All captures were inspected as synthetic-only. Both sides emit the same six existingSTRICT_READ_UNTRACKEDconsole warnings; these are recorded and are not page errors. The initial capture attempt failed at setup because deleted before-side imports needed snapshot resolution; the repaired harness completed both sides.Solid checklist on touched production: controllers 0→0; effects 2→2; render effects 0→0; untrack 0→0; listeners 0→0; DOM queries 0→0; manual classes 0→0; flush 0→0; memos 34→34. One unchanged domain
getOwnercall is not a Solid owner escape. No dependency, config option, new state owner or lazy boundary is introduced.Before/after screenshots below are ordered by initial, saved, apply, recovery, and controls. The first image in each pair is the base.
CI repairs: run
39348823465exposed obsolete.mode/.menuItemfailure diagnostics; those two reads are removed and the exact E2E type config passes. The complete job log from replacement run39353588468identified one UI unit failure:shared control ownership > keeps dialogs, menus, and tabs on shared primitives. The direct theme renderer had introduced a literalrole="menuitem"; the existingmenuAttributesspread already receives that same role from the shared Menu owner. Removing the duplicate preserves the rendered role without weakening the ownership guard. The exact ownership test (3 assertions), existing theme browser test (mode cycle), and UI typecheck pass; a fresh independent review found no issues. Initial abbreviated log/artifact inspection missed the named assertion; no inherited-failure or runner-timeout exemption is claimed.The same run had one E2E failure,
session-owner-assignment.e2e.test.ts > assigns named and self owners through one themed keyboard-accessible submenu: the submenu closed while the requested avatar was already loaded and decoded. The exact case passed once on the branch, its merge base, and CI’s main parent7902ff19a219ed5ec898497dc7a403fec10f70b5, so the cause of that closure is not established and no inherited-failure exemption is claimed. This keyboard/accessibility case now opens through the existing keyboard helper, keeping all avatar, paint, layout, assignment and keyboard assertions. Separate tests in the same file retain hover traversal coverage. The changed case passes in a single focused rerun. All other jobs in run39353588468, including both real-Gateway shards, passed.Integrated main
24afcdfebe8ea39e89ceb6b48e6a531fa48df8ddafter #177715 produced a real modify/delete conflict. The settings helper stays deleted; its now-retired option is also removed from the surviving Solid owner. Main’s direct brand renderer and simplified pressed-state expression are retained. UI types and the affected settings browser tests pass on the resolved candidate. Prior visual evidence is reused for unchanged behavior; startup was remeasured on the then-current24afcdf/0830ea0base/head. Production Knip and independent P0–P2 review also pass on the resolved candidate. No unlanded branch was merged.Native landing later found an import-cluster conflict with main
e4178022618ea6839e9b75fb74996fd41cd31952. Replacement headd073ed494ef86e5415b217d7f6caec25e4275851removes both retired imports, keeps main’s lazyPagescomponent, and retains the retired MCP JSX-interface removal. Root inspection and independent P0–P2 review found no issues; UI types, production Knip, and all three focused Pages/MCP-lifetime tests pass. The earlier paired startup and visual measurements retain their exact source provenance; no further local build or screenshot pass was run for this import-only resolution.Inherited CI: exact failed test names compared with scheduled main
The CI classifier supplied job-name-only attribution; the retained raw logs were compared by exact test name. A fresh check after scheduled main run
39365230806completed independently confirmed the same 22 names also fail there; no PR-only name appeared. Every name below fails on both PR run39361481358and scheduled main run39360046029. The test and Custodian owner source objects are identical in the scheduled main, actual CI base92ca95e, and tested merge65d878b. All other selected jobs, including both real-Gateway shards, passed. The earlier keyboard owner-assignment repair also passes in this final run.ui/src/e2e/custodian-auto-setup.e2e.test.ts > Custodian automatic AI setup > keeps the existing greeting when automatic setup is not advertisedui/src/e2e/custodian-auto-setup.e2e.test.ts > Custodian automatic AI setup > runs ChatGPT sign-in and refreshes setup (shared=false)ui/src/e2e/custodian-auto-setup.e2e.test.ts > Custodian automatic AI setup > runs ChatGPT sign-in and refreshes setup (shared=true)ui/src/e2e/custodian-auto-setup.e2e.test.ts > Custodian automatic AI setup > shows pending, preserves a failed choice, activates an alternative, and retains dismissalui/src/e2e/custodian-event-nudge.e2e.test.ts > Control UI custodian event nudge mocked Gateway E2E > does not reopen agent chat when a deferred setup reply arrives after exitui/src/e2e/custodian-event-nudge.e2e.test.ts > Control UI custodian event nudge mocked Gateway E2E > keeps a blocking startup error next to the composerui/src/e2e/custodian-event-nudge.e2e.test.ts > Control UI custodian event nudge mocked Gateway E2E > keeps event nudges out of sensitive wizard inputui/src/e2e/custodian-event-nudge.e2e.test.ts > Control UI custodian event nudge mocked Gateway E2E > keeps nudges out of a closed question and sends a parseable skip answerui/src/e2e/custodian-event-nudge.e2e.test.ts > Control UI custodian event nudge mocked Gateway E2E > renders rich wizard controls and sends typed answersui/src/e2e/custodian-event-nudge.e2e.test.ts > Control UI custodian event nudge mocked Gateway E2E > shows one consequential nudge and sends its canonical messageui/src/e2e/custodian-onboarding-locale.e2e.test.ts > Control UI onboarding locale > uses the selected Chinese UI locale for the onboarding welcome and keeps replies actionableui/src/e2e/model-setup-cancel.e2e.test.ts > Control UI first-run wizard cancellation ownership > requires an explicit activation review decision before first-run handoff (Yes)ui/src/e2e/model-setup-reconnect.e2e.test.ts > Control UI model setup same-client reconnect > retains clicked candidate first-run activation before refresh reconnectsui/src/e2e/model-setup-reconnect.e2e.test.ts > Control UI model setup same-client reconnect > retains manual first-run activation through restart during config refresh (reconnect)ui/src/e2e/model-setup-reconnect.e2e.test.ts > Control UI model setup same-client reconnect > retains manual first-run activation through restart during config refresh (reopen)ui/src/e2e/model-setup-reconnect.e2e.test.ts > Control UI model setup same-client reconnect > retains prepared model first-run activation before refresh reconnectsui/src/e2e/model-setup-reconnect.e2e.test.ts > Control UI model setup same-client reconnect > retains provider sign-in first-run activation before refresh reconnectsui/src/e2e/model-setup.e2e.test.ts > Control UI Model Setup mocked Gateway E2E > hands first-run model setup to the custodian in onboarding chromeui/src/e2e/update-triage.e2e.test.ts > Control UI update failure triage E2E > diagnoses only on demand even when session storage is deniedui/src/e2e/update-triage.e2e.test.ts > Control UI update failure triage E2E > diagnoses only on demand even when session storage is fullui/src/e2e/update-triage.e2e.test.ts > Control UI update failure triage E2E > requires a button press to diagnose a pre-ledger automatic failure without retrying the updateui/src/e2e/update-triage.e2e.test.ts > Control UI update failure triage E2E > requires a button press to diagnose a pre-ledger manual failure without retrying the update