Skip to content

test(ui): remove Lit fixtures from Solid component tests - #169387

Merged
steipete merged 1 commit into
mainfrom
solid2/w-testlit-1
Oct 11, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-testlit-1

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Tests for already-Solid components still imported Lit to mount fixtures, dispose containers, or describe element types, keeping the test migration unfinished.

User Impact

No user-visible change. Ten component test files drop their direct Lit dependency while retaining all 566 assertions.

Why This Change Was Made

Use plain DOM creation/property assignment for bridged elements and inert SVG snapshots, and the existing Solid mount/disposal helpers for owned roots. The MCP unmount tests now exercise a Solid-owned subtree and retain their node-identity, teardown, rebound, and sibling assertions.

Only tests change. No production components, styles, routes, lazy boundaries, dependencies, or shared test helpers change. The two Lit unmount fixture classes become a shared Solid fixture, accounting for the small LOC increase: 4,195 → 4,220 test lines (+25).

Ten converted files remove 11 Lit import statements → 0. Across ui/src/components, ui/src/lib, and ui/src/test-helpers, importing test/helper files fall 85 → 75 (all UI: 376 → 366).

Evidence

Check Result
Eight converted unit files, pnpm test <files> --maxWorkers=1 Passed; 11.95 s test command wall time on Testbox
Two converted browser files (Chromium), same worker limit Passed; 10 tests, 2.95 s command wall time
pnpm tsgo:ui Passed on Testbox
Scoped oxlint, formatting, assertion-safety and Lit ratchets; git diff --check Passed
Independent Codex autoreview (P0–P2), with Solid fixture owner/helper context No actionable findings
pnpm ui:build Passed for merge base and head on the same Testbox
Strict performance, base → head Startup JS 421,813 → 421,814 B gzip (+1 B build variance), startup CSS 2 → 2 requests. Both fail only the existing chat-boot request budget: 36 > 35. No production change or budget adjustment.

Proof uses Blacksmith Testbox tbx_01m4pdyfdf3cz0qae5eysm2ng6 (runner). The tested source tree matches the committed tree. No visual production change, so screenshots are not applicable. PR CI ran on merge e206b84 over main 84a834e: E2E failed before tests with three unresolved imports of domain-board.ts / domain-keyed.ts. Those adapters were removed on main in #169368 while these importers remain. The exact baseline reproduces all three errors (bundle failure in 3.27 s); the PR changes none of these inputs. CI cancelled 14 sibling jobs via its successful fail-fast monitor, so those jobs are unproven, not green. Landing uses the native inherited-failure route with exact checkout, source, log, cancellation, and live-gate evidence.

Left in place: tests that still exercise Lit renderers, including copy-button, row badges, provider usage, panel presentation helpers, agent-scope control, decision picker, and the presentation-primitives fixture. Also left mixed-entry tests for viewer-facepile (Lit chat author avatar), link-reader page preview (Lit sign-in controls), MCP bridge/message (Lit confirmation/attachments), plus files owned by other migration lanes. No assertions were removed to make an import disappear.

@clawsweeper

clawsweeper Bot commented Oct 11, 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.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 11, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces Lit fixture rendering and types with DOM operations and existing Solid helpers in component tests.

Example: An MCP view replacement waits for pending teardown.

  • Before: A Lit fixture keeps the initial subtree connected while replacement requests arrive.
  • After: A Solid fixture exercises the same teardown, coalescing, rebound, and sibling-identity assertions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The fixture conversion is focused and appears correct; validation consists of reported focused runs, with cancelled CI coverage unproven and failure logs unavailable to this review.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only conversion needs no user-visible runtime demonstration; the body reports focused unit and Chromium fixture runs, and inspected screenshots document earlier merged production ports.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
Reason: The maintainer-directed cleanup completes an established migration using existing helpers and preserves the component and lifecycle coverage.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it completes useful, maintainer-directed Solid test migration while preserving the existing assertions, and no actionable patch defect was found.

Priority: P3
Reviewed head: 7674e4b0dbbec84bc7de2ab7fa2dd8b12225218a

Before merge

None.

Findings

None.

Agent review details

How this fits together

Control UI component tests supply synthetic properties and lifecycle events to registered components and shared owners, then inspect rendered DOM and cleanup outcomes.

flowchart LR
  A[Test inputs] --> B[DOM and Solid fixtures]
  B --> C[Registered component bridges]
  B --> D[MCP unmount gate]
  C --> E[Rendered DOM]
  D --> E
  E --> F[Existing assertions]
Loading

Technical review

