Skip to content

refactor(ui): derive Apps conversation readiness - #180568

Merged
steipete merged 1 commit into
mainfrom
solid2/w-s2-apps-readiness-replacement
Oct 22, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-s2-apps-readiness-replacement

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor
Whole-scope remaining debt (base → head) 1 Handlers 2 Lifecycle 3 Async reads 4 Mutations 5 Splitting 6 State 7 JSX 8 Context 9 Siblings 10 Owners
Components 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 1 → 1 0 → 0 0 → 0 0 → 0
Pages A: agents/config/sessions 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0
Pages B: new-session/providers/channels/cron/skills 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0
Pages C: remaining non-chat pages 0 → 0 0 → 0 2 → 1 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0
App/lib/plugins/API 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0 0 → 0

Counts describe unconverted presentation responsibilities at base 39adcaaa0d0a6a754f4ea5c2ae682dffedba2a91, rather than every occurrence of a Solid API. Input JSX and Keyframe readiness retain separate replacement PRs. Plain owner admission, event ordering, and foreign-DOM mounts are intentional exceptions; this change adds none.

What Problem This Solves

Opening a plugin app needs the lazy chat custom element to register before the conversation can render. Apps tracked its download failure and retry counter in signals around an imperative effect. While registration was held, the page could show the invalid-link state before it was ready to decide that.

Solution

Read the existing registration owner's promise through an async memo, with Loading and Errored around the selected app. A failed import has a visible retry, and closing the route retires its pending presentation. The plain registration owner still deduplicates imports, verifies the tag, and removes failed attempts. The chat route remains lazy; tags, classes, launch context, and Gateway authority stay intact.

Supersedes #179946. This focused replacement preserves that patch on current main because the old PR's managed-checkout metadata was damaged during the October 21 disk emergency. The damaged metadata is left untouched.

Evidence

Proof Result
UI tsrs Passed
Apps readiness and existing heading tests Passed, 3/3
Coupled app-catalog tests Passed, 21/21
Controller guard / scoped lint / formatting Passed
Independent P0–P2 review and simplification Passed; no actionable findings
Production Knip, exact base and head Same two pre-existing heartbeat files; no new findings
Same-machine normalized builds and strict performance Passed with matched plugin inventory; zero violations/warnings
Full CI ci:full requested; every UI shard

Production Knip exits 1 on both exact revisions for src/infra/heartbeat-active-hours.ts and src/infra/heartbeat-wake-policy.ts; no ignore or baseline was added.

The focused regressions hold registration, assert a loading state with no unregistered conversation host, reject the import, retry through the visible control, and verify the launched app. A separate case closes the route before rejection and reopens it without leaking the retired failure. The existing heading regression is preserved.

Gzip surface Exact base Head Delta
Startup JS / 7 requests 316,297 B 316,298 B +1 B
Startup CSS / 1 request 40,894 B 40,894 B 0 B
Chat boot JS / 26 requests 1,438,548 B 1,438,580 B +32 B
New Session boot JS / 21 requests 1,015,478 B 1,015,484 B +6 B

Both builds use identical normalized metadata on the same machine and the same three packaged plugin UI revisions (memory-core, nostr, whatsapp). The first baseline had four extra local packaged outputs; its apparent savings were withdrawn and the baseline was rebuilt with the matching inventory. The corrected strict differential passes without waivers. No head rebuild or repeated test run was needed.

Size and checklist

Touched code Base Head Delta
Production Apps page 197 180 −17
Apps tests 40 143 +103
Effect baseline allowance 1 0 −1

In the touched production page, manual read/error presentation goes 1 → 0, effect 1 → 0, error and retry signals 2 → 0, and native async readiness/boundary 0 → 1. The other nine checklist items remain 0. The retained manual import is the existing custom-element registration boundary, not a component signal loader.

Screenshots

Exact-base/head synthetic waiting-state frames at 1440×1000 were inspected in full. The base reports an invalid app before registration finishes; the head shows “Loading plugin apps…” and keeps Close app available. Both screenshots contain synthetic fixtures only.

Before: invalid-link message while registration is pending

After: visible loading state while registration is pending

@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-22T11:45:18.982470Z b3e4e7c PR opened
ℹ️ 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: b3e4e7c437

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

