You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): changed root files with a leading space open in the diff panel - #36606
Selecting a turn's changed root file named leading.ts opened the diff panel without revealing the file. The checkpoint-summary contract and selection store both stripped its leading space.
Keep exact Git paths through the contract and selection store. Match the diff parser's trailing-whitespace behavior only at the DiffPanel boundary, preserving today's trailing-space reveal.
Small fast-lane fix: no new state, storage, migration, module or UI flow. Web and the desktop web view share the fix; mobile displays these summaries without turn-file reveal. Discovered by the maintainer bughunt and independently confirmed by Claude Opus 5.5 on 9e180e55693badee0d9f71322f7ded79b1829710 with real Git, numstat and diff-parser probes.
Proof
The finding's store repro failed on main b2259d3c6c and passed with exact selection paths. The retained browser test covers that behavior through the real store and DiffPanel, with files initially collapsed.
The checkpoint-summary schema test fails on base and passes with exact leading/trailing path decoding.
pnpm exec vp run scenarios:prove scripts/scenarios/turn-file-leading-space-reveals.e2e.ts --base b2259d3c6ca71e59cea0c9cc0b9e8d8a90a027f9 --head HEAD: real changed-file click fails on base and reveals the expanded diff on head. The temporary scenario is proof tooling, not shipped code.
The corresponding trailing-space scenario passes on both base and head. It guards existing behavior; no trailing-name user defect is claimed.
pnpm exec vp run check:changed passes. Includes formatting, lint, knip, affected typechecks, focused tests and React compiler checks.
Local cubic: no issues; fork-specific repository context was unavailable.
Before
After
Historical summaries already stored with trimmed paths cannot recover the lost characters. Filenames differing only by trailing whitespace still collide inside the third-party parser, and whitespace-only filenames still cannot be revealed. Those parser limitations are outside this leading-space fix. The trailing-space browser case guards the boundary if the parser changes.
Council review
Reviewer
Round 1
Claude Opus 5.5
9/10
GPT 6.1 Sol
9/10
No blockers or should findings. First-round average did not trigger a second round. Opus's title nit is addressed by the scoped PR title; its whitespace-only-name nit is disclosed above. No separate proof audit or evidence run in the fast lane; the builder supplied real-app red/green proof.
Created with Claude Opus 5.5 (build, trim and review) and GPT 6.1 Sol (bughunt, lead and review) in T3 Code through Claude Agent and Codex.
Macroscope's review found this PR approvable — Preserves whitespace in checkpoint filenames so files with leading spaces can be selected and revealed in the diff panel. The change is limited to filename metadata and viewer navigation, with no material operational exposure identified.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between eb4cb94 and de91799.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The checkpoint file-summary schema and turn-file selection path now preserve filenames with leading or trailing whitespace. The diff panel normalizes trailing whitespace when matching a selected turn file.
The checkpoint file-summary schema accepts non-empty paths without trimming. A test verifies that decoding preserves leading and trailing spaces.
Match turn-file selections apps/web/src/diffPanelStore.ts, apps/web/src/components/DiffPanel.tsx, apps/web/src/components/DiffPanel.browser.test.tsx
The selection store preserves the supplied path. The diff panel trims trailing whitespace when matching a selected turn file. A browser test covers leading- and trailing-space paths.
Selecting a changed file whose name begins with a space now reveals it in the diff panel, and trailing-space behavior is kept. The change is small and tested, and no actionable merge-blocking risk is evident.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the actual fix: changed root files with a leading space now open in the diff panel. It matches the main change in the changeset, which keeps exact paths through the contract and store …
Description check
The description covers the problem, the change, scope, and verification. It states the linked issue (#36605) and gives the commands and results for red/green proof. It follows the template's section s…
Linked Issues check
Issue #36605 requires that selecting a turn's changed root file with a leading space reveals that file expanded in the diff panel. The reported cause was trimming in the checkpoint file-summary schema…
Out of Scope Changes check
All changed files map to the leading-space reveal objective of #36605. The contract schema, selection store, DiffPanel boundary, and their tests each contribute to exact path preservation or to the tr…
Full details: Title check
Explanation
The title names the actual fix: changed root files with a leading space now open in the diff panel. It matches the main change in the changeset, which keeps exact paths through the contract and store and trims trailing whitespace only at the DiffPanel boundary. It is specific and uses the conventional commit form.
Full details: Description check
Explanation
The description covers the problem, the change, scope, and verification. It states the linked issue (#36605) and gives the commands and results for red/green proof. It follows the template's section structure. It also notes limits: stored trimmed summaries, trailing-space parser collisions, whitespace-only filenames, and mobile. The Problem and Change sections are brief but clear. The Verification section gives concrete commands, before/after screenshots, and the observed results.
Full details: Linked Issues check
Explanation
Issue #36605 requires that selecting a turn's changed root file with a leading space reveals that file expanded in the diff panel. The reported cause was trimming in the checkpoint file-summary schema and the selection store. The reviewed head addresses each cause:
packages/contracts/src/orchestrationV2.ts: OrchestrationV2CheckpointFileSummary.path changes from TrimmedNonEmptyString to Schema.NonEmptyString, so leading and trailing spaces survive decoding. The added test in orchestrationV2.test.ts checks exact decoding of a leading-space and trailing-space path.
apps/web/src/diffPanelStore.ts: selectTurn stores filePath ?? null instead of filePath?.trim() || null, so the exact Git path is kept in selection state.
apps/web/src/components/DiffPanel.tsx: selectedFilePath applies trimEnd() and maps an empty result to null. This matches the diff parser's trailing-whitespace behavior, so a leading-space name matches the parsed filename and a trailing-space name keeps its existing reveal.
apps/web/src/components/DiffPanel.browser.test.tsx: a parameterized browser test covers leading and trailing space paths with files initially collapsed, and checks that the file button is expanded.
The PR description reports that the real-app scenario fails on base and passes on head. I did not rerun those scenarios. Known limits are outside the issue's requirements: stored summaries that already lost whitespace cannot recover it, and whitespace-only names cannot be revealed. The issue does not require either case.
Full details: Out of Scope Changes check
Explanation
All changed files map to the leading-space reveal objective of #36605. The contract schema, selection store, DiffPanel boundary, and their tests each contribute to exact path preservation or to the trailing-space guard. The diff shows no unrelated behavior change. The selectTurn change also removes trimming for empty and whitespace-only values. In the store, that value flows to DiffPanel, where trimEnd() yields an empty string that is mapped to null. The contract now accepts whitespace-only path strings. These effects follow from the same path-preservation objective and are disclosed in the PR as limits, so they do not count as unrelated changes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
Complete a replay turn editing root file leading.ts, collapse all diff files, then click that file in the turn's changed-files list. Linux Chromium, 1280×800, light theme, fresh synthetic state on each commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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.
Selecting a turn's changed root file named
leading.tsopened the diff panel without revealing the file. The checkpoint-summary contract and selection store both stripped its leading space.Keep exact Git paths through the contract and selection store. Match the diff parser's trailing-whitespace behavior only at the DiffPanel boundary, preserving today's trailing-space reveal.
Small fast-lane fix: no new state, storage, migration, module or UI flow. Web and the desktop web view share the fix; mobile displays these summaries without turn-file reveal. Discovered by the maintainer bughunt and independently confirmed by Claude Opus 5.5 on
9e180e55693badee0d9f71322f7ded79b1829710with real Git, numstat and diff-parser probes.Proof
b2259d3c6cand passed with exact selection paths. The retained browser test covers that behavior through the real store and DiffPanel, with files initially collapsed.pnpm exec vp run scenarios:prove scripts/scenarios/turn-file-leading-space-reveals.e2e.ts --base b2259d3c6ca71e59cea0c9cc0b9e8d8a90a027f9 --head HEAD: real changed-file click fails on base and reveals the expanded diff on head. The temporary scenario is proof tooling, not shipped code.pnpm exec vp run check:changedpasses. Includes formatting, lint, knip, affected typechecks, focused tests and React compiler checks.Historical summaries already stored with trimmed paths cannot recover the lost characters. Filenames differing only by trailing whitespace still collide inside the third-party parser, and whitespace-only filenames still cannot be revealed. Those parser limitations are outside this leading-space fix. The trailing-space browser case guards the boundary if the parser changes.
Council review
No blockers or should findings. First-round average did not trigger a second round. Opus's title nit is addressed by the scoped PR title; its whitespace-only-name nit is disclosed above. No separate proof audit or evidence run in the fast lane; the builder supplied real-app red/green proof.
Created with Claude Opus 5.5 (build, trim and review) and GPT 6.1 Sol (bughunt, lead and review) in T3 Code through Claude Agent and Codex.
Closes #36605