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 — fix(app): reread a file that changes again during a read by Karanvir1729 · Pull Request #61983 · anomalyco/opencode

Conversation

@Karanvir1729

@Karanvir1729 Karanvir1729 commented Nov 5, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #61982

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A forced file load joined the read already in flight, so a change arriving during a refresh left the tab on older content. A forced load that joins a read now triggers one more read when it lands. If the #52941 reopen fix also merges, a first open reads twice.

How did you verify your code works?

New case in e2e/regression/review.spec.ts: 3 of 3 failed without the fix, 3 of 3 passed with it. Throttled to 1.6 Mbps, a 100 KB file written twice 300 ms apart: stale in 6 of 6 on 2.2.5, 0 of 6 with this fix.

Screenshots / recordings

Before (first refresh's response held 600 ms, a 1-line file): before

After, the same steps: after

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Not ticked yet: I have not tested this myself. Claude ran the checks above.

AI assistance: Claude (Claude Code) investigated this, wrote the fix and the test, ran the checks above, and drafted this description. I have not reproduced it, tested it or reviewed the change by hand yet. Claude spotted the race by reading the code during a hunt with GenClass, a tool I work on, which replays the same steps with the server's responses delivered later or in different orders. The stale tab showed in those replays, but GenClass did not report it; Claude's own check of the page caught it.

Sorry, something went wrong.

Uh oh!

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

All reactions
@Karanvir1729
fix(app): reread a file that changes again during a read
ccca9ba
A forced load joined the read already in flight, so a second change that
arrived before the first refresh landed left the tab on the older content.
Read once more when a forced load joined a running read.
@Karanvir1729
Karanvir1729 requested review from Brendonovich and Hona as code owners November 5, 2026 06:26
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • Not all checklist items are checked. Please confirm you have tested locally and have not included unrelated changes.

Please edit this PR description to address the above within 72 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

All reactions

Sorry, something went wrong.

Uh oh!

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

@opencodejr opencodejr Bot closed this Nov 5, 2026
@opencodejr

opencodejr Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for tracking this race down and writing such a clear reproduction! This is already fixed on the latest dev by #61818 (c777f9a). It reworked how file contents load: when a forced load joins a read that is still running, the file is marked for one more read once that read finishes, whether it succeeded or failed. That is the same behaviour this PR adds. #61818 also adds its own regression case in e2e/regression/review.spec.ts. The fix is on dev now and should ship in the next release. If you can still reproduce a stale tab on a build that includes it, please comment on #61982 with the steps.

All reactions

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Hona Hona Awaiting requested review from Hona
@Brendonovich Brendonovich Awaiting requested review from Brendonovich

Uh oh!

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

Assignees

No one assigned

Labels

needs:compliance This means the issue will auto-close after 2 hours.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

app: file tab stays on older content when a file changes again during a refresh

Uh oh!

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

1 participant

@Karanvir1729
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.