<Show
when={conversationError()}
fallback={
<Errored

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 Replace the error scope when the app route changes

When chat registration fails and appSearch changes directly to another plugin app without leaving the Apps page, such as through the global sidebar or browser history, this Errored remains in its previous fallback. Loading on={appRoute()} only re-arms the inner loading boundary; it does not replace the outer error scope, so successful readiness for the new route stays hidden behind the old download error until the user manually retries. Key or reset the error scope on route replacement, preserving the old effect's behavior of clearing the error whenever the route changed.

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

Useful? React with 👍 / 👎.

@steipete
steipete enabled auto-merge (squash) October 22, 2026 11:50
@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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR derives conversation registration readiness through Solid loading and error boundaries while retaining the existing registration owner.

Example: Open Apps with ?server=parts&tool=library while the conversation chunk is downloading.

  • Before: The page can display “This app link is invalid or the app is unavailable.”
  • After: The page displays “Loading plugin apps…” and keeps Close app available.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, useful change with inspected browser proof and no actionable findings; failure and retirement paths are supported by focused tests.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected exact-base/head browser captures exercise the Apps route with synthetic data and held conversation registration, showing invalid-link feedback replaced by loading feedback while Close app remains available.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Opening a plugin app can report an invalid link while its conversation code is still downloading.
Reason: The maintainer-authored direction addresses demonstrated confusing feedback and reduces state without adding configuration or another domain owner.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR fixes misleading Apps readiness feedback with less presentation state, and no actionable defect was found.

Priority: P2
Reviewed head: b3e4e7c4376a3fd89c80b274bc38ca4272b6b9c6

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The screenshots prove pending-registration feedback; failure/retry and retired-route behavior have focused test coverage, but red-on-base test results are not supplied.
Agent review details

How this fits together

The Apps route combines URL selection and Gateway discovery with lazy chat-element registration, then supplies the selected app and session context to the conversation pane.

flowchart TD
  A[Apps route selection] --> B[Apps page]
  C[Gateway app discovery] --> B
  B --> D[Custom element registration owner]
  D --> E[Async readiness memo]
  E --> F[Loading and error boundaries]
  F --> G[App conversation pane]
Loading

Technical review

Best possible solution:

Retain the owner-backed async memo and native readiness boundaries while preserving lazy registration and existing launch authority.

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

Current-main source permits rendering before registration settles, and the supplied exact-base browser screenshot shows the misleading invalid-link state; no target code was executed during this review.

Is this the best way to solve the issue?

The change uses the existing registration owner, removes redundant presentation state, and preserves lazy imports, launch identity, and Gateway ownership.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Apps registration readiness and error presentation keeps the original intent (6fcd048: The Solid port preserved lazy registration, routes, and synchronous domain ownership; the later lifecycle change documented retirement of import-error feedback on replacement.)
  • Apps heading regression keeps the original intent (4d0c242: Expose page names and the Apps hero at their intended heading levels.)
  • Effect baseline keeps the original intent (317cd3a: Enforce shrinking per-file Solid guardrail allowances and prune allowances when calls disappear.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced change: The pinned introduction replaces the error signal, retry counter, and effect with an async memo and native boundaries; the registration owner and launch construction remain intact. (ui/src/pages/apps/apps-page.tsx:41, b3e4e7c4376a)
  • Current main still has the original path: Fetched main retains the imperative registration effect and does not gate conversation rendering on successful registration. (ui/src/pages/apps/apps-page.tsx:41, 8f6adf32be2b)
  • Inspected visual proof: The downloaded before/after images show the synthetic Parts route changing from an invalid-link message to loading feedback during held registration, with Close app preserved. (b3e4e7c4376a)
  • Pinned dependency contract contradicts the earlier finding: This PR imports Errored and Loading from pinned Solid rc.16, making its boundary implementation authoritative. Its async recovery regression demonstrates that an error boundary reveals content after a dependency changes and the async source succeeds, without calling reset; therefore the existing sticky-error review comment is not supported. (packages/signals/tests/error-silent-recovery.test.ts:195, b0ad1df505b8)
  • Feature provenance: The Solid port established the registration effect and preserved plain request owners; the later lifecycle refactor explicitly documented retiring import-error feedback on replacement. The proposed derivation respects those responsibilities. (ui/src/pages/apps/apps-page.tsx:41, 6fcd0488021d)
  • Credited replacement: The body explicitly replaces refactor(ui): derive Apps conversation readiness #179946 and preserves its focused registration-readiness work and visual evidence. (b3e4e7c4376a)

PR surface

Source -17, Tests +103, Other -1. Total +85 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 22 39 -17
Tests 1 105 2 +103
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 3 127 42 +85

Review metrics

Metric Value Why it matters
Production versus test growth Production −17 lines; tests +103 lines Presentation machinery shrinks while the added cases protect pending registration, retry, and late failure after route closure.

Root-cause cluster

Relationship: canonical
Canonical: #180568
Summary: This PR explicitly replaces the earlier Apps registration-readiness PR.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add P2: Misleading plugin-app loading feedback is a bounded user-facing defect with visible recovery controls.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Misleading plugin-app loading feedback is a bounded user-facing defect with visible recovery controls.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • 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 22, 2026, 8:01 AM ET / 12:01 UTC.

@steipete
steipete merged commit bd36b30 into main Oct 22, 2026
126 of 127 checks passed
@steipete
steipete deleted the solid2/w-s2-apps-readiness-replacement branch October 22, 2026 12:05
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 2026
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant