Skip to content

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

Closed
steipete wants to merge 2 commits into
mainfrom
solid2/w-s2-apps-readiness
Closed

steipete wants to merge 2 commits into
mainfrom
solid2/w-s2-apps-readiness

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope imported-symbol census on exact integrated main base 4d55380944261e25a1f849328b8304ad397c4b6d. Counts are syntax hits, not outstanding defects. The touched Apps read adds one async memo and removes 17 production lines.

Family Files / production LOC 1 Handler expressions 2 Cleanup 3 Async memos 4 Actions 5 Imports 6 Structured seeds 7 Factories 8 Contexts 9 Reveal 10 Owner APIs
solid 60 / 7881 4 10 0 0 3 0 0 0 0 3
config 22 / 4962 0 0 0 0 0 1 0 0 0 0
menus 46 / 8256 0 5 0 0 3 2 2 0 0 0
rest 135 / 20009 4 18 2 1 6 1 0 2 0 1
pagesA 117 / 26213 3 3 10 12 6 1 0 0 0 0
pagesB 201 / 42931 1 12 2 2 22 4 0 1 1 0
pagesC 268 / 54592 → 54575 4 29 1 → 2 3 43 10 20 0 0 0
app 191 / 31642 2 3 0 0 67 0 0 1 0 0
lib 346 / 54679 0 5 0 1 12 1 3 1 0 4
plugins 20 / 4024 0 3 0 1 13 1 0 0 0 7
api 12 / 2104 0 0 0 0 2 0 0 0 0 0
total 1418 / 257293 → 257276 18 88 15 → 16 20 177 21 25 5 1 15

What Problem This Solves

The Apps route duplicates its conversation-registration promise with an error signal, retry counter, effect and stale-callback guard. It now observes the same registration owner through an async memo under Loading and Errored, retaining the existing alert and Try again control. While the conversation chunk downloads, the existing loading copy is visible and an unregistered chat host is not mounted.

ensureCustomElementDefined still deduplicates imports, validates registration and retires failed attempts. The chat import stays inside that owner call and only starts for a selected app route. The lazy discovery component, app launch identity, selectors and session authority are unchanged. The custom-element registration import intentionally remains owner-based rather than a lazy component: registration serves native callers as well as this Solid renderer.

Touched-file checklist Before After Contract
1 reactive intrinsic handler expression 0 0 Stable callbacks read current state
2 component-level cleanup 0 0 No component cleanup change
3 manual async error/retry/effect flow 1 0 One async memo under Loading/Errored
4 manual mutation presentation 0 0 Registration readiness is a read
5 manual component loader 0 0 Discovery already uses lazy; registration owner is retained
6 copied structured signal 0 0 No editable owner mirror
7 hand-written component factory 0 0 Existing JSX
8 throwing context wrapper 0 0 Existing context
9 independently loading sibling resources 0 0 Discovery and conversation are dependent, not siblings
10 Solid owner API outside allowed adapters 0 0 No roots or restored owners

The simplify pass removes the redundant presentation machinery without adding an abstraction. The new tests cover two distinct observable failures: pending/rejected registration with successful retry, and retirement of a late failure after the app route closes.

Evidence

Proof Result
Frozen install Passed on Solid rc.16
UI tsrs Passed
Focused unit files Apps readiness 3/3 after current-main integration; coupled catalog 20/20; default pinned Bun, one worker
Controller guard Passed; Apps effect allowance deleted (87 → 86 calls)
Scoped typed lint and format Passed; test helper retains its receiver
Independent P0–P2 review Passed; no actionable findings; final source integrity verified
Production Knip Passed with zero findings on integrated final head (14m55s)
Same-machine base/head build + strict performance Passed; zero violations and warnings
Synthetic visual proof Before/after waiting-state capture passed and inspected at 1440×1000, English; no private data
Full PR selection ci:full applied; current-head CI runs all UI shards
Shipped gzip surface Base Head Delta
Startup JS (9 requests) 324,991 B 324,992 B +1 B
Startup CSS (1 request) 40,796 B 40,796 B 0 B
Chat boot JS 1,442,411 B 1,442,411 B 0 B
New-session boot JS 1,020,335 B 1,020,341 B +6 B

Startup is below the 325,000 B cap; its +1 B gzip variation and every displayed raw-byte total are within the 64 B allowance. No startup, route or locale cap has new growth beyond that allowance.

Production LOC: 197 → 180 (−17). New tests add 112 lines. No dependency, startup import, route, CSS or English-copy change. Existing loading text is reused. No external test lease or live data was used. Release-note context: Apps registration now presents explicit readiness and retry feedback through Solid's native boundaries.

Synthetic waiting-state proof

Both captures hold the conversation registration chunk for the same synthetic Parts library route. The old route reaches its unavailable message while registration is pending; the new route keeps the loading status until readiness settles. The fixture's identical server-update notice is outside the changed Apps slot. Capture setup uses the normal UI E2E 15-second readiness polling; early attempts with a malformed URL and an incomplete standalone screenshot configuration are retained as setup failures, not passing product proof.

Before: Apps while conversation registration is pending

After: Apps while conversation registration is pending

Integration proof: merged main through 4d5538094426, retaining both the existing heading regression and this PR’s registration/retry/retired-route cases. All three Apps cases, UI tsrs and the independent P0–P2 review passed. Exact-main paired builds passed with zero performance violations/warnings; candidate source restoration was byte-verified. No main commits were replayed.

