Skip to content

fix(ui): retain schema readiness and expose retry - #180127

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

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

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Family Files base→candidate Production LOC base→candidate 1 handlers 2 lifecycle 3 reads C/E/U/N base→candidate 4 commands C/E/U/N base→candidate 5 lazy 6 collections 7 JSX 8 context 9 Reveal 10 owner APIs
Agents editor / non-memory 24→24 5,759→5,759 0→0 0→0 6C/0E/0U/6N→6C/0E/0U/6N 4C/0E/0U/3N→4C/0E/0U/3N 0→0 0→0 0→0 0→0 0→0 0→0
Agents memory 12→12 2,844→2,844 0→0 0→0 0C/0E/0U/5N→0C/0E/0U/5N 1C/1E/0U/1N→1C/1E/0U/1N 0→0 0→0 0→0 0→0 0→0 0→0
Config Appearance / shared 14→14 4,116→4,118 0→0 0→0 2C/1E/0U/5N→2C/1E/0U/5N 3C/1E/0U/1N→3C/1E/0U/1N 0→0 0→0 0→0 0→0 0→0 0→0
Config other 34→34 5,602→5,662 0→0 0→0 2C/0E/0U/2N→1C/0E/0U/3N 2C/1E/0U/2N→2C/1E/0U/2N 0→0 0→0 0→0 0→0 0→0 0→0
Config health 3→3 1,352→1,352 0→0 0→0 1C/0E/0U/0N→1C/0E/0U/0N 0C/0E/0U/1N→0C/0E/0U/1N 0→0 0→0 0→0 0→0 0→0 0→0
Config memory 5→5 1,319→1,319 0→0 0→0 0C/1E/0U/1N→0C/1E/0U/1N 2C/0E/0U/0N→2C/0E/0U/0N 0→0 0→0 0→0 0→0 0→0 0→0
Config Talk 4→4 1,471→1,471 0→0 0→0 1C/0E/0U/2N→1C/0E/0U/2N 2C/0E/0U/0N→2C/0E/0U/0N 0→0 0→0 0→0 0→0 0→0 0→0
Sessions 22→22 4,103→4,103 0→0 0→0 1C/0E/0U/3N→1C/0E/0U/3N 8C/0E/0U/0N→8C/0E/0U/0N 0→0 0→0 0→0 0→0 0→0 0→0
PAGES-A total 118→118 26,566→26,628 0→0 0→0 13C/2E/0U/24N→12C/2E/0U/25N 22C/3E/0U/8N→22C/3E/0U/8N 0→0 0→0 0→0 0→0 0→0 0→0

Exact base 34a4e3bf238e1ebcb0c110d6b912f71bbeceed22; head 3d3e27d30257277e169521a762e4a66fb75875b4. All scope blobs match prior79868; only the coupled private runtime-config helper shrinks6LOC. This early base predates Roster: no later roster credit is borrowed. Schema read is the only proposed native read; no merged credit. C/E/U/N = candidate / named exception / unresolved / native. Prior primitive/owner exceptions remain.

Category Files Base LOC Candidate LOC Delta
production 5 2682 2756 +74
scopedProduction 3 1690 1752 +62
coupledDomainProduction 2 992 1004 +12
testsSupport 3 1011 1192 +181

The full source and publication comparison is independently qualified against the exact base. C/E/U/N = candidate / named exception / unresolved / native; this PR moves only the schema read to native presentation.

What Problem This Solves

A failed Settings schema request left the editor at “Schema unavailable” without a retry. Two initial admission paths could also immediately re-arm a failed request after the config read completed.

RuntimeConfig retains the admitted schema completion and its existing access, connection, and publication checks. One page-lifetime Solid memo presents initial readiness through Loading/Errored and retries through that same owner. Once schema exists, latest retains the accepted editor and open Setup during refresh; a failure appears beside them with Retry. Pending status stays out of structural field props, preserving focused inputs and local drafts. Raw editing and sections that do not need schema keep their existing behavior.

Evidence

Proof Result
Focused schema and Config observer suites 27 passed across two files on the replacement source; original containment and toggle assertions retained
Browser editor identity during schema refresh 1 passed; loaded form and Setup survive successful and failed refresh
UI tsrs Passed on the replacement source
Independent P0–P2 review Scoped-clean on all eight authored files and both private-helper simplifications; frozen inputs verified before and after
Production Knip Final head and exact base report the same 13 unused heartbeat files; complete output is byte-identical, no new finding
Scoped lint and formatting Passed on the final private helper; prior passing proof reused only for unchanged authored files
Exact-base/head builds and strict performance Passed on 34a4e3bf → 3d3e27d; no strict violation or warning; startup +28 B satisfies the 64 B rule
Synthetic before/after screenshots Four full before/after frames inspected; synthetic only; Retry recovers the editor; zero browser page errors

