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 — Right-side diff intermittently throws VirtualizedFileDiff trailing context mismatch on 0.0.45 · Issue #19787 · pingdotgg/t3code

Right-side diff intermittently throws VirtualizedFileDiff trailing context mismatch on 0.0.45 #19787

New issue
Copy link
New issue
Copy link
Closed as duplicate
Closed as duplicate
Right-side diff intermittently throws VirtualizedFileDiff trailing context mismatch on 0.0.45#19787
Copy link
Labels
via-triageFiled through npx t3 triage

Description

@g1331
g1331
opened on Oct 15, 2026
Issue body actions

What happened

While opening the right-side diff panel in T3 Code (Alpha) 0.0.45, the app displayed an error:

VirtualizedFileDiff: trailing context mismatch (additions=78, deletions=74)

The reporter does not know which preceding action triggered the inconsistent state. Refreshing the app restored normal operation.

The affected file was a C header. Its repository-relative path and the project/thread route have been redacted.

Diagnosis

The supplied stack points to the diff renderer’s layout calculation:

getExpandedLineCount
→ getLayoutLineCount
→ computeRenderRangeFromWindow
→ render

Inspection of @pierre/[email protected], pinned by T3 Code v0.0.45, maps this error to getTrailingContextRangeSize in dist/utils/virtualDiffLayout.js.

The function calculates the number of remaining lines on each side after the final hunk and throws when those counts differ. The reported values, 78 and 74, represent those remaining context counts, not the patch’s total additions and deletions.

The local trace contains a RpcClient.review.getDiffFileContents span approximately three seconds before the error. It lasted 528.6 ms and has no error or interruption marker. The trace does not include the returned file contents, patch, or the frontend exception, so it cannot establish which data or state caused the mismatch.

PR #16644 upgraded the library to 1.5.2 after v0.0.45. The newer library changes the boundary calculation used here, but retains the mismatch check. This incident has not been reproduced against that version, so whether the upgrade resolves it is unknown.

Steps to reproduce

No deterministic reproduction has been found.

Observed sequence:

  1. Use the T3 Code (Alpha) 0.0.45 desktop app.
  2. Open the right-side diff panel for a changed C header.
  3. Intermittently encounter the error below.
  4. Refresh the app; normal operation resumes.

The exact preceding actions and recurrence rate are unknown.

Expected: the diff displays without an uncaught rendering error.

Version

0.0.45.

The locally running desktop executable’s version was also verified as 0.0.45.

Environment

Windows desktop app, using the t3code://app renderer.

The affected environment’s server version, local/remote topology, and provider/model were not established during this investigation.

Evidence

Reporter-supplied error, with the application route omitted and the affected filename replaced:

Error: VirtualizedFileDiff: trailing context mismatch (additions=78, deletions=74) for [redacted-header].h
    at st (t3code://app/assets/getDiffFileInput-YQh84APe.js:1399:4234)
    at q (t3code://app/assets/getDiffFileInput-YQh84APe.js:1399:4475)
    at Ie.getExpandedLineCount (t3code://app/assets/renderDiffChildren-COCoC-Q1.js:1:65647)
    at Ie.getLayoutLineCount (t3code://app/assets/renderDiffChildren-COCoC-Q1.js:1:65848)
    at Ie.computeRenderRangeFromWindow (t3code://app/assets/renderDiffChildren-COCoC-Q1.js:1:66314)
    at Ie.render (t3code://app/assets/renderDiffChildren-COCoC-Q1.js:1:61244)
    at Oe (t3code://app/assets/diffFileContents-CGvaQm9y.js:1:46604)
    at e.computeRenderRangeAndEmit (t3code://app/assets/diffFileContents-CGvaQm9y.js:1:36582)
    at e.render (t3code://app/assets/diffFileContents-CGvaQm9y.js:1:19790)
    at t3code://app/assets/diffFileContents-CGvaQm9y.js:1:49892

Selected local trace metadata, with timestamps expressed relative to the reported error:

~T-10.3s  RpcClient.review.getDiffPreview
           durationMs=1696.2; no error/interruption marker

~T-3.5s   RpcClient.review.getDiffFileContents
           durationMs=528.6; no error/interruption marker

~T+8.7s   RpcClient.review.getDiffPreview
           durationMs=1570.3; no error/interruption marker

These spans establish nearby diff activity, not the cause of the exception. The exact exception was not found in the inspected local desktop/server traces.

Related issues

No matching report was found by searching open and closed issues and PRs for the exact error and VirtualizedFileDiff.

  • chore(deps): upgrade @pierre/diffs to 1.5.2 and @pierre/trees to beta.6 #16644 upgrades the underlying diff library; its effect on this incident is unverified.
  • Python docstring bodies highlight as code in the diff panel because partial patches are tokenized without grammar context #11739 concerns syntax highlighting in partial diffs, rather than this layout exception.

Fix applied or workaround

Refreshing the app restored normal operation, as reported by the user.

No application files, settings, databases, or services were changed during the investigation.

Filed by

Prepared by GPT-6 using the Codex harness, following the official T3 Code triage playbook. This investigation was conducted in an existing Codex session rather than launched through npx t3 triage.

Activity

  1. juliusmarminge commented on Oct 15, 2026

    @juliusmarminge
    juliusmarminge
    on Oct 15, 2026
    Member
    More actions

    Note

    Grok responding on behalf of Julius.

    This needs a retest on the latest nightly before we can act on it. The error is thrown inside @pierre/diffs (getTrailingContextRangeSize in virtualDiffLayout), not in T3 Code, and since 0.0.45 #16644 upgraded that library from 1.3.0-beta.10 to 1.5.2, which reworks this boundary calculation. 1.5.2 still has the check, so it may still happen, but there's no repro on the current version.

    If it happens again on the latest nightly, please comment with:

    1. The app version and whether the diff was for a working-tree, turn, or PR diff.
    2. Whether the file has CRLF line endings or no trailing newline (common causes of mismatched context counts).
    3. A minimal sanitized file pair or patch that reproduces it, if you can.

    Refreshing the app is the workaround for now. Without a repro on current builds this will close automatically.

    Reacted by Umaru
  2. juliusmarminge
    added
    needs more infoInitial triage showed no bug. Awaiting more info
    via-triageFiled through npx t3 triage
    on Oct 15, 2026
  3. juliusmarminge
    removed
    needs more infoInitial triage showed no bug. Awaiting more info
    on Oct 22, 2026
  4. juliusmarminge commented on Nov 12, 2026

    @juliusmarminge
    juliusmarminge
    on Nov 12, 2026
    Member
    More actions

    This is the same problem as #28025, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

  5. juliusmarminge
    closed this as duplicateon Nov 12, 2026
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

    via-triageFiled through npx t3 triage

    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.