Skip to content

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

Closed
obviyus wants to merge 4 commits into
mainfrom
fix/main-ui-type-and-cycle
Closed

obviyus wants to merge 4 commits into
mainfrom
fix/main-ui-type-and-cycle

Conversation

@obviyus

@obviyus obviyus commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

check-lint-core-5 fails on every PR based on current main:

ui/src/e2e/dashboard-widget-drop.e2e.test.ts:102:37: error: Spreading to modify object properties in `map` calls is inefficient (oxc(no-map-spread))

#207112 (861216a0) built the saved snapshot with widgets.map((w, i) => (i === 0 ? { ...w, sizeW: 9 } : w)). CI on pushes to main does not run this lint stripe, so main looks green. Examples: #207319, #207317.

Solution

Build the list with snapshot.widgets.with(0, { ...snapshot.widgets[0]!, sizeW: 9 }). This stays copy-on-write: the fixture's snapshot.widgets and its first widget are not mutated, and the other widgets keep their identity, as before. No rule is disabled.

This PR first fixed two other red checks from the same main state. The owning lane landed those fixes and a third separately: #207345 (Skill Workshop import cycle), #207348 (Board drop test type) and #207352 (its redundant type argument, the second check-lint-core-5 error). This branch takes main's versions of those files, so the diff is only this one line.

@fuller-stack-dev first proposed the .with form in #207341 and is credited as co-author. That PR still fails check-guards-architecture because its base predates #207345.

Evidence

  • node scripts/run-oxlint-shards.mts --only=core --split-core --core-stripe=5/5 (the CI check-lint-core-5 command), compared with a clean origin/main: the no-map-spread error is gone and no new error appears. Local runs also report the same max-lines errors on main and on this branch; CI does not report them.
  • pnpm tsgo:ui: clean. ui/src/e2e/dashboard-widget-drop.e2e.test.ts: passes.

@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 P2 Normal backlog priority with limited blast radius. label Nov 28, 2026
@obviyus

obviyus commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Handoff: this PR fixes two PR-only checks that #207138 and #207112 left red on main (details in the body; both reproduce on a clean origin/main 76fadf98). I am not landing it; the lane that merged those PRs owns the fix. Take this branch as-is (local ClawSweeper on 9145ae65: patch is correct, no findings), or close it if you fix it another way. Until one of these lands, every PR fails check-guards-architecture (madge) and check-test-types-core-2, e.g. #207288.

@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 Workshop’s reverse type dependency on its page and matches the board test deferred to its mock’s inferred return type.

Example: CI checks the board’s pending-save test.

  • Before: The deferred returns Promise<void>, which conflicts with mount’s inferred Promise<undefined> mock.
  • After: The deferred returns Promise<undefined>, preserving the same pending-save assertions.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A minimal, source-verified static-contract repair with passing affected checks and no findings; the remaining CI failure still needs disposition.
Proof confidence 🐚 platinum hermit (4/6) No user-visible runtime behavior changes; exact-head architecture and test-type checks validate the repaired contracts, and the inspected linked board screenshots document the preceding feature rather than this repair.
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 architecture and test-type failures inherited from main when submitting unrelated PRs.
Reason: This maintainer-authored repair restores existing checks with narrow type changes and preserves the preceding UI improvements.

Regression provenance

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

Merge readiness

✅ Ready for maintainer review

Keep this PR: it repairs two source-confirmed CI failures still present on fetched main, and no introduced defect was found.

Reviewed head: 9145ae659967871bfad00c8e9e47d47e9037ef5d

Before merge

None.

Findings

None.

Agent review details

How this fits together

Workshop presentation consumes page-owned scope and action results; the board browser test supplies a deferred save and observes layout reconciliation.

flowchart TD
  A[Workshop page owner] --> B[Action presentation]
  B --> C[Solid presentation state]
  D[Board browser test] --> E[Deferred save mock]
  E --> F[Board layout assertions]
  A --> G[Architecture and type checks]
  D --> G
Loading

Technical review

Best possible solution:

Land the focused type repairs through the existing owning lane once the remaining CI gate has an established disposition.

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

Current-main source establishes the circular import and incompatible mock return types; the recorded base diagnostics and successful affected head checks corroborate both without executing target code during this review.

Is this the best way to solve the issue?

The patch repairs each contract at its existing owner without weakening guards, adding runtime machinery, or changing presentation behavior.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Workshop presentation dependency keeps the original intent (b32e655: Scoped pending feedback supported immediate archive and restore presentation while keeping confirmed facts with the page and Gateway.)
  • Board pending-save deferred keeps the original intent (861216a: The browser regression holds a save pending to verify the dropped layout remains visible and a newer snapshot takes precedence.)

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit a596d8d adds ui/src/components/board/board-view.browser.test.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: a596d8d55e08; files: ui/src/components/board/board-view.browser.test.ts)
  • RoboClaw: Raw commit 861216a adds ui/src/components/board/board-view.browser.test.ts:291 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 861216a09fe9; files: ui/src/components/board/board-view.browser.test.ts)

PR surface

Source +4, Tests 0. Total +4 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 8 4 +4
Tests 1 2 2 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 10 6 +4

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, 1:50 AM ET / 06:50 UTC.

@obviyus obviyus changed the title fix(ui): break the Workshop presentation import cycle and type the board save deferred test(ui): fix the no-map-spread lint error in the dashboard widget drop test Nov 28, 2026
@obviyus

obviyus commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as superseded. All three fixes this PR carried landed separately:

@obviyus obviyus closed this Nov 28, 2026
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 P2 Normal backlog priority with limited blast radius. 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