Skip to content

fix(control-ui): keep assistant display content in the transcript chunk - #207550

Merged
obviyus merged 2 commits into
mainfrom
fix/control-ui-chunking-duplicate-case
Nov 28, 2026
Merged

obviyus merged 2 commits into
mainfrom
fix/control-ui-chunking-duplicate-case

Conversation

@obviyus

@obviyus obviyus commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

check-lint-core-5 fails on every PR that runs it:

ui/config/control-ui-chunking.ts:178:10: error: Duplicate case label (eslint(no-duplicate-case))

#207505 added case "src/shared/assistant-display-content.ts": to the chat-transcript-runtime list. An older case for the same module (#183198) was already in the deferred-ui-support list. In a switch the first label wins, so the new case never ran: a build of main still puts the module in deferred-ui-support, not where #207505 meant it to go.

Why This Change Was Made

Remove the stale deferred-ui-support case and keep #207505's placement. The only importers of the module are ui/src/pages/chat/chat-gateway.ts and ui/src/pages/chat/chat-live-events.runtime.ts, and both are in the chat-transcript-runtime list.

User Impact

No visible change. Chat loads the same code with the same number of requests. Routes that use deferred-ui-support without Chat download 200 fewer raw bytes.

Evidence

  • node scripts/run-oxlint.mjs ui/config/control-ui-chunking.ts: 1 error on main da76574, 0 with this change.
  • pnpm ui:build on main and on this change. Source maps show assistant-display-content.ts in deferred-ui-support before and in chat-transcript-runtime after. The chunk names are the same; only those two chunks change materially (deferred-ui-support -200 B raw, chat-transcript-runtime +178 B raw).
  • scripts/check-control-ui-performance.mts --base-dist <main build>: 0 violations. Chat boot JS 18 -> 18 requests, 1,335,977 -> 1,336,203 B gzip (limit 1,336,272 B), served brotli 1,148,012 -> 1,147,881 B. New Session 16 -> 16 requests.

- #207505 moved src/shared/assistant-display-content.ts to chat-transcript-runtime, but an older case for the same module in the deferred-ui-support list came first, so the new case was dead code and oxlint failed with no-duplicate-case.
- Remove the stale case. The module's only importers (chat-gateway.ts, chat-live-events.runtime.ts) are in chat-transcript-runtime.
@clawsweeper

clawsweeper Bot commented Nov 28, 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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. 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:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 28, 2026
@clawsweeper

clawsweeper Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Removes the earlier assistant-display-content chunk assignment so the module joins its Chat consumers in chat-transcript-runtime.

Example: Build the Control UI with src/shared/assistant-display-content.ts.

  • Before: The earlier switch case selects deferred-ui-support and the duplicate label fails lint.
  • After: The sole case selects chat-transcript-runtime and the duplicate-label error disappears.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-verifiable repair with successful targeted CI; build measurements are contributor-reported and browser CI is still running.
Proof confidence 🦐 gold shrimp (3/6) This build-configuration repair has no visible UI change and is exempt from contributor proof requirements; the body reports before/after builds, source-map placement, and unchanged request counts, supported by successful lint and performance checks but no inspected runtime capture.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A duplicate chunking case blocks lint and prevents the intended Chat transcript bundle placement.
Reason: The collaborator-authored repair restores the recently merged design with a single deletion and no new settings or public contracts.

Regression provenance

Regression provenance — suspected predecessor, not a causality claim: source commit a36d0483f837 by Peter Steinberger; no PR verified.

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR minimally repairs a duplicate switch label still present on current main and restores the intended transcript chunk assignment. No actionable defects found; lint and performance checks pass, while UI CI remains in progress.

Reviewed head: 5d87ab5cd1cef4bad9343839387531cafe57c05d

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Vite chunking configuration maps source module IDs to output bundles that the browser downloads for Control UI routes.

flowchart LR
  A[Source module IDs] --> B[Stable chunk assignment]
  B --> C[Vite build]
  C --> D[Chat transcript bundle]
  C --> E[Deferred support bundle]
  D --> F[Browser Chat route]
Loading

Technical review

Best possible solution:

Retain this one-line deletion so the existing chunk owner assigns the module exactly once alongside its Chat consumers.

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

Current-main source directly establishes the duplicate labels and first-match behavior; the PR reports the corresponding lint failure, and the reviewed head passes that lint check.

Is this the best way to solve the issue?

Deleting the stale earlier case is the smallest complete repair: it fixes lint and activates the assignment intended by the merged startup-budget work without introducing another owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Assistant display-content chunk placement changes intended behavior with a stated reason (a36d048: Separate dormant Chat presentation and streaming implementation from first-screen evaluation.)
  • Chat transcript consolidation keeps the original intent (b821606: Group transcript media and live events already loaded together while keeping Chat within its startup asset budget.)

Testing

Proof path: none.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a36d048 adds ui/config/control-ui-chunking.ts:132 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: a36d0483f837; files: ui/config/control-ui-chunking.ts)
  • Vyctor H. Brzezowski: Raw commit b821606 adds ui/config/control-ui-chunking.ts:345 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b821606080f1; files: ui/config/control-ui-chunking.ts)

PR surface

Source -1. Total -1 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 0 1 -1
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 1 0 1 -1

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

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

Reviewed November 28, 2026, 9:22 AM ET / 14:22 UTC.

