Skip to content

refactor(ui): derive plugin settings readiness from config receipts - #180258

Merged
steipete merged 6 commits into
mainfrom
solid2/w-s2-plugin-config-read
Oct 22, 2026
Merged

steipete merged 6 commits into
mainfrom
solid2/w-s2-plugin-config-read

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Whole assigned scope raw census at 63415c568253b60f94f17a3707cb6539f9161ede; 1762 production files / 332478 LOC. These are syntax proxies, not unresolved defects.

Family Files / LOC 1 Handler suspects 2 Cleanup / settled 3 Async memo / Loading / Errored 4 Action / optimistic / store 5 Import / lazy 6 Structured seed / store / projection 7 Factory 8 Context / use 9 Reveal 10 get / run / root
api 12 / 2104 0 0 / 0 0 / 0 / 0 0 / 0 / 0 2 / 0 0 / 0 / 0 0 0 / 0 0 0 / 0 / 0
app 192 / 31657 2 3 / 11 0 / 9 / 8 0 / 0 / 0 68 / 7 0 / 2 / 0 0 1 / 2 0 0 / 0 / 0
config 22 / 4962 0 0 / 3 0 / 0 / 0 0 / 0 / 0 0 / 0 1 / 1 / 0 0 0 / 0 0 0 / 0 / 0
lib 350 / 54764 0 5 / 5 0 / 2 / 2 1 / 1 / 0 15 / 1 1 / 2 / 0 0 1 / 0 0 0 / 2 / 2
menus 79 / 16207 0 4 / 28 0 / 9 / 6 2 / 2 / 0 10 / 4 1 / 2 / 1 1 0 / 0 1 0 / 0 / 0
pagesA 121 / 27072 3 3 / 36 15 / 35 / 33 17 / 23 / 1 6 / 0 1 / 3 / 1 0 0 / 0 0 0 / 0 / 0
pagesB 208 / 44136 1 7 / 43 2 / 34 / 24 10 / 11 / 3 22 / 4 3 / 7 / 1 0 1 / 4 1 0 / 0 / 0
pagesC 270 / 55161 4 26 / 53 1 / 20 / 17 5 / 7 / 0 43 / 4 9 / 11 / 0 20 0 / 0 0 0 / 0 / 0
plugins 20 / 4024 0 3 / 12 0 / 4 / 4 1 / 1 / 0 13 / 1 1 / 2 / 0 0 0 / 1 0 2 / 3 / 2
rest 428 / 84456 13 32 / 89 2 / 16 / 9 9 / 8 / 0 31 / 7 5 / 5 / 0 0 4 / 9 0 1 / 3 / 1
solid 60 / 7935 3 4 / 19 0 / 3 / 1 2 / 1 / 1 3 / 2 0 / 1 / 0 0 0 / 1 0 1 / 1 / 1

Native handler suspects include stable primitive methods. Domain owners, foreign-DOM mounts, operation imports, and primitive cleanups have named exceptions. This scan does not resolve direct @solidjs/signals imports or Promise-returning non-async memo callbacks. Semantic dispositions are retained separately; unlanded work stays outstanding.

What Problem This Solves

The plugin settings editor now consumes the existing config and schema read promises under Solid Loading/Errored. The status slot sits beside the editable form, so a read or error does not replace its DOM. The existing config owner still owns request admission, drafts, writes and their recorded errors. Current main already owns the schema promise; this PR adds no schema cache, receipt map or request manager.

Retained credential dialogs now read the current owner error through a getter, so an awaited discard cannot leave an old read error visible after the owner clears it. Section refs register through onSettled instead of reading reactive props from an unowned ref callback.

Touched-file checklist Before After
1. Incorrect intrinsic handler binding 0 0
2. Component-level cleanup 0 0
3. Manual config/schema read presentation slots 2 0
4. Mutation adoption debt 0 0
5. Lost lazy boundary 0 0
6. Copied collection signals 0 0
7. Manual factories 0 0
8. Throw-only context wrappers 0 0
9. Uncoordinated sibling readiness 0 0
10. Feature owner APIs 0 0

Config and schema form one readiness region. The completion-only memo carries no duplicated resource data; authoritative owner flags remain available to other Gateway consumers. Advanced settings is now covered by main's separate implementation and is outside this PR's diff.

Evidence

