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 — app: file tab stays on older content when a file changes again during a refresh · Issue #61982 · anomalyco/opencode

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

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
app: file tab stays on older content when a file changes again during a refresh#61982
Copy link
Labels
pending closetriaging

Description

@Karanvir1729
Karanvir1729
opened on Nov 5, 2026
Issue body actions

Description

An open file tab can stay on older content until the next change when its file changes twice quickly on a slow connection (an edit, then a formatter).

load() in packages/app/src/workspaces/files/model.tsx returns the read in flight even for force: true, so the second filesystem.changed joins a read that predates it.

Plugins

None

OpenCode version

2.2.5

Steps to reproduce

  1. opencode serve, open a 100 KB file in a tab.
  2. Throttle to 1.6 Mbps, 150 ms latency.
  3. Write the file twice, 300 ms apart.

Headless Chromium: first write's content shown in 6 of 6 tries; unthrottled, 0 of 4.

Screenshot

From a run with the first refresh's response held 600 ms, on a 1-line file: before

Operating System

macOS 26.2

Terminal

Not relevant (web app)

AI assistance: Claude (Claude Code) investigated this, reproduced it with the measurements above, wrote a fix and a test, and drafted this report. I have not reproduced it by hand or reviewed the fix myself 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.

Activity

  1. opencodejr commented on Nov 5, 2026

    @opencodejr
    opencodejrBot
    on Nov 5, 2026
    Contributor
    More actions

    Thanks for the detailed report and the measurements! The race you describe is real in 2.2.5. In 2.2.5, load() returns the read already in flight even when force: true is passed.

    I think this is a duplicate of #61818, a merged PR that fixes exactly this bug on dev. It was merged after the 2.2.5 release, so it isn't in a released version yet. With that change, a forced reload that arrives during a read now triggers one more read once the current one finishes, so the tab ends up on the latest content.

    Possible duplicates and related items, ordered by likelihood:

    • fix(app): reread a workspace file changed during its read #61818: merged fix for this exact race ("Lost change during a read")
    • fix(app): reload a file tree directory changed during its listing #61814: the same kind of race, fixed for file tree directory listings
    • desktop: file tree and preview pane show stale file contents after agent edits #52941: file tree and preview showing stale contents after agent edits
    • Desktop: file tree shows a stale directory snapshot (Reload does not refresh it) #57099: file tree showing a stale directory snapshot
    • fix(gui-plugins): reread a file when the file browser opens it #61961: rereading a file when the file browser opens it

    The bot will close this issue as a duplicate in 1 day unless you reply explaining how your problem is different, for example if you can still reproduce it on a build that includes #61818.

  2. opencodejr
    added
    pending close
    triaging
    on Nov 5, 2026
  3. Karanvir1729 commented on Nov 5, 2026

    @Karanvir1729
    Karanvir1729
    on Nov 5, 2026
    Author
    More actions

    Closing as a duplicate of #61818, which landed a few hours before I filed this. Thanks for the fix.

  4. Karanvir1729
    closed this as not plannedon Nov 5, 2026
  5. opencodejr commented on Nov 5, 2026

    @opencodejr
    opencodejrBot
    on Nov 5, 2026
    Contributor
    More actions

    Thanks for confirming! The fix from #61818 will reach the web app with the next release after 2.2.5. If the stale tab still shows up on a build that includes it, please comment here or open a new issue.

  6. opencodejr
    closed this as duplicateon Nov 6, 2026
  7. opencodejr commented on Nov 6, 2026

    @opencodejr
    opencodejrBot
    on Nov 6, 2026
    Contributor
    More actions

    Closing as a duplicate of #61818, as you confirmed. That PR fixes this race on dev: when a file changes again during a read, the app now reads it once more instead of joining the older read. It isn't in 2.2.5 and should be in a later release. Thanks again for the clear report and measurements. If the stale tab still appears on a version that includes #61818, please open a new issue and link this one.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending closetriaging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.