Current-head CI attribution

Full CI 39698058040 completed for 58616ffb768e3c9944e96451e96b6e40d25ac1c0. Its only failing tests are:

  • Chat header and delegated work > keeps new batches collapsed until Subagents is opened manually without duplicate wait status
  • Control UI plugin sidebar order mocked Gateway E2E > reorders plugin sidebar tabs and keeps the order after reload

Every name also fails in the latest completed scheduled main 39703131373, UI4 job119577131374, at c538e280e80842e5bac887e2178b9df0c6ba1c2a. All other jobs passed or were skipped. The actual CI checkout, its ordered parents, reconstructed merge tree, and unchanged failing-test blobs were verified. Native inherited-failure admission retains the failed result; it does not report CI as green.

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

clawsweeper Bot commented Oct 21, 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 21, 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-22T00:16:23.990840Z 58616ff 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: 806f8f6bf3

ℹ️ 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 Reset the error boundary when the app route changes

If the conversation import rejects and the URL then changes directly to another truthy app route (for example through browser navigation or another MCP app deep link), this Errored instance remains mounted and continues showing the previous route's error until the user clicks Try again. The inner Loading on={appRoute()} is not mounted while the fallback is active, so it cannot trigger the new conversationReady read; unlike the removed effect, nothing clears the failure on route replacement. Key or otherwise reset the boundary by the app-route identity so the new route retries automatically.

AGENTS.md reference: ui/AGENTS.md:L9-L12

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces manual Apps conversation-loading state with Solid async readiness and error boundaries.

Example: Open /apps?server=parts&tool=library while the conversation chunk is delayed.

  • Before: The supplied capture shows “This app link is invalid or the app is unavailable.”
  • After: The supplied capture shows “Loading plugin apps…” while registration remains pending.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Useful, compact, and supported by direct visual evidence; source inspection does not support the existing route-reset finding.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after browser screenshots exercise the Apps route with conversation registration deliberately held and show the new loading status; focused component tests support rejection, retry, and route-close retirement.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Opening an app while its conversation code downloads can show misleading unavailable feedback.
Reason: The maintainer-authored direction reduces redundant state while giving pending registration an explicit visible outcome.

Merge readiness

⛔ Needs changes before merge - 1 item remains

This maintainer-authored PR makes a useful, focused simplification; no introduced correctness or security defect was established, but GitHub reports a merge conflict.

Priority: P3
Reviewed head: 806f8f6bf3d2372ae4176f8fa2b4d9f108099f21

Before merge

  • Complete next step - Resolve GitHub's reported merge conflict while preserving the readiness change.

Findings

None.

Agent review details

How this fits together

The Apps route combines URL selection, Gateway discovery, and lazy chat-element registration to render a selected plugin app conversation.

flowchart TD
  A[Apps URL] --> B[Apps page]
  C[Gateway discovery] --> B
  B --> D[Solid readiness boundary]
  D --> E[Custom element registration]
  E --> F[Chat pane]
Loading

Technical review

Best possible solution:

Keep the existing registration owner and native Solid readiness boundaries, then resolve the reported merge conflict.

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

Current main mounts the conversation slot without awaiting custom-element registration; supplied before/after browser captures demonstrate the changed pending-state feedback.

Is this the best way to solve the issue?

The change uses the existing registration owner and Solid's native async contract without adding a parallel owner or abstraction.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Apps registration error, retry, and retirement presentation keeps the original intent (6fcd048: The Solid migration preserved lazy registration, retry feedback, routes, selectors, and synchronous domain authority; later lifetime work explicitly documented retirement on replacement.)
  • Shrink-only createEffect allowance keeps the original intent (317cd3a: The guardrail requires pruning per-file allowances when calls are removed; this PR deletes the allowance for the removed Apps effect.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source -17, Tests +112, Other -1. Total +94 across 3 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 22 39 -17
Tests 1 112 0 +112
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 3 134 40 +94

Review metrics

Metric Value Why it matters
Production versus test LOC Production −17; tests +112 The production reduction removes duplicated presentation state; the tests protect readiness/retry and retirement of a late failure after closing the route.

Labels

Label changes:

  • add P3: A focused presentation refactor improves pending-state feedback without changing configuration, persistence, or request authority.
  • 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 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: A focused presentation refactor improves pending-state feedback without changing configuration, persistence, or request authority.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • 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, 6:53 PM ET / 22:53 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: 58616ffb76

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

return { ...mounted, setSearch };
}

it("waits for the conversation registration and retries a failed import", async () => {

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 Clean up the newly mounted Solid roots

Both added tests are top-level, but the only cleanupSolid() hook is scoped inside the later describe, so it never runs for these mounts. In filtered or watch-mode runs, the roots and body containers remain in the global registry through worker/module resets, allowing stale subscriptions and DOM to contaminate later tests; move the cleanup hook to file scope or explicitly unmount each fixture.

AGENTS.md reference: ui/AGENTS.md:L3-L5

Useful? React with 👍 / 👎.

@steipete

Copy link
Copy Markdown
Contributor Author

Superseded by #180568, merged as bd36b30 and verified on origin/main. The replacement passed full CI and preserves the focused Apps readiness change. This PR is closed without touching its damaged managed-checkout metadata.

@steipete steipete closed this Oct 22, 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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: ⏳ 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