Check Result
Current-main focused tests 34 passed across runtime-config-capability and settings-editor.handlers
UI typecheck tsrs passed, including the lifecycle fixture repair
CI regression repair Run 39736931841 exposed missing configRead/configSchemaRead in settings-lifecycle.browser.test.tsx; the two-field fixture repair passed its Chromium case and independent P0–P2 review
Scoped lint / independent P0–P2 review Passed; independent review scoped-clean on the complete integrated diff and the final nullable-promise lint repair (supplied source, no independent execution)
Exact-base/head normalized builds and strict performance Passed with zero warnings/violations; startup316250→316251 B (+1); Chat1439184→1439137 B (−47), New1016132→1016104 B (−28), CSS40894 B/1 unchanged; final source verified against emitted source map
Production Knip Head and exact dc0d7a base both exit1 with byte-identical13heartbeat files; no UI finding; SHA2560ec893790beb14caa4f097a177380749978d9ebed28d7a75700fd3df1a7af3fd
Production/test LOC 2431→2517 (+86) / 2466→2641 (+175), 13 files

The preceding reviewed head ec13806 passed full CI39723014190, including the repaired credential cancellation case. Fresh full CI is required for the current integrated head; that prior run is not claimed as exact-head proof.

Visual proof

The following inspected synthetic-only plugin editor pair is retained from the original configuration-read implementation (1440×1000). It predates the current-main integration and the getter/ref repairs, whose observable boundaries are covered by the focused tests. Advanced-settings captures have been removed from this PR because that code is now owned by main.

Before After
Before — Plugin configuration editor After — Plugin configuration editor

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T06:48:18.977410Z 02ca18e New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a938d2d876

ℹ️ 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".

Comment on lines +46 to +48
const failed = outcomes.find(
(outcome) => outcome && !outcome.ok && outcome.error === currentError,
);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Distinguish error ownership without comparing message text

When a refresh fails while cached settings remain editable, a subsequent write can fail with the same generic message (for example, Request failed). Because currentError does not change and the completed read is identified solely by matching that string, the old read remains the error-boundary owner and Retry invokes onConfigReadRetry instead of retrying the newer write. Track the originating operation or generation rather than using error-text equality so an old result cannot override newer intent.

AGENTS.md reference: ui/AGENTS.md:L16-L18

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR derives plugin settings loading and error presentation from configuration and schema read receipts.

Example: A schema refresh and a subsequent settings write both fail with “Request failed” while cached settings remain editable.

  • Before: Retry invokes the settings writer.
  • After: The retained schema failure claims the matching message, so Retry refreshes configuration instead.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Visual parity is supported, but the retry-ownership defect and missed typed caller require repair.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The inspected browser screenshots cover both changed consumers and show matching Advanced loading, failure, recovery, and plugin-editor presentation using synthetic data; they establish visual parity rather than correctness of the equal-message retry case.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Plugin settings must retain editable forms and working recovery controls while configuration and schema reads settle.
Reason: The maintainer-authored direction reuses the synchronous config owner and shares presentation between two existing consumers without adding configuration or public contracts.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this PR open for two focused repairs: Retry can select the wrong operation, and one typed caller lacks the newly required receipt props.

Priority: P2
Reviewed head: a938d2d876c1e14c7dca71612eebb85f35185ecc

Before merge

  • Track error ownership without matching message text (P2) - After a schema refresh fails with cached schema and settings still available, its failed receipt remains current through a later config write. If that write fails with the same formatted message, such as “Request failed”, this comparison selects the old schema failure and the Errored fallback invokes onConfigReadRetry. Retry therefore reloads configuration instead of retrying the failed write. Record the originating operation in the config owner and cover equal read/write messages; the added regression only covers different messages.
  • Supply the new receipt props to the Advanced-settings fixture (P2) - These required fields propagate through SharedProps into InventoryProps, but the PluginSettingsInventory JSX in settings-editor.browser.test.tsx at line 112 supplies neither property. That caller is included in the UI-pages test type graph and no longer satisfies its props type. Add configRead={undefined} and configSchemaRead={undefined} to this fixture, matching the other updated fixtures.

Findings

  • [P2] Track error ownership without matching message text — ui/src/pages/plugins/settings-read-status.tsx:46-48
  • [P2] Supply the new receipt props to the Advanced-settings fixture — ui/src/pages/plugins/settings-model.ts:20-21
Agent review details

How this fits together

The Control UI config owner admits Gateway reads and writes; plugin settings consume its state and receipts to render forms, loading indicators, errors, and recovery controls.