Best possible solution:

Land the focused fixture conversion through the existing maintainer workflow and its inherited-failure route.

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

This PR addresses obsolete test fixtures rather than a product defect; the introduced diff confirms the Lit dependencies, and no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The conversion uses existing mounting and cleanup owners, preserves the tested contracts, and retains production Lit adapters for their remaining callers.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • MCP teardown fixtures keeps the original intent (7d62a27: Keep outgoing MCP views connected until teardown completes; subsequent repairs align rendered DOM and owner state.)
  • Image viewer fixtures keeps the original intent (c2c1c28: Protect immediate preview display and decoded-original replacement while preserving geometry and zoom.)
  • Agent chip fixtures keeps the original intent (8c2996e: Present agent identity and ownership consistently across team-mode surfaces.)
  • Lobster artwork fixtures keeps the original intent (3342616: Protect signature character artwork and attached-prop geometry.)
  • Apps page fixture types keeps the original intent (e906068: Exercise app discovery and embedded-conversation context updates through mounted page consumers.)
  • Skill-file icon reference keeps the original intent (6b14959: Distinguish SKILL.md with the composer skill glyph while preserving ordinary Markdown icons.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Introduced change: The pinned introduction diff changes only test imports, fixture construction, disposal, and element types; it preserves test declarations and assertion expressions. (7674e4b0dbbe)
  • Lifecycle coverage: The replacement fixture invokes the real McpAppUnmountGate through a cleanup-tracked Solid root; retained tests cover connected outgoing DOM, latest replacement selection, rebound restart, and retained siblings. (ui/src/components/mcp-app-unmount.test.ts:26, 7674e4b0dbbe)
  • Snapshot ownership: renderLobsterSvg already returns an inert DocumentFragment from the canonical Solid artwork; renderSolidSnapshot disposes its temporary root before returning, making replaceChildren appropriate. (ui/src/components/lobster-pet-look.ts:11, 7674e4b0dbbe)
  • Existing adapters remain necessary: Production callers still use renderAgentRowChip and renderChatImageLightbox, so retaining those Lit adapters while converting component fixtures respects the migration boundary. (ui/src/pages/chat/components/chat-image-lightbox.ts:49, 7674e4b0dbbe)
  • Inherited CI source failure: The pinned base lacks domain-board.ts and domain-keyed.ts while production importers still reference them. Their deletion is recorded in refactor: remove unused reactive and incognito adapters #169368; this PR touches none of those inputs. The body reports the same baseline bundling failure. (ui/src/plugins/control-ui-dashboard.tsx:11, 84a834e23340)
  • Validation limits: The body reports focused unit and Chromium runs, UI types, and base/head builds. GitHub records a failed UI E2E job and cancelled sibling jobs, which remain unproven. Log retrieval redirects to a blocked Azure storage host, so the failure trace was not inspected. (7674e4b0dbbe)

Likely related people:

  • Peter Steinberger: Raw commit 24af217 adds ui/src/components/agent-row-chip.tsx:14 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 24af217792a0; files: ui/src/components/agent-row-chip.tsx)
  • Jason (Json): Raw commit 7d62a27 adds ui/src/components/mcp-app-unmount.test.ts:84 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 7d62a277fffe; files: ui/src/components/mcp-app-unmount.test.ts)

PR surface

Tests +25. Total +25 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 10 141 116 +25
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 141 116 +25

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is test-maintenance work with no production, configuration, dependency, or persisted-data change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-11T21:57:53.704Z sha 7674e4b :: needs maintainer review before merge. :: none

Reviewed October 11, 2026, 6:17 PM ET / 22:17 UTC (Revision 2).

@steipete
steipete merged commit 3be4118 into main Oct 11, 2026
70 of 88 checks passed
@steipete
steipete deleted the solid2/w-testlit-1 branch October 11, 2026 22:28
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

obviyus added a commit that referenced this pull request Oct 11, 2026
## What Problem This Solves

Fixes `check-test-types-core-2` failures inherited by PRs after the MCP App tests switched from Lit to Solid.

## User Impact

No user-visible change. This restores typechecking for the existing MCP App lifecycle and context-update regressions without weakening their assertions.

## Why This Change Was Made

The fixture migration in #169387 left a raw Solid memo accessor as a component return value and awaited Lit's `updateComplete` on a plain Solid-rendered context-strip element.

Render the memo through a JSX fragment in a `.test.tsx` fixture, and wait for the context strip's observable item/empty state with the existing `waitForSolid` helper. All teardown, retained-node, and context assertions remain intact.

