Skip to content

refactor(ui): share mascot playback and update stream lifetimes - #176704

Merged
steipete merged 1 commit into
mainfrom
solid2/w-zero-component-playback
Oct 19, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-zero-component-playback

Conversation

@steipete

@steipete steipete commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Mascot animation and update output retain feature-local synchronization that belongs with their existing canvas and stream-follow owners.

User Impact

The mascot preserves its animation phase when visibility or reduced motion changes. Update logs and installation steps follow new output at the bottom, preserve deliberate scrollback, and reset following for a new run without replacing the scroll elements.

Why This Change Was Made

The mascot derives one configuration identity and uses one effect to configure the canvas animator and synchronize playback. Visibility-only changes do not reset the tease timestamp. The existing stream-follow helper accepts an optional content trigger; the update view's two scroll regions use it, while Logs and Activity retain their existing event-driven scheduling. Host tags, CSS, routes, selectors and lazy boundaries are unchanged.

Evidence

Exact comparison: base 56827d40f0dc2bed61e6dd3fe306f1a8d260d687, head 01e7ccb26e3a6bcb78874926e11e2352fc5b9802, same machine and Node 24.22.0.

Check Result
Frozen install Passed on base and head
UI typecheck pnpm tsgo:ui passed with the default tsrs checker. Initial invocation stopped before checker startup on a stale lock left by the interrupted build; the exact task lock was released after verifying its owner and descendants had stopped, then the real check passed.
Focused tests 16 update-view tests passed on the final rebased head with the resolved default pinned Bun runtime and --maxWorkers=1 (42.01s). The unchanged mascot suite's 2 passing assertions are retained from the prior source; playback sources were unchanged by rebase. No Node override used for the final run.
Lint / format / isolated review Passed; canonical isolated autoreview scoped-clean through P2 after one capacity-only retry. Four source hashes remain unchanged.
Production build Base and head passed (pnpm ui:build, exit0 on both). Finalized assets passed sidecar validation and served the three capture states.
Strict performance Both exact revisions fail the same two existing route budget names shown below. Startup stays within its budget; no threshold changed.
Visual behavior Three synthetic 1440×960 states per side passed: mascot reduced-motion cycle, both update streams retaining scrollback, and both following a replacement run without starting an update. All six full frames inspected. Mascot frame identical; update frames differ only in ordinary build metadata.
Production Knip pnpm deadcode:knip passed on the final rebased head, exit0, no findings (671.87s).
Broad CI ci:full run 39182224508 attempt 1 completed: all 64 jobs are terminal. Every UI unit, Control UI E2E, real-Gateway, and security-fast job passed. The only failed roots are the two exact-base-matched checks below; the aggregate fails because of them.
Bytes (gzip) Base Head Delta
Startup JS (7 requests) 337,540 337,549 +9
Startup CSS (1 request) 38,500 38,500 0
Chat boot JS (limit 1,490,000) 1,492,084 1,492,137 +53
New Session boot JS (limit 1,050,000) 1,050,194 1,050,253 +59

The strict failures are chat boot JS gzip and new boot JS gzip on both the exact base and head. The small measured increases accompany the shared content-trigger option and retained configuration identity. This records the overruns; it does not claim a green strict check or change any budget. CI failure attribution still requires matching exact failing test names on main/base.

Pattern / LOC Before After
Component createEffect 3 1
All effects including shared helper 3 2
createRenderEffect / untrack / direct listeners / DOM queries 0 0
Production LOC 418 425
Test LOC 368 385

Survivors: ui/src/components/openclaw-mascot.tsx:97 synchronizes the external canvas animator; ui/src/lib/reactive/stream-auto-follow.ts:47 owns shared scroll synchronization. The feature count drops 66.7% in this focused checkpoint; the lane-wide 70% target remains separate. The seven added production lines replace duplicated scheduling admission with the existing owner and preserve animation timing.

The focused tests emit visible Solid strict-read diagnostics. Static review found complete dependency coverage and preserved live frame-delivery checks; diagnostics are not suppressed or claimed proven inherited.

Screenshots

Synthetic playback before and after: reduced-motion mascot, update scrollback, and new-run tail

CI failure attribution

The latest completed scheduled main run 39176649118 at 943e9af522a8e0070fc051a7052edd5c267dfeaf passed both checks below. Attribution therefore uses separate executions at this PR's exact merge base 56827d40f0dc2bed61e6dd3fe306f1a8d260d687, not the scheduled run.

Failed check in run 39182224508 Exact-base evidence
mock-exports: src/cli/program/root-help.test.ts:33: ./subcli-descriptors.js Same signature, exit 1. Supported --staged mode read all source and manifests from an isolated index whose tree equals the base tree; all 95 helper/loader closure files matched that base. The changed flag alters source transport, so this is not claimed as a literal identical CLI invocation.
chat boot JS gzip: 1,491,341 B exceeds 1,490,000 B The independently built exact base fails pnpm ui:check-performance --json with the same named check at 1,492,084 B. Host-specific byte totals differ from CI; the named failure and absolute threshold match.

These are the only two failed root jobs in the completed run; openclaw/ci-gate is their failed aggregate. Native inherited-failure admission uses the exact-base proof above. The actual CI merge has only the four intended changed files, and recomputing its merge tree matched the tested tree exactly.

Review disposition

The automated LOC-only P1 suggestion is declined: this campaign explicitly permits growth required by a shared primitive or correctness. The seven added production lines add the content trigger to the existing stream-follow owner and preserve mascot timing; there is no separate correctness finding in that suggestion. The complete change was independently reviewed through P2.

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

clawsweeper Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 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-19T00:49:11.698255Z 01e7ccb 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: 01e7ccb26e

ℹ️ 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 +46 to +50
if (options.content) {
createEffect(
() => [options.content?.(), options.identity()],
([, identity], previous) => follow.schedule(identity !== previous?.[1]),
);

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.

P1 Badge Reduce production LOC for this Solid refactor

This refactor adds 27 production lines while removing only 20, for a net increase of seven lines across the three touched production files. The scoped UI review guide requires applying the existing-code refactor checklist, which explicitly requires net production LOC to decrease; consolidate this scheduling ownership without growing the production surface.

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

Useful? React with 👍 / 👎.

@steipete
steipete merged commit b6890b8 into main Oct 19, 2026
115 of 121 checks passed
@steipete
steipete deleted the solid2/w-zero-component-playback branch October 19, 2026 01:15
@steipete

Copy link
Copy Markdown
Contributor Author

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

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. size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant