Repository navigation
refactor(ui): separate sidebar filter state from view lifecycle - #174352
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: 92eb4edff6
ℹ️ 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 { appSidebarProperties, type AppSidebarProps } from "./app-sidebar-base.ts"; | ||
| import { AppSidebarOwner } from "./app-sidebar-owner.tsx"; | ||
| import { createSessionPullRequestIndicators } from "./app-sidebar-session-pr-indicators.ts"; | ||
| import { createSessionOwnerFilterQuery } from "./session-owner-filter.ts"; |
There was a problem hiding this comment.
Regenerate the boot-module manifest after renaming modules
This import now uses session-owner-filter.ts, and the same commit renames the empty-groups module, but ui/config/control-ui-boot-modules.json still lists only the deleted session-owner-filter-controller.ts and sidebar-empty-groups-controller.ts paths. Because control-ui-chunking.ts matches exact repo-relative module IDs, neither replacement is assigned to the recorded shared boot group, so production builds can partition/preload these startup modules differently from the measured route capture. Run pnpm ui:boot-manifest:gen and commit the regenerated manifest.
AGENTS.md reference: ui/AGENTS.md:L79-L82
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. What this changesThis PR separates synchronous sidebar filter preferences from Solid-owned asynchronous query observation. Example: Ada reloads with owner-bob selected, then changes to Involving me.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 2 items remain Keep open: this maintainer-directed refactor completes a useful lifecycle separation, but the renamed startup modules leave generated boot metadata stale. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI sidebar combines browser-local preferences, authenticated identity, and session owner facets into session-list queries; the session capability retains request admission and returned-row ownership. flowchart LR
A[Browser preferences] --> B[Synchronous filter owners]
C[Gateway identity and owner facets] --> B
B --> D[Solid query observer]
D --> E[Session capability]
E --> F[Sidebar session rows]
Technical reviewBest possible solution: Complete the lifecycle cutover with regenerated boot metadata while preserving preference serialization, complete owner facets, and existing request admission. Do we have a high-confidence way to reproduce the issue? Source inspection confirms that both deleted module paths remain in the boot inventory and their replacements are absent; no builds or tests were run during this read-only review. Is this the best way to solve the issue? The synchronous preference owners and component-scoped observer fit the existing ownership contract, but the module rename needs its generated inventory updated. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5aec20581650. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -12, Tests +16. Total +4 across 9 files. Added test files: 0. View PR surface stats
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 16, 2026, 11:50 AM ET / 15:50 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
* commit '14e993fff3ecb84eb1d7c9724c4ceda235d797e4': (110 commits) fix(decisions): align accounting ratchet evidence feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) ...
* commit '0c6c7ee5837ed93f6fb09ca58b280e76878c21f1': (109 commits) feat(memory): activate PostgreSQL memory search and lifecycle (#174374) fix: join process shutdown and isolate runtime fixtures (#174359) refactor(ui): scope native gateway observation to Solid (#174367) refactor(ui): own canvas widget lifetime in Solid (#174370) perf(control-ui): keep agent avatar faces stable across agent publications (#174239) perf(models): release unused account catalog instructions (#174361) refactor(ui): own composer command menus in Solid stores (#174321) refactor(ui): separate sidebar filter state from view lifecycle (#174352) test(release): make artifact qualification deadlines deterministic fix(codex): preserve sandboxed process inspection and setup errors (#174284) fix(gateway): stop worker processes before draining their queues (#174312) refactor(agents): reuse prepared tool facts (#174349) test(gateway,plugins,ui): remove low-value tests (batch d174) (#174331) refactor(ui): replace MCP retirement host adapters with a factory (#174375) refactor(logging): remove redundant native success traces (#174330) refactor(test): remove dead control-plane fixture branches (#174377) refactor(mcp): remove test-only session runtime seams (#174347) feat(matrix): account-root state databases follow the selected engine (#174315) refactor(discord): collapse private interaction and factory seams (#174322) refactor(feishu): reuse streaming merge in dispatcher tests (#174371) ...
…claw#174352) * refactor(ui): scope sidebar filter refreshes to Solid * fix(ui): isolate sidebar filter request admission
What Problem This Solves
Sidebar owner filtering couples synchronous saved preferences and asynchronous query refreshes to view-controller lifecycle methods. Empty-group preferences also carry host registration despite having no DOM responsibility.
What Changed
Keep owner membership and empty-group preferences in synchronous domain owners. A component-owned query observer schedules refreshes and retires pending completion callbacks on disposal. Preferences are prepared before the first row query; explicit filter actions still refresh immediately, while automatic repairs use the scheduled path. The two old controller classes and their registrations are removed.
Tags, classes, routes, complete owner facets, user scoping, and lazy boundaries are unchanged. The remaining sidebar adapter is being migrated separately; it is not treated as a domain-owner exemption.
Evidence
117054643936passed: startup JS 339,556 B gzip / 7 requests; CSS 38,786 B gzip / 1 requestci:fullrun38924946758: 36 successful, 3 failed, 26 skipped jobs; source-unrelated failure attribution belowRepaired head:
92eb4edff685dcb5116278f9468d8be6c97bab7d. Merge base:399b740ce0412ccf34b41fb8e7dca7ddb6ad0a68. CI tested mergec66c9d17355ab076dc4d1657eb6f018d7f659599against main parent23a569674bca84b34e3e591a75a7cd6150e72d31. The initial-startup head total remains below the 374,285 B campaign budget, with one CSS request. Earlier local startup measurements are retained as prior-head evidence.createEffectcreateRenderEffectuntrackflushThe additional effect coordinates the external session-list request and settled owner-facet validation formerly driven by host updates; it does not copy owner state. Test LOC grows by 16. The latest main merge only relocated imports in the two deleted controller paths; those deletions were retained.
CI repair
The first
ci:fullrun exposed two failures inapp-sidebar.catalog-events.test.ts:paces busy retries until exhaustedandkeeps agent startup quiet past three minutes and surfaces a later inspection failure. Both came from a newSTRICT_READ_UNTRACKEDwarning: imperative request admission reread the reactive sidebar mode from the filter effect callback. The effect already captures the query dependencies in its compute phase; request admission now uses an explicit untracked snapshot without changing synchronous filtering or retry ownership.The exact file reproduced both failures before the repair (6 passed, 2 failed), then passed all 8 cases after the repair. The warning assertions are unchanged. UI types, production Knip, and native targeted lint passed on the repaired candidate. The final one-file lint completed declaration preparation; the earlier timeout remains prior-attempt evidence. Independent P0–P2 review of the repair was scoped-clean (confidence 0.86), using the delta plus full caller and test context; the unchanged surrounding filter implementation retains the earlier full-change review.
Repaired-head CI attribution
The repaired head is
92eb4edff685dcb5116278f9468d8be6c97bab7d, tested by run38924946758at mergec66c9d17355ab076dc4d1657eb6f018d7f659599. The original two sidebar catalog warning failures were fixed; their exact file now passes all eight cases without weakened assertions.The remaining named failures are below. Every case passes on scheduled main run
38924503696, whose UI shard uses Node; this PR run uses Bun. This is source-unrelated evidence, not matching inherited failures. The runtime difference is observed, not an established cause.117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > joins scenario cleanup or retires the unsafe fork and retains its state: scenario-timeout117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > joins scenario cleanup or retires the unsafe fork and retains its state: scenario-noncooperative117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > joins scenario cleanup or retires the unsafe fork and retains its state: scenario-late-close117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > joins scenario cleanup or retires the unsafe fork and retains its state: scenario-close-failure117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > owns shared state through native suite cleanup: resources-success117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > owns shared state through native suite cleanup: resources-close-failure117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > owns shared state through native suite cleanup: resources-late-setup117054643818[unit] src/test-helpers/control-ui-e2e-suite.test.ts > owns shared state through native suite cleanup: resources-browser-failure117054644764[unit-mock-registry] src/pages/chat/chat-pane-tool-icons.test.tsx > renders plugin artwork for accepted history absent from the capped session listThe first eight failures belong to a native lifecycle fixture that mocks Playwright and supplies a synthetic server; it does not mount the changed sidebar or real application. The tool-icon case directly mounts
ChatPaneView, without AppSidebar. All 30 relevant source blob/tree objects are identical between the actual CI main parent and tested merge. The tool-icon case also passed once locally; that pass does not establish flakiness. The underlying timeout or timing causes remain unknown.The tested merge has ordered parents
23a569674bca84b34e3e591a75a7cd6150e72d31and the repaired head, and its tree matches a local merge reconstruction. UI types, native one-file lint, production Knip, focused catalog behavior and independent review pass on the repaired source. The completed run contains 65 jobs: 36 succeeded, 3 failed, and 26 were skipped. Only UI shards 1 and 3 and their downstreamopenclaw/ci-gateaggregate failed. Security-fast and the paired build/performance job passed. Native admin admission is requested for the two source-unrelated failure boundaries above; their underlying causes remain unknown.