The unit suites use the repository’s default test runner with no runtime override. The one browser test uses Node because its canonical Playwright browser configuration requires it. The RuntimeConfig owner suite passed all 31 cases again on the final private-helper simplification.

Total touched production is 2,682→2,756 LOC (+74), including two plain TypeScript owner files. Tests change 1,011→1,192 LOC (+181). The growth adds an admitted completion contract and explicit recovery while retaining editor identity. No dependency or lazy boundary changes.

Current-head CI

The original full CI exposed two test issues: a Config-only Gateway fixture declared as a full application Gateway, and a meeting-capture assertion checked after synchronous flush while schema readiness settles promises. Both were fixed while retaining the original behavior assertions. The subsequent 34e05daf CI passed those repaired checks but failed the Sidebar ordering case at line 74.

That Sidebar inherited attribution is withdrawn. The earlier scheduled main 39712703143 was UI-green, and the original Sidebar case also passes on this PR’s exact 9d2ac90d merge-base build. The replacement merges main’s reviewed Sidebar correction (#180167); no assertion was weakened in this PR. Exact replacement head 3d3e27d3 passed full CI 39723629433. No Sidebar waiver is used.

Startup And Route Bytes

Gzip surface Base Head Delta
Startup JS, 9 requests 325,102 B 325,130 B +28 B
Startup CSS, 1 request 40,904 B 40,904 B 0 B
Chat boot JS, 27 requests 1,441,969 B 1,442,011 B +42 B
New Session boot JS, 22 requests 1,019,617 B 1,019,666 B +49 B

The exact base's startup already exceeds 325,000 B; the head's 28 B increase stays within the campaign's 64 B allowance. Chat and New remain below their 1,500,000 B and 1,035,000 B caps. All 21 locale pairs remain below 307,200 B, with at most 2 B growth. The CSS request count stays at one, and existing lazy boundaries remain.

Independent publication qualification verifies 6,994 files per side, 3,280 unique inputs including 3,270 tracked inputs per side, ten equal generated inputs, six equal toolchains, and exact consumed source maps. The paired build uses this machine, frozen dependencies, and fixed build metadata. The baseline overlay has exact base production inputs and three test/support-only differences; it is not a literal base checkout. The pure-type view-types.ts has no emitted JavaScript mapping; its exact source hash is verified on both sides.

Screenshots

Infrastructure at 1440×1000, with synthetic configuration and a held schema request. Both sides show the pending state. Before, failure leaves “Schema unavailable” with no retry; after, the error offers Retry. The capture exercises Retry and verifies the recovered editor with no page errors. All four full frames were inspected for incidental/private content.

Before: the schema request is pending

Before: a failed schema request has no Retry

After: the schema request is pending under Loading

After: the failed schema request exposes Retry

@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 🔄 Running since 2026-10-22T04:40:03.899158Z 3d3e27d 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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-environment 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 retains schema-request completions and adds visible errors and Retry while preserving loaded Settings editors during refresh.

Example: Infrastructure Settings receives “Synthetic schema service temporarily unavailable.”

  • Before: The page displays “Schema unavailable.” without a retry action.
  • After: The page displays the failure beside a Retry button.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused recovery work with inspected visual evidence, but a concrete consumer regression and an unattributed core type-check failure prevent a clean validation verdict.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor-proof gate; inspected synthetic UI screenshots show the changed error and Retry presentation, and the body reports browser recovery and owner regressions.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A failed Settings schema request leaves users without an in-page retry action.
Reason: The maintainer-directed recovery improvement has clear value and preserves the existing editor and mutation owners.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open: this maintainer-directed PR addresses a real Settings recovery gap, but its async rendering change leaves an existing consumer regression failing.

Priority: P2
Reviewed head: b748068ca5244f1325dffc373bd7483525c4c838

Before merge

  • Wait for async readiness in the Meeting capture regression (P2) - The new readiness memo returns a promise even when RuntimeConfig already holds a successfully loaded schema. The existing Meeting capture consumer test mounts that real owner and uses only synchronous flush() before selecting the capture tab and asserting containment. The exact-head UI check now fails at line 918 with false instead of true: the async editor subtree has not settled. Update this consumer to await the mounted editor and selected capture section through waitForSolid, preserving its containment, collapsed-editor, and mutation assertions. Failure evidence: https://github.com/openclaw/openclaw/actions/runs/39705812065/job/119585959276.
  • Complete next step - Inspect the core test-type failure diagnostic through an accessible CI log and determine whether it is caused by this diff before merging.

Findings

  • [P2] Wait for async readiness in the Meeting capture regression — ui/src/pages/config/config-page.session-observer.test.ts:915-918

Tests

  • Missing end-to-end proof: The supplied screenshots establish visible error/Retry presentation, while recovery and retained-refresh behavior are supported by reported harness results rather than an inspected shipped-Gateway trace.
Agent review details

How this fits together

RuntimeConfig owns Gateway schema requests and connection checks; the Settings page passes their completion to Solid loading and error boundaries that render the editor.

flowchart LR
  A[Settings route] --> B[RuntimeConfig owner]
  B --> C[Gateway schema request]
  C --> B
  B --> D[Settings page props]
  D --> E[Solid readiness boundary]
  E --> F[Editor or error and Retry]
  F --> B
Loading

Technical review

Best possible solution:

Keep the existing request owner and retained editor behavior, adapt the failing consumer test to async readiness, and consolidate the overlapping schema-retry PRs.

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

Current-main source has no schema Retry presentation, and the inspected before screenshot shows the unavailable state; no target code was executed during this read-only review.

Is this the best way to solve the issue?

Using the existing RuntimeConfig completion and Solid boundaries is appropriate, but the consumer suite must account for the newly asynchronous initial rendering.

Full review comments:

  • [P2] Wait for async readiness in the Meeting capture regression — ui/src/pages/config/config-page.session-observer.test.ts:915-918
    The new readiness memo returns a promise even when RuntimeConfig already holds a successfully loaded schema. The existing Meeting capture consumer test mounts that real owner and uses only synchronous flush() before selecting the capture tab and asserting containment. The exact-head UI check now fails at line 918 with false instead of true: the async editor subtree has not settled. Update this consumer to await the mounted editor and selected capture section through waitForSolid, preserving its containment, collapsed-editor, and mutation assertions. Failure evidence: https://github.com/openclaw/openclaw/actions/runs/39705812065/job/119585959276.
    Confidence: 0.94

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Schema request ownership keeps the original intent (5c81ed5: Split runtime configuration into layers while retaining Gateway effects and write coordination with their existing owners.)
  • Reconnect editor retention keeps the original intent (fix(ui): keep Advanced settings visible on reconnect (#152874) #159875: Preserve reading position and open Setup disclosures while schema refresh temporarily disables editing.)
  • Solid Settings rendering keeps the original intent (b8d31e9: Move configuration pages to Solid while preserving tags, field identities, drafts, and mutation ownership.)
  • Plugin schema catch-up keeps the original intent (fix(config): keep plugin schema current during in-flight reads #179655: Retain the actual pending schema request and follow plugin invalidation with a current read.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +80, Tests +168. Total +248 across 7 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 5 111 31 +80
Tests 2 171 3 +168
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 282 34 +248

Review metrics

Metric Value Why it matters
Production versus test growth Production +80 lines; tests +168 lines The growth supplies completion/error presentation and distinct owner-integration and browser identity coverage without a new request owner.

Labels

Label changes:

  • add P2: This improves recovery from Settings schema failures with limited scope; the observed blocker is a focused consumer-test failure.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: This improves recovery from Settings schema failures with limited scope; the observed blocker is a focused consumer-test failure.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • 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, 9:43 PM ET / October 22, 2026, 01:43 UTC.

@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: 34e05dafcb

ℹ️ 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 +188 to +190
const ensureSchemaLoaded = async () => {
if (!state.configSchema && canLoadConfigSchema()) {
await loadSchema();

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 Keep retained failures out of ensureSchemaLoaded retries

After an initial config.schema rejection, schemaRead retains the failed completion but configSchema remains null, so any later ensureSchemaLoaded() call starts another request once the old load leaves loads. Existing callers invoke this for unrelated interactions—notably every Settings route load in pages/config/route.ts:57-60 and every nonempty Settings search change in app/app-host.tsx:435-438—so navigation or typing replaces the visible failure and can repeatedly retry without the new Retry button. Treat a retained schemaRead as already ensured here; reconnect already clears it through resetLoads, while refreshSchema() remains the explicit retry path.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 8c64e9f into main Oct 22, 2026
112 of 114 checks passed
@steipete
steipete deleted the solid2/w-s2-config-schema-read branch October 22, 2026 05:08
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
* refactor(ui): present config schema readiness through Solid

* refactor(ui): retain schema reads without deferred runtime

* test(ui): align schema fixtures with async readiness

* refactor(ui): specialize remaining runtime config load helper

* refactor(ui): return admitted config read promise directly
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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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