Repository navigation
refactor(ui): simplify MCP context presentation state - #174100
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. |
|
Codex review: needs maintainer review before merge. What this changesThe PR replaces manual MCP context revision tracking with a shared projection and stores pending removals in local Solid state. Example: Removing the “Hex bolt” attachment fails once, then succeeds on retry.
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep this PR open: it is a focused, maintainer-directed simplification, and source review found no actionable introduced defect. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI context strip reads connection-scoped MCP attachments, displays composer chips, and sends removal requests through the existing Gateway client. flowchart LR
A[MCP app updates] --> B[Shared context owner]
B --> C[Source projection]
C --> D[Composer context strip]
D --> E[Gateway removal request]
E --> B
D --> F[Local pending state]
Technical reviewBest possible solution: Retain this focused projection refactor and land it when the existing required CI gate permits. Do we have a high-confidence way to reproduce the issue? This PR claims a behavior-preserving refactor rather than a current product defect; no target code or tests were executed during this read-only review. Is this the best way to solve the issue? Using the existing projection adapter and a local presentation store removes duplicated bookkeeping without transferring Gateway authority or changing public behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c72336d390c0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -2, Tests +12. Total +10 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 16, 2026, 6:29 AM ET / 10:29 UTC. |
|
Merged via squash.
|
What Problem This Solves
The MCP context strip maintained a revision signal beside the shared context owner and copied its pending-removal Set on every update. It now consumes that owner through
projectSourceand keeps pending view IDs in a local Solid store. Gateway request admission, stale-response checks, and context publication remain with the existing owners.User Impact
This is an internal UI refactor. Context removal, error recovery, and rendered markup remain unchanged.
Why This Change Was Made
The subscription is scoped to client, session, and agent. Replacing the scope disposes the previous projection. Post-await checks no longer use redundant
untrackcalls; the Gateway event boundary deliberately remains untracked. The existing removal test now covers a failed request re-enabling its button, followed by a successful idempotent retry.Evidence
git diff --checkpassedci:fullChecklist metrics for the touched production file, against
e8cc6196dc8051fe0115a5d118761d8b4a9eebef:createEffectcallscreateRenderEffectcallsuntrackcallsflushcallscreateStorecallsThe wider
lib/reactive+components/solidscope has zero controller-pattern lines. Its shared controller-host adapter still has eight lines and remains required by both assistant-panel renderers and the board session-progress widget. Those callers belong to ongoing area-lane work; this PR does not duplicate their migration.Test LOC: 152 → 164 (+12), extending an existing removal scenario rather than adding a parallel test fixture.
Whole-UI AST inventory at the pinned base: 905 controller-pattern references across 197 production files; the ratchet remains advisory until that baseline reaches zero.