Skip to content

refactor(ui): compact lobster sprites and reader sections - #169269

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

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

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Solid ports expanded static lobster artwork and repeated link-reader markup, making the rendering code longer without adding behavior.

User Impact

No user-visible change. Existing tags, classes, selectors, artwork, animation parentage, link policies, and lazy loading boundaries remain intact.

Why This Change Was Made

Cache and clone source-owned SVG templates for static sprites, retaining JSX for dynamic geometry and eyes. Reuse the reader's repeated external-link attributes and files/comments section chrome. The synchronous request and admission owners in the MCP and canvas components remain unchanged.

Touched production files: 2,218 → 1,804 LOC (-414, -18.7%). No dependencies, public APIs, or test cases added.

Evidence

Compared merge base 4d36172e3d7d2c7174fe1a4b8f1c68a91771cee5 with head 1f90c2c091b5960c39fd6b2cf7a8a2b120bfc80a on the same Blacksmith Testbox, Node 24.19.0 / Chromium 151.0.7922.0.

Proof Result Wall time
Existing pet variants/scene and reader content/panel tests, one worker 61 passed 5.34 s
Lobster browser geometry and claw-animation tests, one worker 6 passed 0.69 s
Reader checks/navigation E2E, one worker Passed 14.64 s
pnpm tsgo:ui Passed 47 s
Targeted oxlint / stylelint Passed 145 s / 1 s
pnpm ui:build, base / head Passed 13 s / 13 s
pnpm ui:parity, 24 light/dark shots covering all 49 palettes plus reader files/comments/checks 0 changed pixels; 0 raster-noise pixels 52 s base / 49 s head
Strict UI performance check, base / head Same inherited startup-budget violations; details below <1 s each
Codex autoreview, P0–P2 No actionable findings —

Startup gzip is 421,975 → 421,976 bytes (+1 byte), with the same 12 startup JS requests and no changed loading boundaries. This is within the checker's 64-byte build-variance allowance; both builds use identical supported build metadata. Both revisions exceed the existing 374,861-byte enforced ceiling and have two startup CSS requests against a limit of one. CSS bytes are identical (50,124). Those failures are inherited, not newly waived budgets.

The capture recipes are temporary synthetic fixtures, identical on both revisions. The temporary linked baseline initially lacked a Mermaid dependency and lost Git metadata when the source capsule refreshed; a standalone frozen-lockfile baseline resolved those proof setup failures. The final comparison above is complete.

The four images below are, in order: lobster before, lobster after, reader before, reader after. All captures were inspected and contain synthetic data only.

Lobster artwork before cleanup

Lobster artwork after cleanup

Reader before cleanup

Reader after cleanup

@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.

@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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. 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 static lobster JSX with cloned SVG templates and consolidates repeated reader links and section markup.

Example: Open the reader showing 1 of 2 files and 1 of 3 comments.

  • Before: Separate section implementations display the counts, content, and truncation notices.
  • After: Shared section markup displays the same counts, content, and truncation notices.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused simplification with inspected browser proof, preserved contracts, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Chromium captures exercise the actual Control UI Lobsterdex and reader rendering on synthetic data at the stated base and head; visible artwork and reader output match, supported by reported scoped parity and existing boundary checks.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The established area owner proposes a focused reduction in rendering repetition with matching browser output and no new product surface.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it provides a useful rendering cleanup, preserves existing behavior, and has no actionable review findings; CI is still running.

Priority: P3
Reviewed head: 1f90c2c091b5960c39fd6b2cf7a8a2b120bfc80a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI renders lobster artwork from look and scene properties and reader content from passive document data, producing SVG and accessible HTML.

flowchart TD
  A[Lobster look and scene] --> B[Artwork renderer]
  B --> C[Cloned static SVG]
  B --> D[Dynamic JSX geometry]
  E[Reader document] --> F[Reader links and sections]
  C --> G[Control UI DOM]
  D --> G
  F --> G
Loading

Technical review

Best possible solution:

Retain this focused cleanup with the existing artwork, animation structure, reader behavior, and loading boundaries preserved.

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

No bug reproduction is required for this refactor; source inspection and the supplied browser comparison establish its preservation goal.

Is this the best way to solve the issue?

The shared template factory and reader components reduce repetition while retaining dynamic JSX and the existing rendering owners.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Lobster sprite rendering keeps the original intent (c2d584a: The Solid port established one artwork implementation while preserving looks, geometry, animation, and legacy snapshot consumers.)
  • Reader content rendering keeps the original intent (6d01bf5: The shared-viewer port preserved existing tags, classes, navigation, read-only content, and request ownership.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Introduced change: The pinned introduction diff contains the rendering cleanup only; current main has no intervening changes to these paths, and the verified test merge retains the same scoped change. (ui/src/components/lobster-pet-sprite.tsx:7, 1f90c2c091b5)
  • Preserved rendering and link contracts: Static sprites retain their geometry and direct claw parentage; reader links retain URL normalization, external-link markers, noopener/noreferrer, and no-referrer attributes. (ui/src/components/link-reader-content.tsx:16, 1f90c2c091b5)
  • Inspected browser proof: All four downloaded before/after images were inspected: the Lobsterdex artwork and reader checks, files, comments, and truncation notices match visually; the body identifies the compared revisions and reports scoped light/dark parity. (1f90c2c091b5)
  • Feature history and original intent: refactor(ui): port lobster pet rendering to Solid #168760 and refactor(ui): migrate shared viewers to Solid #168790 established the Solid rendering owners and preservation contracts respected here; earlier-name history also shows substantial prior work by Peter Steinberger. Rename-following and pickaxe searches encountered unavailable historical blobs, without preventing review of the changed contracts. (ui/src/components/lobster-pet-artwork.tsx:102, ff1e1582fbdb)
  • Pinned template dependency contract: The patch directly imports template from @solidjs/web; the installed rc.13 source lazily parses an HTML template and deep-clones its root, confirming independent SVG nodes without an inserted wrapper. No AGENTS.md was found at the dependency root or applicable package ancestors. (packages/web/src/client.ts:437, 5efaf260becb)
  • Validation and checkout: The exact-head check read showed successful UI E2E evidence and other checks still running or queued, with no reported failure; diff whitespace validation passed and the checkout remained clean. No target code, tests, builds, or second reviewer were run during this review. (1f90c2c091b5)

Likely related people:

  • Peter Steinberger: Raw commit c2d584a adds ui/src/components/lobster-pet-artwork.tsx:103 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c2d584acd704; files: ui/src/components/lobster-pet-artwork.tsx)

PR surface

Source -414. Total -414 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 5 527 941 -414
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 527 941 -414

Labels

Label changes:

  • add P3: This is a behavior-preserving maintenance cleanup with no reported user-facing defect.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a behavior-preserving maintenance cleanup with no reported user-facing defect.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • 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 11, 2026, 2:22 PM ET / 18:22 UTC.

@steipete
steipete merged commit cd7834b into main Oct 11, 2026
91 checks passed
@steipete
steipete deleted the solid2/w-deslop-1 branch October 11, 2026 18:48
@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 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: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XL 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