Skip to content

test(ui): fix the no-map-spread lint error in the dashboard widget drop test - #207341

Merged
fuller-stack-dev merged 3 commits into
openclaw:mainfrom
fuller-stack-dev:fix/dashboard-widget-drop-map-spread
Nov 28, 2026
Merged

fuller-stack-dev merged 3 commits into
openclaw:mainfrom
fuller-stack-dev:fix/dashboard-widget-drop-map-spread

Conversation

@fuller-stack-dev

Copy link
Copy Markdown
Member

What Problem This Solves

main fails check-lint-core-5 on every PR: ui/src/e2e/dashboard-widget-drop.e2e.test.ts:102 spreads inside a map callback, which oxc(no-map-spread) rejects. The line came in with #207112.

User Impact

None. Test-only lint fix; CI's core lint lane passes again.

Why This Change Was Made

The test's saved board replaces only the first widget's size. snapshot.widgets.with(0, { ...snapshot.widgets[0]!, sizeW: 9 }) builds the same array without spreading inside map (Array.prototype.with is already used in ui/src). What the test asserts is unchanged.

Evidence

  • node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/src/e2e/dashboard-widget-drop.e2e.test.ts: on main it reports 102:37: error oxc(no-map-spread); with this change it reports nothing.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/dashboard-widget-drop.e2e.test.ts: 1 test passed.
  • node scripts/check-changed.mjs: every lane passes except the dead-export scan, which reports getCommandOptionsWithRootOptions and AgentHarnessSideQuestionRequest in files this PR does not touch (inherited from main).
  • This PR will still show the two other failures red on main (the Skill Workshop import cycle in check-guards-architecture and the board view mock type in check-test-types-core-2); test(ui): fix the no-map-spread lint error in the dashboard widget drop test #207294 fixes those and is not duplicated here.

@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: 🐚 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

Replaces a map-and-spread expression with Array.prototype.with when constructing the dashboard resize test’s saved snapshot.

Example: The resize test saves Release schedule at sizeW 9 while retaining Verification.

  • Before: The fixture produces the intended widgets but violates oxc/no-map-spread.
  • After: The fixture produces the same widgets and passes the core lint lane.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving test repair with successful exact-head lint and no actionable findings.
Proof confidence 🐚 platinum hermit (4/6) No shipped behavior changes; exact-head core lint succeeds, and the author reports the focused browser test passing.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: PR validation fails because a dashboard test fixture violates the repository lint rule.
Reason: A minimal maintenance repair restores the affected lint lane without changing product behavior or weakening test observations.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes a correct, minimal lint repair still needed on main; no introduced defects were found.

Reviewed head: ac8c441b140929e8dd914157c2b0354f5a4b1e68

Before merge

None.

Findings

None.

Agent review details

How this fits together

The browser test supplies board snapshots through a mock Gateway and checks pending resize geometry, rejection rollback, successful retry, and menu interaction.

flowchart LR
  A[Board fixture] --> B[Browser resize test]
  B --> C[Mock Gateway]
  C --> D[Control UI board]
  D --> E[Geometry and interaction assertions]
Loading

Technical review

Best possible solution:

Retain the one-line fixture replacement and handle the separately owned architecture failure through the existing CI landing policy.

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

Main contains the prohibited map-and-spread expression under an enabled lint rule, while the exact-head lint lane passes; no target code was executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete repair: it preserves the fixed fixture’s values, ordering, and untouched widget reference using an array operation already used elsewhere in the UI.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Saved dashboard snapshot fixture keeps the original intent (861216a: Construct a successful resize response while preserving the rest of the board so the browser test can verify retry settlement and retained geometry.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 329f312 adds ui/src/lib/board/widget.test-support.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 329f312443bf; files: ui/src/lib/board/widget.test-support.ts)

PR surface

Tests 0. Total 0 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 1 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 1 0

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, 2:51 AM ET / 07:51 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit 08a545d into openclaw:main Nov 28, 2026
70 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member 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. 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