@obviyus
obviyus merged commit 800644b into main Nov 28, 2026
151 of 153 checks passed
@obviyus
obviyus deleted the fix/control-ui-chunking-duplicate-case branch November 28, 2026 15:39
obviyus added a commit that referenced this pull request Nov 28, 2026
…chunk (#207592)

## What Problem This Solves

#207505 placed `src/shared/assistant-display-content.ts` in the `chat-transcript-runtime` chunk ("Chat loads events and media together; keep both out of the route entry"). The same module also had an older case in the `deferred-ui-support` list, which made a duplicate `case` and failed lint. #207548 and #207550 each removed one of the two copies, so main now has no case for the module. It falls through to the Chat route boot chunk, `control-ui-boot-chat`, which #207505 meant to keep it out of.

## Why This Change Was Made

Restore the one case in the `chat-transcript-runtime` list, as #207505 intended. The module's only importers, `ui/src/pages/chat/chat-gateway.ts` and `ui/src/pages/chat/chat-live-events.runtime.ts`, are already in that list. There is still only one case for the module, so lint stays clean.

## User Impact

No visible change. Chat makes the same number of startup requests, and its boot entry is slightly smaller.

## Evidence

`pnpm ui:build` and `scripts/check-control-ui-performance.mts` on main 800644b and on this head (`--base-dist` main build): 0 violations on both.

| | main 800644b | this head |
|---|---|---|
| Module location (source maps) | `control-ui-boot-chat` | `chat-transcript-runtime` |
| `control-ui-boot-chat` chunk | 971,819 B raw / 288,708 B gzip | 971,607 B raw / 288,646 B gzip |
| `chat-transcript-runtime` chunk | 80,684 B raw / 28,375 B gzip | 80,862 B raw / 28,436 B gzip |
| Chat boot JS (perf check) | 18 requests, 1,336,210 B gzip | 18 requests, 1,336,203 B gzip (limit 1,336,272 B) |
| New Session boot JS | 16 requests, 819,989 B gzip | 16 requests, 819,989 B gzip |
| CSS (startup, Chat, total) | unchanged | unchanged |

`node scripts/run-oxlint.mjs ui/config/control-ui-chunking.ts`: 0 errors, one case for the module.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…nk (openclaw#207550)

## What Problem This Solves

`check-lint-core-5` fails on every PR that runs it:

```
ui/config/control-ui-chunking.ts:178:10: error: Duplicate case label (eslint(no-duplicate-case))
```

openclaw#207505 added `case "src/shared/assistant-display-content.ts":` to the `chat-transcript-runtime` list. An older case for the same module (openclaw#183198) was already in the `deferred-ui-support` list. In a `switch` the first label wins, so the new case never ran: a build of main still puts the module in `deferred-ui-support`, not where openclaw#207505 meant it to go.

## Why This Change Was Made

Remove the stale `deferred-ui-support` case and keep openclaw#207505's placement. The only importers of the module are `ui/src/pages/chat/chat-gateway.ts` and `ui/src/pages/chat/chat-live-events.runtime.ts`, and both are in the `chat-transcript-runtime` list.

## User Impact

No visible change. Chat loads the same code with the same number of requests. Routes that use `deferred-ui-support` without Chat download 200 fewer raw bytes.

## Evidence

- `node scripts/run-oxlint.mjs ui/config/control-ui-chunking.ts`: 1 error on main 35d95ac, 0 with this change.
- `pnpm ui:build` on main and on this change. Source maps show `assistant-display-content.ts` in `deferred-ui-support` before and in `chat-transcript-runtime` after. The chunk names are the same; only those two chunks change materially (`deferred-ui-support` -200 B raw, `chat-transcript-runtime` +178 B raw).
- `scripts/check-control-ui-performance.mts --base-dist <main build>`: 0 violations. Chat boot JS 18 -> 18 requests, 1,335,977 -> 1,336,203 B gzip (limit 1,336,272 B), served brotli 1,148,012 -> 1,147,881 B. New Session 16 -> 16 requests.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
…chunk (openclaw#207592)

## What Problem This Solves

openclaw#207505 placed `src/shared/assistant-display-content.ts` in the `chat-transcript-runtime` chunk ("Chat loads events and media together; keep both out of the route entry"). The same module also had an older case in the `deferred-ui-support` list, which made a duplicate `case` and failed lint. openclaw#207548 and openclaw#207550 each removed one of the two copies, so main now has no case for the module. It falls through to the Chat route boot chunk, `control-ui-boot-chat`, which openclaw#207505 meant to keep it out of.

## Why This Change Was Made

Restore the one case in the `chat-transcript-runtime` list, as openclaw#207505 intended. The module's only importers, `ui/src/pages/chat/chat-gateway.ts` and `ui/src/pages/chat/chat-live-events.runtime.ts`, are already in that list. There is still only one case for the module, so lint stays clean.

## User Impact

No visible change. Chat makes the same number of startup requests, and its boot entry is slightly smaller.

## Evidence

`pnpm ui:build` and `scripts/check-control-ui-performance.mts` on main 4d25e66 and on this head (`--base-dist` main build): 0 violations on both.

| | main 4d25e66 | this head |
|---|---|---|
| Module location (source maps) | `control-ui-boot-chat` | `chat-transcript-runtime` |
| `control-ui-boot-chat` chunk | 971,819 B raw / 288,708 B gzip | 971,607 B raw / 288,646 B gzip |
| `chat-transcript-runtime` chunk | 80,684 B raw / 28,375 B gzip | 80,862 B raw / 28,436 B gzip |
| Chat boot JS (perf check) | 18 requests, 1,336,210 B gzip | 18 requests, 1,336,203 B gzip (limit 1,336,272 B) |
| New Session boot JS | 16 requests, 819,989 B gzip | 16 requests, 819,989 B gzip |
| CSS (startup, Chat, total) | unchanged | unchanged |

`node scripts/run-oxlint.mjs ui/config/control-ui-chunking.ts`: 0 errors, one case for the module.

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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XS 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