Repository navigation
test(e2e): stop main's static analysis failing on the tab strip test - #24052
Conversation
…ield #24010's spec read them with Reflect.get, which the low-evidence lint rejects, so every PR's static analysis now fails on main.
|
Warning Review limit reachedNext included review available in 20 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Typed
Windowfield replacesReflect.get/Reflect.set—tests/e2e/tab-strip-active-dock.spec.tsnow declareswindow.__tabStripDockSamplesthroughdeclare global, the same pattern the neighbouring e2e specs use, clearing theanti-slop(no-reflect-get)rule that was failing main'sstatic analysisgate.
The rewrite is a mechanical lint-compliance change with no behavioral surface: the write and read sites are equivalent, the assertions are untouched, and the ?? [] fallback matches the prior undefined-when-unset behavior. The disable comment for consistent-type-definitions mirrors the existing five call sites, so it is not a new suppression style.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Since #24010 merged into main, every open PR fails CI's
static analysischeck, so their unit tests never run. The cause is one line in an end-to-end test that #24010 added. This PR rewrites that line the way the lint rule asks. No user-facing change: only a test file changes.What Changed
tests/e2e/tab-strip-active-dock.spec.tsstored its scroll samples onwindowwithReflect.setand read them back withReflect.get. The low-evidence lint (anti-slop(no-reflect-get), run bypnpm run audit:anti-slop) rejectsReflect.getat line 145.The samples are now a typed
Windowfield, declared withdeclare globalas other e2e specs already do (for examplegithub-url-smart-input-transition.spec.ts). The test writes and readswindow.__tabStripDockSamplesdirectly. The assertions are unchanged.Why
Before:
static analysisfails on main's merge ref for every PR (seen on #23898, #23681 and #23704), which also skips unit tests, relay and package, and failsverify.After: the check passes again, and PRs get their full CI back.
A typed global is the pattern the codebase already uses for values that have to live on
windowbetweenpage.evaluatecalls. It's also what the rule's message asks for. Silencing the rule would hide the untyped read it exists to catch.Linked Issue
Follow-up to #24010 (no issue: main's CI regression).
Visual Proof
N/A: only an end-to-end test file changes. The app is untouched.
Testing
oxlint --config config/oxlint-anti-slop.json tests/e2e/tab-strip-active-dock.spec.ts --deny-warnings: fails on main's copy (145:7 anti-slop(no-reflect-get)), passes with this change.oxlintandoxfmt --checkon the file: clean.tsc -p config/tsconfig.e2e.json: no errors in this file. The e2e project has unrelated type errors on main already, and it isn't a CI gate.The e2e spec itself was not run locally; it isn't a required check.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)