Skip to content

[Bug]: Changed root files with a leading space do not reveal their diff #36605

Closed

Description

@StiensWout

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

  1. Use a Git workspace on Linux or macOS and complete a turn that creates or edits a root file named leading.ts (one leading space).
  2. Collapse files in the diff panel.
  3. Click that file in the turn's changed-files list.

Expected behavior

The exact file opens expanded in the diff panel.

Actual behavior

The diff panel opens but leaves the file collapsed. Both the checkpoint file-summary schema and the selection store trim the leading space, so selection cannot match the parsed diff's exact filename.

Impact

Minor bug or occasional failure

Version or commit

Reproduced on upstream main b2259d3.

Environment

Linux, web client, local isolated scenario using Replay (dev). Desktop shares this web implementation. POSIX filenames permit leading spaces.

Logs or stack traces

The real-app scenario clicks the changed file successfully, then fails to find the expanded Collapse leading.ts button on main. The same scenario passes with exact paths preserved through the checkpoint schema and selection store.

Screenshots, recordings, or supporting files

Before: https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/18092e11-d82f-43f7-acec-206e710c7056/leading-space-base.png

After: https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/676a1a27-b460-430d-bab9-954bc68d8d8f/leading-space-head.png

Found by the maintainer bughunt and independently confirmed by Claude Opus 5.5 on 9e180e5, including a real Git numstat and diff-parser probe. Related closed issue #29313 concerned read/save targeting, a different path from turn-file reveal.

Workaround

Manually expand the file in the diff panel. Previously recorded summaries that already lost filename whitespace cannot recover it.

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

    vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions