Repository navigation
refactor(ui): plan memory imports from owner receipts - #176729
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: 5f2974518d
ℹ️ 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".
| planRequest.cancel(); | ||
| } | ||
| onSettled(() => { | ||
| const stops = [gateway, agents, selection].map((source) => source.subscribe(syncPlan)); |
There was a problem hiding this comment.
Keep owner coordination in the reactive projection
Replace this manual subscribe/notify loop: the required Solid refactor checklist explicitly rejects manual subscriptions in views except for ordered event APIs, while these three inputs are already latest-value projections. The page now hand-maintains subscription teardown and synchronization outside Solid's tracked dependency lifecycle, making future dependencies easy to omit; express the plan identity as a tracked projection derivation/effect or move the coordination into an owner instead.
AGENTS.md reference: ui/AGENTS.md:L3-L5
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. What this changesThis PR drives memory-import planning directly from Gateway, roster, and agent-selection notifications instead of a reactive memo and effect. Example: Change the selected agent from research to writer while the research plan is pending.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open for a focused repair: its manual subscription loop violates the applicable Solid view policy. Priority: P3 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI memory-import page combines connection, roster, selection, and overwrite settings into Gateway planning requests, then renders plans and coordinates import confirmations. flowchart TD
A[Gateway connection] --> D[Memory import page]
B[Agent roster] --> D
C[Agent selection] --> D
D --> E[Page request owner]
E --> F[Gateway memory planner]
F --> G[Plan and confirmation UI]
Technical reviewBest possible solution: Keep equality-gated planning in the existing reactive projection lifecycle and retain createPageRequest as the cancellation owner. Do we have a high-confidence way to reproduce the issue? No broken user workflow is reported; source inspection establishes the introduced policy violation without claiming a runtime reproduction. Is this the best way to solve the issue? Removing an effect does not simplify ownership when it replaces tracked dependencies with manual subscriptions and a second request-identity tuple. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 87425ef92707. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +9, Tests +54. Total +63 across 2 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 18, 2026, 9:26 PM ET / October 19, 2026, 01:26 UTC. |
5f29745 to
960599c
Compare
960599c to
be2868d
Compare
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
What Problem This Solves
Memory Import planning still mirrors owner receipts through a reactive effect.
User Impact
Existing import, reconnect, cancellation and retry behavior is preserved.
Why This Change Was Made
Memory Import planning now consumes the existing Gateway, roster and selection projection notifications from one settled subscription lifetime. A six-field request identity suppresses redundant plans and preserves errors until explicit Refresh. Replace Existing requests its new plan directly.
The refresh preserves main's reconnect contract from #174059: client, connection state, admin access, agent, overwrite and presentation scope remain separate identity facts. Same-client reconnects retain drafts, selections, previews and confirmations; identity or access loss retires protected state. The existing cancellation, same-turn admission, attempted import keys and backfill retirement remain with their owners. Markup, CSS, selectors and the lazy route are unchanged.
Evidence
Exact head:
be2868dda8258350799e047382023254bf40342d. Base:42c86b2ca5ab65f800b36a96513e0349a0e178f5.pnpm tsgo:uipnpm deadcode:knipgit diff --checkThe focused file covers cold offline load, same-client reconnect preservation, account/recovery identity retirement, late replies, repeated owner notifications, overwrite plans, failure retry, import idempotency, same-turn admission and backfill behavior. It emitted no Solid strict diagnostics; the output contained the existing Vite JSON-import warning and SQLite retirement notice. Lint completed normal package declaration preparation without intervention.
No build, local E2E or screenshot run was added during this refresh: the authored change does not alter boot, rendered DOM, styles or the lazy boundary. Exact-head full PR CI completed; details below.
Pattern and size
createEffectcreateRenderEffect,untrack, listeners, queries, manual class assembly,flush, owner escapesNo measured survivors in the changed production file. Production: 610 → 620 lines (+10); tests: 826 → 880 (+54); two files, 90 insertions and 26 deletions. The production increase is the subscription lifetime and minimum previous-request tuple. No new shared helper, copied reactive owner state, dependency, configuration or schema was added.
Main integration and prior CI
This is a single-commit refresh of prior head
960599c0a6ff1c8e6338a21cc6c8026033bccaadonto current main. #174059 changed both task files, so the conflict was resolved around its reconnect semantics and both files received fresh proof. Main's retirement/access-loss block is byte-identical in the result. Of 27 previously recorded source/context blobs, 22 remain identical and five changed; prior test/review results remain historical rather than being reused for the changed input.CI 39199208312 failed
Control UI pasted text chips > restores pasted text directly from the 390px composeron prior head960599. The composer retainedKeep this draftafter keyboard activation. One diagnostic attempt passed the original assertions and did not reproduce the failure; it established no repair. No matching-name baseline failure or inherited-failure qualification is claimed.The refreshed base includes #176719 (
0a0cd892c26), which keeps the restore button mounted across attachment refreshes and strengthens that exact test with a background session update between focus and Enter. This concrete landed change warrants fresh CI; it does not establish the cause or repair of the recorded failure. The exact test now passes on refreshed-head CI; no retrospective causal fix claim is made.Exact-head CI and inherited performance failure
CI39213544722, attempt1, tested merge
1a18059590abover main4278e94e48b2: all UI unit tests, all nine UI E2E shards, both real-Gateway shards, types, lint and security passed. The prior 390px pasted-text restore case passed in1,608 ms. Onlycontrol-ui-performanceand its downstream gate failed.The observed
new boot JS gzipmetric is1,050,257 B at the CI base and1,050,274 B at the tested merge (+17 B), both above the unchanged1,050,000 B absolute cap. Startup is337,186 B gzip, seven JS requests and one CSS request (38,500 B). Chat boot is1,485,614→1,485,630 B. The strict checker separately fails retained authored-base42c86b2ca5abfor this same metric at1,051,123 B. This qualifies an inherited absolute-threshold failure, not a passing strict gate or equivalent complete bundles. The native inherited-failure route is requested with exact run, merge, job and artifact evidence. No budget changes.