flowchart LR
  A[Gateway config RPCs] --> B[Synchronous config owner]
  B --> C[Read completion receipts]
  B --> D[Editable config state]
  C --> E[Shared status boundary]
  D --> F[Advanced and plugin forms]
  E --> G[Retry controls]
  G --> B
Loading

Technical review

Best possible solution:

Keep the shared status boundary, identify error ownership in the config owner, and update the missed typed caller.

Do we have a high-confidence way to reproduce the issue?

Source establishes the same-message retry misrouting and the omitted required props; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

Owner-backed receipts fit the intended refactor, but message text cannot reliably distinguish a completed read failure from a subsequent write failure.

Full review comments:

  • [P2] Track error ownership without matching message text — ui/src/pages/plugins/settings-read-status.tsx:46-48
    After a schema refresh fails with cached schema and settings still available, its failed receipt remains current through a later config write. If that write fails with the same formatted message, such as “Request failed”, this comparison selects the old schema failure and the Errored fallback invokes onConfigReadRetry. Retry therefore reloads configuration instead of retrying the failed write. Record the originating operation in the config owner and cover equal read/write messages; the added regression only covers different messages.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.
  • [P2] Supply the new receipt props to the Advanced-settings fixture — ui/src/pages/plugins/settings-model.ts:20-21
    These required fields propagate through SharedProps into InventoryProps, but the PluginSettingsInventory JSX in settings-editor.browser.test.tsx at line 112 supplies neither property. That caller is included in the UI-pages test type graph and no longer satisfies its props type. Add configRead={undefined} and configSchemaRead={undefined} to this fixture, matching the other updated fixtures.
    Confidence: 0.99
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7910ed1a7418.

Provenance checked

  • Configuration read receipts keeps the original intent (0cd1ca7: Record read completion and retirement so external mutations can follow superseding reads without losing draft or connection ownership.)
  • Plugin settings status rendering changes intended behavior with a stated reason (8304c4b: The Solid port preserved existing controls, drafts, routes, and plain Gateway/config ownership; this PR explicitly replaces manual status presentation with receipt consumption.)
  • Retained retry handlers keeps the original intent (f0d7334: Stable native handlers must dispatch through the current operation rather than retain an obsolete callback.)
  • Schema read lifecycle keeps the original intent (b6666b7: Schema admission already prevents concurrent reads and connection epochs reject stale publication; the added receipt observes completion without restoring a redundant request-version fence.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm tsgo:test:ui
  • pnpm --dir ui test src/pages/plugins/settings-editor.handlers.test.tsx src/pages/plugins/plugins-page.routing.test.ts src/lib/config/runtime-config-capability.test.ts
  • pnpm --dir ui test src/pages/plugins/settings-editor.browser.test.tsx src/pages/plugins/settings-lifecycle.test.tsx
  • Verify the equal-message recovery regression fails before the repair and passes afterward.
  • Classify the failed required checks against base or matching independently verified failures.

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 0cd1ca7 adds ui/src/lib/config/config-state-model.ts:51 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 0cd1ca7552a0; files: ui/src/lib/config/config-state-model.ts)
  • Patrick Erichsen: Raw commit 1710fed adds ui/src/pages/plugins/settings-model.ts:6 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1710fede5dfa; files: ui/src/pages/plugins/settings-model.ts)
  • Ayaan Zaidi: Raw commit c9c856c adds ui/src/lib/config/config-state-model.ts:51 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: c9c856c3b4c5; files: ui/src/lib/config/config-state-model.ts)

PR surface

Source +110, Tests +114. Total +224 across 12 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 137 27 +110
Tests 5 114 0 +114
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 251 27 +224

Review metrics

Metric Value Why it matters
Production versus test LOC Production +137/-27, net +110; tests +114/-0. Growth supplies the shared status boundary and schema completion/retirement contract; the added tests cover distinct lifecycle and error transitions.

Labels

Label changes:

  • add P2: The introduced recovery defect affects plugin settings after failures and has an existing reload path; the remaining repair is a focused typed-consumer update.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The introduced recovery defect affects plugin settings after failures and has an existing reload path; the remaining repair is a focused typed-consumer update.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 21, 2026, 11:51 PM ET / October 22, 2026, 03:51 UTC.

@steipete
steipete merged commit a24275d into main Oct 22, 2026
94 of 96 checks passed
@steipete
steipete deleted the solid2/w-s2-plugin-config-read branch October 22, 2026 07:51
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant