Skip to content

improve: ship less JavaScript when opening Chat or New Session - #201225

Open
roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/marine-crayfish-8
Open

roboclaw-bot wants to merge 5 commits into
mainfrom
openclaw/marine-crayfish-8

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Related: #200929

Status (14:55 UTC): parked, will be superseded. The same validator change (commit 865b4c2) is now integrated in #200929 at 2cd21004. Against main e43b1461, that PR's paired builds measure Chat −747 B and New Session −1,044 B gzip. Merging this one separately would only conflict with #200929, so it stays open but unmerged. If #200929 lands, this closes as superseded; if #200929 is dropped or loses the change, this lands on main as is. The checks-ui-e2e failures on this head are inherited New Session failures on main; #201268 fixes them. cc @vyctorbrzezowski

What Problem This Solves

Chat and New Session download repeated protocol validation code when they open. The duplicate checks take up space in both routes’ startup bundles, which are already over budget.

User Impact

No visible change. Chat downloads 1,105 fewer gzip bytes of JavaScript and New Session 1,352 fewer. Validation rules and request counts are unchanged.

Why This Change Was Made

The activity, session-input, and transcript validators already shipped in the same shared boot chunk. The generator now compiles them as one group, so TypeBox emits repeated checks once, without moving any validation to a later load. Validator groups that load independently stay separate.

Evidence

The paired performance comparison against 392506102468cb92aeb66a6a39ef7b3130583070 passed: Chat boot JS −1,105 B gzip (21 → 21 requests), New Session −1,352 B (17 → 17), startup unchanged. Against the newer base fb34e996 (after other paydowns landed) it still measures −293 B Chat and −310 B New Session. Generator reproducibility, schema parity, focused consumer tests, ui:validators:check, ui:boot-manifest:gen, lint, and the UI and scripts typechecks passed.

Requested by @vyctorbrzezowski.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

roboclaw-bot and others added 2 commits November 18, 2026 13:16
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 55c611ad-2188-8262-aa5a-602c41697ffc
@clawsweeper

clawsweeper Bot commented Nov 18, 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui scripts Repository scripts size: XL labels Nov 18, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 5e09e228b1da3cd8c254d3020c904dd43aa69b66, but the PR head is now 6655f4bb31cc46ebef0226aa731f9a3e91e69b8f. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-18T13:42:02.392Z sha 5e09e22 :: needs maintainer review before merge. :: none

roboclaw-bot and others added 3 commits November 18, 2026 14:09
Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: fec1edeb-0c36-8785-9d75-eabac623f31e
roboclaw-bot added a commit that referenced this pull request Nov 18, 2026
Share repeated schema predicates across the activity, session-input and transcript validators already loaded together. Integrates the scoped source commit 865b4c2 from #201225.

Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
@clawsweeper clawsweeper Bot removed 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 Nov 20, 2026

This branch has not been deployed

No deployments
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. scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants