Skip to content

fix(control-ui): unblock core lint by dropping a duplicate chunk label - #207548

Merged
fuller-stack-dev merged 3 commits into
openclaw:mainfrom
fuller-stack-dev:fix/control-ui-chunking-duplicate-case
Nov 28, 2026
Merged

fuller-stack-dev merged 3 commits into
openclaw:mainfrom
fuller-stack-dev:fix/control-ui-chunking-duplicate-case

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The check-lint-core-5 CI job fails on main and on every PR based on it. ui/config/control-ui-chunking.ts lists case "src/shared/assistant-display-content.ts": twice in the same switch, and oxlint's no-duplicate-case rule reports it as an error. The second copy came in with #207505; the first has been there since #183198. Example failing job: https://github.com/openclaw/openclaw/actions/runs/46149712291/job/140994731390

User Impact

No user-visible change. Contributors get a passing core lint lane again. The built Control UI keeps the same chunk layout it has on main today.

Why This Change Was Made

In a switch, the first matching label wins. On main, src/shared/assistant-display-content.ts matches the earlier label (line 178) and lands in the deferred-ui-support chunk. The later label (line 345, in the group that returns chat-transcript-runtime) can never match.

#207505 added that later label, apparently meaning to move the module into chat-transcript-runtime. But the label was unreachable from the moment it landed, so #207505's own budget numbers were measured with the module in deferred-ui-support. The Control UI performance check passes on main with the module there. Nothing on main needs the move, so this PR removes the unreachable later label.

Chunk assignment for this module: deferred-ui-support before and after. No other label or chunk changes.

Evidence

Tested commit: 5ab8644997c (fix c2108b39d0a merged with main at 7b5470e3358). Current head ab77301c3f2 merges main at afc98065f22 to pick up #207547, which fixes the worktrees e2e failure inherited from main. The diff against main is still the same one-line deletion. Red runs used unmodified main at b46646b9470. The commits between those two bases touch only src/agents/.

Red, unmodified main:

$ node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/config/control-ui-chunking.ts
ui/config/control-ui-chunking.ts:178:10: error eslint(no-duplicate-case): Duplicate case label help: Remove the duplicated case
[oxlint] FAILED (exit 1)

pnpm lint:core on the same commit reports the same no-duplicate-case error. That is the only non-max-lines error locally; CI's changed-scope run downgrades max-lines on untouched files to warnings. CI reported "Found 278 warnings and 1 error" in stripe 5.

Green, this branch:

$ node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/config/control-ui-chunking.ts
(no diagnostics, exit 0)

Chunk assignment unchanged:

  • controlUiStableChunkName("src/shared/assistant-display-content.ts") returns "deferred-ui-support" on both main and this branch.
  • I ran pnpm ui:build on both and mapped every source in every emitted .js.map to its chunk name, with the content hash stripped. Both builds have the same 5,013 module-to-chunk entries, and diff finds no differences. The module appears only in deferred-ui-support.
  • pnpm ui:check-performance passes on both, exit 0. Chat boot JS is 18 requests and 1,335,977 B normalized gzip in both builds, against limits of 20 requests and 1,336,272 B. The largest CSS file is 58,143 B gzip in both, against a ceiling of 58,315 B.

Other checks on this branch:

  • node scripts/run-vitest.mjs run ui/src/app/vite-config.node.test.ts ui/src/app/vite-build.node.test.ts: 2 files, 67 tests passed.
  • git diff --check: clean.
  • node scripts/check-changed.mjs: every lane passed except the dead export scan, which flags five unused exports in files this PR does not touch (cli-root-options.mjs, extensions/codex/src/app-server/dynamic-tool-profile.ts, src/agents/harness/types.ts, src/agents/tool-search-catalog-visibility.ts, src/config/sessions/session-pending-input-history.types.ts). They exist on main without this change.

No test was added: the change deletes a label that could never match, and the lint rule itself is the check.

Not proven: I did not run the packaged browser scenarios from #207505. The module-to-chunk layout of both builds is identical, so they have nothing new to exercise.

CI history on 5ab8644997c (run 46152917381):

Review: no separate autoreview. The diff is a one-line deletion of an unreachable case label.

@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 the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 28, 2026
@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) November 28, 2026 14:10
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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

This PR removes an unreachable duplicate case label from the Control UI chunk selector.

Example: Core lint checks ui/config/control-ui-chunking.ts.

  • Before: The repeated src/shared/assistant-display-content.ts label triggers no-duplicate-case.
  • After: The reviewed head passes check-lint-core-5 while retaining the deferred-ui-support assignment.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal, source-verified lint repair with relevant reported validation and successful exact-head checks.
Proof confidence 🐚 platinum hermit (4/6) No product runtime behavior changes; reported red/green lint output and build comparisons are supported by successful exact-head lint and performance checks.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Contributors encounter a core lint failure caused by an unreachable duplicate case label.
Reason: The maintainer-authored repair restores the existing lint contract without changing browser behavior or adding maintenance machinery.

Regression provenance

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

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR fixes a confirmed lint failure that remains on current main, preserves chunk assignments, and introduces no actionable defects.

Reviewed head: 5ab8644997c41758fa85037b24ede921c364ef8a

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI build maps normalized source module IDs to stable chunk names that Vite uses to produce browser assets.

flowchart LR
  A[Source module IDs] --> B[Manifest key normalization]
  B --> C[Stable chunk selector]
  C --> D[Vite code splitting]
  D --> E[Browser assets]
Loading

Technical review

Best possible solution:

Remove the unreachable later label and retain the existing chunk selector and lint rule.

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

Current main contains both labels in one switch, and the PR supplies the corresponding failing lint diagnostic; no target code was executed during review.

Is this the best way to solve the issue?

Deleting the later unreachable label is the smallest complete repair because the earlier match already determines the module's chunk.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Duplicate Chat chunk label keeps the original intent (b821606: Consolidate transcript media and live events while keeping Chat startup within existing asset budgets; this added label never changed the earlier matching assignment.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a36d048 adds ui/config/control-ui-chunking.ts:88 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:352 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: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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:19 AM ET / 14:19 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit 0e70c20 into openclaw:main Nov 28, 2026
97 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

@fuller-stack-dev
fuller-stack-dev deleted the fix/control-ui-chunking-duplicate-case branch November 28, 2026 15:20
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
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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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