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): await the file save without draining background timers by romil-bijarnia · Pull Request #29807 · pingdotgg/t3code

Conversation

@romil-bijarnia

@romil-bijarnia romil-bijarnia commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Problem

The file-save browser test can hang in vi.runAllTimersAsync() because it drains timers for the entire page, including background environment discovery. Background work can keep scheduling timers after the controlled file write has already completed.

The same “writes a pending draft once when the file switches surfaces under StrictMode” case reaches the 15-second project timeout on main at 57cd0590 and on #29727.

Change

Resolve the controlled save inside React act and await its updates instead of draining every background timer. Keep the fake debounce clock and the existing assertions that exactly one draft is written and the pending state is cleared.

Scope and approval

This is a small, focused test-harness bug fix under CONTRIBUTING.md's obvious-bug exception. It changes one existing test, with no product code, assertion removal, timeout increase or retry. Searches for the test, pending drafts and timer draining found no open PR for this repair. #28805 shares a session predicate but does not change this test's timer handling.

This repair is separate from the MCP parsing PR because it corrects an independent failure already present on main.

Verification

macOS, Node 26.12.1, Effect 4.1.2, based on 57cd0590.

  • A temporary repeating background timer makes the original test reach its existing 15-second timeout. With the repair, the same test passes with that timer still present. The temporary timer was removed before committing.
  • The uninstrumented focused browser test passes with both original save assertions unchanged.
  • vp run check:changed origin/main --concurrency 2 passes formatting, lint, both Knip checks, affected typechecks and the selected browser test.
  • The full web suite with four workers reports 5,412 passed and one failure in the unchanged GuestPage scrolling case; the repaired file-save case passes. A default-concurrency run also encounters the unchanged PDF reload case. Those full-suite results are not claimed as green.

Sorry, something went wrong.

Uh oh!

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

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@romil-bijarnia
test(web): await the file save without draining background timers
535574a
@romil-bijarnia romil-bijarnia mentioned this pull request Nov 3, 2026
fix(mcp): accept CR and mixed line endings in response streams #29727
Merged
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T01:15:43.720431Z 535574a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 3, 2026
macroscopeapp[bot]
macroscopeapp Bot approved these changes Nov 3, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 535574a

Macroscope's review found this PR approvable — The change is confined to an ignored browser test and is described as awaiting file-save updates without draining background timers. No product behavior change or material operational exposure is identified.

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.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The browser test now clears the unsaved-file result before awaiting the pending write resolver inside React’s act. It removes the direct resolver call and the subsequent fake-timer flush.

Changes: File save session test

Layer / File(s) Summary
Update pending-write test
apps/web/src/components/files/fileSaveSessions.browser.test.tsx
The test imports React’s act, clears the unsaved-file result, and awaits the write resolver inside act. It no longer calls the resolver directly or flushes all fake timers.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 53557

The test update is mergeable with no concrete blocking risk identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title names the test-only change: it makes the file-save test await the save inside React act without draining background timers. The changeset is a single test file that replaces vi.runAllTimersA…
Description check Passed The description follows the template sections (Problem, Change, Scope and approval, Verification). Problem explains the hang in vi.runAllTimersAsync() and gives a CI reference. Change states the act-b…
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: Title check

Explanation

The title names the test-only change: it makes the file-save test await the save inside React act without draining background timers. The changeset is a single test file that replaces vi.runAllTimersAsync() with act-wrapped resolution, so the title matches the main change. It uses the conventional commit form with a plain-language description.

Full details: Description check

Explanation

The description follows the template sections (Problem, Change, Scope and approval, Verification). Problem explains the hang in vi.runAllTimersAsync() and gives a CI reference. Change states the act-based fix and the kept assertions. Scope and approval cites the obvious-bug exception and checks for existing PRs. Verification lists the focused runs, the temporary timer reproduction, and the full-suite results, including the failures it does not claim as green. The template asks for a conventional title and an agent/model note at the end when an agent was used. The description does not include an agent or model line, and it does not say whether that applies. These gaps are minor, so the check passes.

Finishing Touches
Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ast-grep (0.51.1)

ast-grep could not parse rule config: /ast-grep-rules/ast-grep-essentials/rules/go/security/zip-slip-filepath-join-archive-entry-go.yml

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: f6503f0
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 67ac93b1-00e9-4ff4-bea0-428299dcfcf7
Commits

Reviewing files that changed from the base of the PR and between f6503f0 and 535574a.

Files selected for processing: 1
  • apps/web/src/components/files/fileSaveSessions.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.

All reactions

Sorry, something went wrong.

Uh oh!

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

@romil-bijarnia ChatGPT Codex Connector

romil-bijarnia commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

The GitHub CI run now passes, including the full Test Web job and the required aggregate Check: https://github.com/pingdotgg/t3code/actions/runs/41558324841. This isolates the file-save timeout also observed on main at 57cd059, without changing product code, save assertions or timeout settings. Could a maintainer review this baseline CI repair? It is currently needed to unblock #29727 while keeping the two underlying problems in separate PRs.

All reactions

Sorry, something went wrong.

Uh oh!

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

@romil-bijarnia ChatGPT Codex Connector

romil-bijarnia commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #29813, merged as 2d2299a. The merged fix isolates the discovery runtime and preserves the test's full timer/debounce coverage. Closing this alternative so there is only one fix for the underlying timeout.

All reactions

Sorry, something went wrong.

Uh oh!

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

@romil-bijarnia romil-bijarnia closed this Nov 3, 2026
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:XS 0-9 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in 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

@romil-bijarnia
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.