Checked existing work first: #169247 does not change these tests and its `check-test-types-core-2` job is red; #169304 changes different parts of the MCP App tests and does not repair these errors.

## Evidence

Baseline: current `origin/main` at `5889e62f4902b8f3fa4b6eb2cecbbd26f5b8ceb0`, installed with `pnpm install --frozen-lockfile`.

Before, `pnpm run tsgo:test:ui` exited 2:

```text
ui/src/components/mcp-app-unmount.test.ts(40,5): error TS2345: Argument of type '() => SourceAccessor<Node[]>' is not assignable to parameter of type '() => Element'.
ui/src/components/mcp-app-view.test.ts(801,19): error TS2339: Property 'updateComplete' does not exist on type 'Element'.
ui/src/components/mcp-app-view.test.ts(804,19): error TS2339: Property 'updateComplete' does not exist on type 'Element'.
ui/src/components/mcp-app-view.test.ts(815,19): error TS2339: Property 'updateComplete' does not exist on type 'Element'.
[tsgo:ui-components] failed (exit 2)
```

After:

- `pnpm run tsgo:test:ui`: all eight graphs passed, including `ui-components`.
- `node scripts/run-vitest.mjs ui/src/components/mcp-app-unmount.test.tsx ui/src/components/mcp-app-view.test.ts --maxWorkers=1`: 31 tests passed across the regular and isolated UI projects. Test time: 71 ms for unmount and approximately 5.9 s for view (4.6 s is the existing embedded Apps page scenario).
- Changed-file `oxfmt --write` and `oxlint`: passed.
- `node --import ./scripts/tsx.mjs scripts/check-line-cap-ratchet.mts --base origin/main`: passed, no new violations or over-cap growth.

The existing embedded Apps page scenario emits Lit/reactivity and jsdom CSS warnings; it passes without suppressions or retry changes.
- Independent autoreview: scoped clean through P2; no actionable findings.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
## What Problem This Solves

Fixes `check-test-types-core-2` failures inherited by PRs after the MCP App tests switched from Lit to Solid.

## User Impact

No user-visible change. This restores typechecking for the existing MCP App lifecycle and context-update regressions without weakening their assertions.

## Why This Change Was Made

The fixture migration in openclaw#169387 left a raw Solid memo accessor as a component return value and awaited Lit's `updateComplete` on a plain Solid-rendered context-strip element.

Render the memo through a JSX fragment in a `.test.tsx` fixture, and wait for the context strip's observable item/empty state with the existing `waitForSolid` helper. All teardown, retained-node, and context assertions remain intact.

Checked existing work first: openclaw#169247 does not change these tests and its `check-test-types-core-2` job is red; openclaw#169304 changes different parts of the MCP App tests and does not repair these errors.

## Evidence

Baseline: current `origin/main` at `11f576b23cf70615ca4504eb12fdba93591b9c8f`, installed with `pnpm install --frozen-lockfile`.

Before, `pnpm run tsgo:test:ui` exited 2:

```text
ui/src/components/mcp-app-unmount.test.ts(40,5): error TS2345: Argument of type '() => SourceAccessor<Node[]>' is not assignable to parameter of type '() => Element'.
ui/src/components/mcp-app-view.test.ts(801,19): error TS2339: Property 'updateComplete' does not exist on type 'Element'.
ui/src/components/mcp-app-view.test.ts(804,19): error TS2339: Property 'updateComplete' does not exist on type 'Element'.
ui/src/components/mcp-app-view.test.ts(815,19): error TS2339: Property 'updateComplete' does not exist on type 'Element'.
[tsgo:ui-components] failed (exit 2)
```

After:

- `pnpm run tsgo:test:ui`: all eight graphs passed, including `ui-components`.
- `node scripts/run-vitest.mjs ui/src/components/mcp-app-unmount.test.tsx ui/src/components/mcp-app-view.test.ts --maxWorkers=1`: 31 tests passed across the regular and isolated UI projects. Test time: 71 ms for unmount and approximately 5.9 s for view (4.6 s is the existing embedded Apps page scenario).
- Changed-file `oxfmt --write` and `oxlint`: passed.
- `node --import ./scripts/tsx.mjs scripts/check-line-cap-ratchet.mts --base origin/main`: passed, no new violations or over-cap growth.

The existing embedded Apps page scenario emits Lit/reactivity and jsdom CSS warnings; it passes without suppressions or retry changes.
- Independent autoreview: scoped clean through P2; no actionable findings.

Co-authored-by: Ayaan Zaidi <[email protected]>
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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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