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 — [Bug]: Closing a file tab overwrites newer on-disk changes · Issue #8475 · pingdotgg/t3code

[Bug]: Closing a file tab overwrites newer on-disk changes #8475

New issue
Copy link
New issue
Copy link
Closed
#8630
Closed
[Bug]: Closing a file tab overwrites newer on-disk changes#8475
#8630
Copy link
Labels
bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

Description

@thomas-toh
thomas-toh
opened on Aug 28, 2026
Issue body actions

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

Setup: T3 Code desktop on device A (macOS laptop) connected to the T3 server running on device B (Windows desktop). Not sure if this is remote-specific, but I tested it on a remote environment.

  1. On device A, open a file in the files panel and type one character. Deleting it afterwards makes no difference (I typed a character, waited 5 s, deleted it).
  2. Change the file on disk from anywhere else. (In the reproduction: echo "APPENDED" >> file in a shell on device B. In the original incident: an agent turn rewriting the file.)
  3. On device A, without touching the editor, close the file tab or switch to another file.
  4. The file on device B is back to the device-A buffer; the appended line is gone.

Expected behavior

Closing a file tab should never write to disk unless the buffer holds changes newer than the file. If the file changed on disk after the last save from this tab, the tab's buffer is stale and must be discarded or reconciled, with a warning at most. In particular, a buffer with no net change (e.g., the reproduction method of typing and then deleting a character) should not write anything.

Actual behavior

On tab close, the editor writes its remembered buffer back to the server. The buffer was loaded before the on-disk change and never refreshed, so the write replaces the newer file with the old contents. The newer change is gone. Nothing in the UI or the orchestration event store records this. The only trace is a projects.writeFile span in server.trace.ndjson from the closing client's connection.

Impact

Major degradation or frequent failure

Version or commit

0.0.34

Environment

Windows 11 server, macOS desktop client connected remotely

Logs or stack traces

Source: ~/.t3/userdata/logs/server.trace.ndjson on the Windows server, spans filtered to
projects.readFile / projects.writeFile. Times local (UTC+1). conn = websocket connection id
of the macOS desktop client. No other connection or process touched the file in any window.

Original incident - spec/docs/30_tools.md
  01:57:05.602  ws.rpc.projects.writeFile  conn=96587f5d   <- small edit in the Mac file panel
  01:57:06.648  ws.rpc.projects.writeFile  conn=96587f5d
  02:01:16      (agent on the server rewrites the file: 108 -> 118 lines)
  02:02:43.885  ws.rpc.projects.readFile   conn=96587f5d
  02:02:43.906  ws.rpc.projects.writeFile  conn=96587f5d   <- file back to 108 lines, byte-identical to pre-rewrite
  No keystroke between 01:57:06 and 02:02:43.

Repro 1 - spec/scratch.md (3 lines)
  03:07:44.897  ws.rpc.projects.writeFile  conn=c37ddc71   <- [Mac] type one char
  03:07:49.335  ws.rpc.projects.writeFile  conn=c37ddc71   <- [Mac] delete it
  03:08:16      [PC] echo "APPENDED FROM PC" >> spec/scratch.md      (file = 4 lines)
  03:08:38.869  ws.rpc.projects.writeFile  conn=c37ddc71   <- [Mac] close the file tab, no keystroke
  03:08:40      [PC] file = 3 lines, appended line gone

Repro 2 - same file
  03:10:40.711  ws.rpc.projects.writeFile  conn=c37ddc71   <- [Mac] type one char
  03:10:45.089  ws.rpc.projects.writeFile  conn=c37ddc71   <- [Mac] delete it
  03:11:03      [PC] echo "ROUND 2 - APPENDED FROM PC" >> spec/scratch.md   (file = 4 lines)
  03:11:57.537  ws.rpc.projects.writeFile  conn=c37ddc71   <- [Mac] close the file tab, no keystroke
  03:12:00      [PC] file = 3 lines, appended line gone

Each Mac writeFile above was followed ~70 ms later by a projects.readFile on the same
connection (the editor's post-save confirm read); omitted for brevity.

Screenshots, recordings, or supporting files

No response

Workaround

Avoid editing the file using the remote tab viewer (use agent to edit or add comments). If not, wait for files written to disk on the server to sync back to the remote client.

Activity

Next
  1. thomas-toh
    added
    bugSomething is broken or behaving incorrectly.
    needs-triageIssue needs maintainer review and initial categorization.
    on Aug 28, 2026
  2. walid-baharwal
    added a commit that references this issue on Aug 29, 2026

    fix(web): closing a file tab no longer overwrites newer changes

    This issue will close once commit 38876e5 is merged into the 'main' branch.
    38876e5
  3. juliusmarminge
    closed this as completedin #8630on Sep 2, 2026
  4. patroza
    added a commit that references this issue on Oct 14, 2026

    Squashed '.repos/effect-smol/' changes from a43c7e244c..e17ecdbe90

    c4c510c
  5. donjor
    added 3 commits that reference this issue on Oct 26, 2026

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    d614a0e

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    4bdc91e
  6. rsi-software-agent
    added 7 commits that reference this issue on Oct 27, 2026

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    40f0718

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    1231787

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    3f0c054

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    9f155e9

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    e996fca
  7. 76 remaining items

  8. rsi-software-agent
    added 3 commits that reference this issue on Nov 24, 2026

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    8d19a4d

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    6e261e0

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    5a4d5ee
  9. donjor
    added 2 commits that reference this issue on Nov 24, 2026

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    7b163fd

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    bb61386
  10. rsi-software-agent
    added 10 commits that reference this issue on Nov 25, 2026

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    3ff4db8

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    dd6944b

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    86593f2

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    eef1b38

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    8d6a7f8

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    895379d

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    c41626c

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    14c2108

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    dd2a53b

    fix(web): file saves no longer overwrite newer disk changes (#1869)

    d4c6c46
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

    bugSomething is broken or behaving incorrectly.needs-triageIssue needs maintainer review and initial categorization.

    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.