GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(web): migrate browser tests to the disposable render helper (8/8) by juliusmarminge · Pull Request #22267 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 20, 2026

Copy link
Copy Markdown
Member

The last slice of apps/web browser tests still managed React roots, act and lifecycle hooks by hand, so t3code/require-disposable-render flagged them. This moves them onto the disposable render helper from #22187.

Each test now acquires its own render (and any fake timers, spies, storage cleanup or atom registry) with using/await using. Mock state read by vi.mock factories is reset by a setup() call at the top of each test. Assertions are unchanged, and the slice runs the same 69 tests as before.

Files (chunk 8 of 8)

  • src/hooks/useHtmlRenderTheme.browser.test.tsx
  • src/hooks/useLiveRefresh.browser.test.tsx
  • src/hooks/useLocalStorage.hook.browser.test.tsx
  • src/hooks/usePullRequestChecksRefresh.browser.test.tsx
  • src/hooks/useResizableWidth.browser.test.tsx
  • src/hooks/useSettings.favorites.browser.test.tsx
  • src/hooks/useSettings.selector.browser.test.tsx
  • src/hooks/useSettings.sync.browser.test.tsx
  • src/hooks/useStableCallback.browser.test.tsx
  • src/panelAnimations.browser.test.tsx
  • src/state/queries.threadSearch.browser.test.tsx
  • src/state/terminalSessionAvailability.browser.test.tsx
  • src/state/usage.browser.test.tsx

Left unmigrated: none.
router: false: none. Every file runs with the default test router, including the fake-timer and hand-stepped requestAnimationFrame tests.

One small structural change: panelAnimations now passes its observed array as a prop, so the probe's effect lists it as a dependency to satisfy exhaustive-effect-dependencies. The array is stable, so the effect still fires only when suppressed changes.

Verification

vp test run --project browser --reporter=verbose on the 13 files, three consecutive runs:

Run Result act warnings act-environment warnings router warnings
1 69/69 passed 0 0 0
2 69/69 passed 0 0 0
3 69/69 passed 0 0 0
  • vp lint on the 13 files: 0 warnings, including t3code/require-disposable-render
  • tsc-rs --noEmit for apps/web: no errors
  • No touched file imports jsdom, happy-dom or react-dom/client

Done by Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@juliusmarminge @claude
test(web): migrate browser tests to the disposable render helper (8/8)
a4ffbda
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Oct 20, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 20, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Oct 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 4eb6aab

Macroscope's review found this PR approvable — This PR is a browser-test-only migration to disposable rendering and scoped cleanup; product code, shipped defaults, and production behavior remain unchanged. Its runtime impact is limited to test execution and isolation.

Notes:

  • No code objects were reviewed. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge @claude
test(web): keep probe bookkeeping and fixture stacks per test
4eb6aab
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 20, 2026 10:34

Dismissing prior approval to re-evaluate 4eb6aab

@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Oct 20, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Oct 20, 2026
View reviewed changes
@juliusmarminge
juliusmarminge added this pull request to stack #22386 October 20, 2026 16:08
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 393b089d-c024-4cbc-a389-c7b8727815ea
📥 Commits

Reviewing files that changed from the base of the PR and between ab423b2 and 4eb6aab.

📒 Files selected for processing: 13
  • apps/web/src/hooks/useHtmlRenderTheme.browser.test.tsx
  • apps/web/src/hooks/useLiveRefresh.browser.test.tsx
  • apps/web/src/hooks/useLocalStorage.hook.browser.test.tsx
  • apps/web/src/hooks/usePullRequestChecksRefresh.browser.test.tsx
  • apps/web/src/hooks/useResizableWidth.browser.test.tsx
  • apps/web/src/hooks/useSettings.favorites.browser.test.tsx
  • apps/web/src/hooks/useSettings.selector.browser.test.tsx
  • apps/web/src/hooks/useSettings.sync.browser.test.tsx
  • apps/web/src/hooks/useStableCallback.browser.test.tsx
  • apps/web/src/panelAnimations.browser.test.tsx
  • apps/web/src/state/queries.threadSearch.browser.test.tsx
  • apps/web/src/state/terminalSessionAvailability.browser.test.tsx
  • apps/web/src/state/usage.browser.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

📝 Walkthrough

The browser test suites now use shared rendering and timer utilities, per-test fixtures, and asynchronous cleanup instead of manually managed React roots and global lifecycle setup. Existing behavioral coverage remains, with additional pointer-capture assertions in the resizing tests.

Changes: Browser test harness migration

Layer / File(s) Summary
Async rendering and timer-driven tests
apps/web/src/hooks/useHtmlRenderTheme.browser.test.tsx, apps/web/src/hooks/useLiveRefresh.browser.test.tsx, apps/web/src/hooks/usePullRequestChecksRefresh.browser.test.tsx, apps/web/src/state/queries.threadSearch.browser.test.tsx, apps/web/src/panelAnimations.browser.test.tsx
These tests use shared rendering and timer utilities with awaited render, rerender, timer, or event operations. Their existing theme, polling, search, and animation assertions remain.
Disposable hook and settings fixtures
apps/web/src/hooks/useLocalStorage.hook.browser.test.tsx, apps/web/src/hooks/useResizableWidth.browser.test.tsx, apps/web/src/hooks/useSettings.favorites.browser.test.tsx, apps/web/src/hooks/useSettings.sync.browser.test.tsx
These tests replace manual root and lifecycle management with scoped fixtures and asynchronous disposal. The resizing tests also assert that pointer capture clears in additional cases.
Isolated selector and state observations
apps/web/src/hooks/useSettings.selector.browser.test.tsx, apps/web/src/hooks/useStableCallback.browser.test.tsx, apps/web/src/state/terminalSessionAvailability.browser.test.tsx, apps/web/src/state/usage.browser.test.tsx
These tests keep render counters, callbacks, and observed state within per-test helpers while preserving their existing assertions.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 4eb6a

The migrated browser tests have no established merge-blocking issue; merge after normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem, change, affected files, and verification results in detail. It does not provide the required Scope and approval information, such as a triaged issue or explicit m… Add a Scope and approval section. Link the relevant triaged issue or discussion with explicit maintainer approval, or explain why this focused test-harness migration is an obvious small fix that does not require prior approval.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the web test migration and the move to the disposable render helper. The chunk indicator is useful context and does not obscure the main change.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the problem, change, affected files, and verification results in detail. It does not provide the required Scope and approval information, such as a triaged issue or explicit maintainer approval, or explain why this focused migration qualifies for an exemption.

Resolution

Add a Scope and approval section. Link the relevant triaged issue or discussion with explicit maintainer approval, or explain why this focused test-harness migration is an obvious small fix that does not require prior approval.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge mentioned this pull request Oct 20, 2026
test(web): disposable render helper and lint rule for browser tests #22187
Merged
@juliusmarminge
juliusmarminge merged commit 7c94a8e into main Oct 20, 2026
29 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge deleted the test/web-migrate-8 branch October 20, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.