Repository navigation
refactor: scope memory import loading and progress to its workspace - #180423
Conversation
Keep request admission, frozen import intent, idempotency keys, and stale-result checks in the existing synchronous owner. Present admitted reads and mutations through scoped Solid primitives, and show import rejection inside its retained confirmation dialog. Validation: targeted formatting, UI typecheck and lint, production Chromium loading/retry/rejection proof, and paired asset budget checks pass. Local Bun workers timed out before executing unit tests; ci:full must run the changed suites.
|
🦞👀 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: 6cb4e36807
ℹ️ 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".
| <Errored | ||
| fallback={(error) => ( | ||
| <div class="callout danger" role="alert"> | ||
| {formatUiError(error())} | ||
| </div> | ||
| )} |
There was a problem hiding this comment.
Reset the error boundary when retrying failed reads
After an initial plan request rejects, this Errored boundary switches permanently to its fallback because the fallback discards the provided reset callback. Clicking the still-visible Refresh button can issue and successfully complete another migrations.memory.plan request, but the provider list remains replaced by the original error until the page is remounted; switching agents has the same problem. The new preview boundary above has the equivalent failure after retrying a rejected preview. Connect the retry operations to each boundary's reset mechanism so a successful subsequent read can render.
Useful? React with 👍 / 👎.
|
Codex review: needs changes before merge. What this changesThis PR scopes Memory Import loading and progress to the active workspace and displays rejected imports inside their confirmation dialog. Example: Importing one Codex memory file fails with “Synthetic import response unavailable.”
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this maintainer-authored PR open: it provides a useful, focused presentation change that current main does not contain. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe Control UI Memory Import page consumes Gateway plans and backfill results, retains synchronous request admission and retry intent, and projects those outcomes into Solid loading, progress, and confirmation views. flowchart LR
A[Agent and Gateway selection] --> B[Synchronous import owner]
B --> C[Gateway memory RPCs]
C --> D[Accepted plans and results]
D --> E[Scoped Solid presentation]
E --> F[Import page and confirmation]
F --> B
Technical reviewBest possible solution: Retain the existing synchronous owner and scoped Solid adapters, and adapt the affected tests to await committed presentation without weakening their assertions. Do we have a high-confidence way to reproduce the issue? The base rendering places apply errors outside the retained confirmation, matching the supplied before screenshot; exact-head CI also records the two affected test failures, and no target code was executed during this review. Is this the best way to solve the issue? The change follows the established admitted-promise and scoped-action recipe while preserving request authority, idempotency, and stale-result checks; the pinned runtime does not support the earlier permanent-error-boundary finding. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2f2dc1efeb2a. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +157, Tests +62. Total +219 across 6 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 22, 2026, 4:11 AM ET / 08:11 UTC. |
|
Merged via squash auto-merge.
|
…penclaw#180423) * refactor: scope memory import loading and progress to its workspace Keep request admission, frozen import intent, idempotency keys, and stale-result checks in the existing synchronous owner. Present admitted reads and mutations through scoped Solid primitives, and show import rejection inside its retained confirmation dialog. Validation: targeted formatting, UI typecheck and lint, production Chromium loading/retry/rejection proof, and paired asset budget checks pass. Local Bun workers timed out before executing unit tests; ci:full must run the changed suites. * fix: retain settled memory import reads across notifications
What Problem This Solves
Memory import needs native Solid readiness and mutation feedback without allowing a pending request from a previous agent or connection to hold the next workspace's controls. Import failures also appeared behind the still-open confirmation dialog.
User Impact
Switching agents or reconnecting releases retired import/backfill progress. Completed plans, errors, and previews stay visible through repeated Gateway notifications and same-client reconnects. Failed imports keep their frozen retry intent and show the error inside the confirmation dialog.
Why This Change Was Made
The existing synchronous owner still admits requests, freezes idempotency keys, checks current authority, and records outcomes. Its projection supplies already-admitted promises to Solid loading/error boundaries; scoped optimistic actions present writes and retire independently of the request. No extra RPC, Gateway/config contract, or route loading change is introduced.
Evidence
Targeted formatting, UI typecheck, lint, production build, and the paired base/head startup-asset check pass. Direct Chromium proof against the production bundle covers cold loading, failed-plan refresh, held import, and rejected import with a readable confirmation error. Existing tests retain idempotent retry and stale-result coverage; the new regression covers switching agents before an import/backfill finishes.
The initial local Bun worker attempts did not execute tests. Full CI then identified two real retention regressions in the new async read adapters: a settled plan error and a completed backfill preview could briefly become pending again. The adapters now return settled owner state synchronously. The two original failed tests pass unchanged in a filtered local run, along with the existing rollback-error test (three passed); broad proof remains with
ci:full.The paired build keeps raw startup JS identical at 951,641 bytes and seven requests; shipped gzip differs by 30 bytes (316,219 → 316,249), within the 64-byte build-variance allowance. Chat/New route gzip changes are +57/+32 bytes; CSS is unchanged. No baseline was changed.
The change removes the handwritten revision signal. Production delta: +275/−108 lines (+167); tests: +68/−6 (+62). Growth supplies the scoped promise/action adapters and moves existing state declarations into a type-only module; it does not add another domain owner.