Skip to content

fix(test): cache the motion mock per tag in the sidebar rename-offline test - #31279

Merged
iamwhatever merged 1 commit into
mainfrom
fix/sidebar-rename-test-motion-cache
Nov 6, 2026
Merged

iamwhatever merged 1 commit into
mainfrom
fix/sidebar-rename-test-motion-cache

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Turn Frontend Tests on main green again by caching the framer-motion mock in one test file.

framerMotionMockStableTags.test.ts fails on main and on every PR based on it, naming src/test/ChatSidebar.boardRenameOfflineScope.test.tsx:33. That file's motion Proxy getter returns a new component on every read.

Why it matters

Every open PR's Frontend Tests shard is red until this lands, so no PR on a current base can reach PR Readiness.

Not a goal

  • Changing the framerMotionMockStableTags scan.
  • Touching any other test or production code.

What changed (motivation → approach → change)

The scan requires one component per tag, because a fresh type on each read remounts the subtree on every re-render. The mock in website/src/test/ChatSidebar.boardRenameOfflineScope.test.tsx now caches one component per tag in a Map, the same shape ChatSidebar.laneScrollMemory.test.tsx and ChatSidebar.refactor.touchRowMenu.test.tsx use.

Backwards compatibility

Compatible: test-only change.

Removes nothing: only the mock's getter body changes.

Tests

Proof: not provable -- test-only change

  • framerMotionMockStableTags.test.ts fails on a clean origin/main worktree and passes with this change.
  • Determinism: both files passed 3 runs with --sequence.shuffle (seeds 1-3).
  • eslint and tsc -p tsconfig.app.json pass.

Manual verification

N/A — unit coverage sufficient: the change is inside one test's mock.

Related Issues

Closes #31278

Sibling sweep

Swept: the framerMotionMockStableTags scan itself walks every file under website/src; on main it names only this file.
Siblings: none -- the scan reports exactly one uncached motion Proxy on main.

Pattern harvest

Not generalizable: the class already has its rule, the framerMotionMockStableTags scan, which caught this one.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@iamwhatever
iamwhatever requested review from a team and KiroCrewCaptain as code owners November 6, 2026 08:24
@iamwhatever
iamwhatever requested a review from Zedmor November 6, 2026 08:24
@iamwhatever
iamwhatever enabled auto-merge (squash) November 6, 2026 08:24
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Kiro Crew Auto-Pipeline [operator: buluoray]:

Verdict: APPROVE. This turns main green again.

Main CI at 38522b7 is red on Frontend Tests (4): framerMotionMockStableTags.test.ts flags ChatSidebar.boardRenameOfflineScope.test.tsx:33, a motion Proxy getter that builds a new component on every read. That test came in with #10920 (573a192).

This PR caches one component per tag, the same Map shape the other sidebar tests use. Test-only, one file, +9/-1.

Evidence: at this head, the guard test and the rename-offline test both pass (2 files, 4 tests). I wrote the same fix independently before seeing this PR and got the same result. CI on this head is still running.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision c679c7f7d9ca7dec6b03fd1762b59c10d392c110 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of c679c7f7d9ca7dec6b03fd1762b59c10d392c110 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing to check. The PR only changes a test mock and adds or changes no user-visible control, so no screenshot is needed.

[UX-REVIEWED] c679c7f

Description read

[DESCRIPTION-READ] 10afaa26cf71a90daaa314662ad6d8ff26a08c6b483642ac7d37e77d7bb3da27

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of c679c7f7d9ca7dec6b03fd1762b59c10d392c110 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing to check. This is a test-only mock fix. It uses the same per-tag cache shape as its sibling tests and adds no new surface.

[DESIGN-REVIEWED] c679c7f

Description read

[DESCRIPTION-READ] 815baf952eacd6647d63e3f4b87eb8c9749b7ccfcf2eafa46e7bbab721de85e5

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed c679c7f7d9ca7dec6b03fd1762b59c10d392c110 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] c679c7f

Verdict parsed from the review's SHA-scoped output markers for commit c679c7f7d9ca7dec6b03fd1762b59c10d392c110.

False positive or not applicable? A repository writer can comment:
/ai-review override fable c679c7f7d9ca7dec6b03fd1762b59c10d392c110 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of c679c7f7d9ca7dec6b03fd1762b59c10d392c110 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c679c7f

False positive or not applicable? A repository writer can comment:
/ai-review override gpt c679c7f7d9ca7dec6b03fd1762b59c10d392c110 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@iamwhatever
iamwhatever merged commit c90e2c0 into main Nov 6, 2026
97 checks passed
@iamwhatever
iamwhatever deleted the fix/sidebar-rename-test-motion-cache branch November 6, 2026 09:24
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Frontend Tests red on main: uncached framer-motion mock in ChatSidebar.boardRenameOfflineScope.test.tsx

2 participants