Skip to content

chore(deps): upgrade @pierre/diffs to 1.5.2 and @pierre/trees to beta.6 - #16644

Merged
juliusmarminge merged 1 commit into
mainfrom
t3code/bump-pierre-diffs-1.5
Oct 7, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
t3code/bump-pierre-diffs-1.5

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Problem

We pinned @pierre/diffs at 1.3.0-beta.10 with a five-hunk local patch, and @pierre/trees at 1.0.0-beta.4. Since then Pierre shipped 1.3 through 1.5.2, with parser, worker and virtualization fixes. 1.4 also replaced the editor API that the editable Files panel uses.

Bumping it directly causes two regressions:

Change

  • Bump: @pierre/diffs 1.5.2 and @pierre/trees 1.0.0-beta.6.
  • Files editor: moved to the 1.4 edit API (@pierre/diffs/edit, edit, onEditChange, EditProvider createEditor).
    • The panel stays read-only until the worker's highlight has painted, then attaches the editor. The editor reuses that result, so no file is highlighted on the main thread.
    • Plain text, files past Pierre's tokenize limit, and failed worker highlights become editable immediately, as before.
    • The editor owns the draft. Our own saves echoing back keep the file's identity; a change from elsewhere replaces it.
  • Patch: cut from five hunks to two.
  • Quoted file names: the parser now decodes git-quoted names itself, including ---/+++-only patches. So resolveFileDiffPath and mobile reviewModel no longer unquote a second time. That second pass turned back\slash.txt into backslash.txt.

Upstream changes that come with the bump:

  • src/Dockerfile, build/Makefile, tools/BUILD, .star and .odin files get syntax highlighting.
  • Hunk counts in truncated patches are repaired.
  • A worker that fails to start gives up after 10 s instead of loading forever.

Scope and approval

Maintainer-requested dependency bump (Julius). It touches web and mobile only because they import the same Pierre packages. #10508 edits the old patch file and will need rebasing onto this one.

Verification

Main-thread time while opening the 11.7k-line ChatView.tsx in the Files panel. Measured with a longtask observer, same scratch repo, headless Chromium, three runs each.

Build Longest task while opening Becomes editable after click
main (beta.10) 228, 118, 110 ms immediately; highlight lands ~2 s later
this PR, editor attached on open 4403, 3868 ms ~4.5 s
this PR 156, 118, 109 ms when the highlight paints, ~2.2 s

Highlighting for a nested docker/Dockerfile. Same file and viewport.

Before (main) After
Before: docker/Dockerfile renders as plain text After: docker/Dockerfile is syntax highlighted

Real browser, scratch repo (no real files edited), with no console errors:

  • Typing saves to disk and focus stays in the editor.
  • An external edit on disk is adopted without a manual refresh.
  • Undo walks back the in-app edits and stops at the external change.
  • A review comment on L5–L7 follows its lines when lines are inserted above it, and the composer gets the matching chip.

Tests:

  • fileEditorVirtualization.test.ts: 29/29 pass with the patch; 15 fail without its wrapped-row hunks.
  • diffRendering.test.ts adds a literal-backslash case.
  • StyledDiffCodeView.test.tsx now expects Pierre's 10 s worker-start timeout for a held pool.
  • fileEditorHighlight.test.ts and fileEditorLanguageReadiness.test.ts are deleted. They exercised the two patch hunks upstream now owns, by driving renderer internals that 1.5 replaced.
  • Focused run: 104 tests across the 8 touched files pass. Web and mobile typecheck pass, the web production build passes, and no new lint warnings.

Not verified:

  • Mobile on a device. Covered only by typecheck and reviewModel/shikiReviewHighlighter tests.
  • A recording of the freeze. I couldn't capture one reliably headless, so the long-task table stands in for it.

Behavior change: the undo history no longer survives closing a file and reopening it; edits within a session undo as before.

🤖 Generated with Claude Code — Claude Opus 5.5 (1M context)


Devin Review

…0-beta.6

Move the editable Files surface to the 1.4 edit API. Pierre highlights an
edit session on the main thread, so the panel stays read-only until the
worker's highlight has painted, then attaches the editor.

Upstream now covers the stale-highlight, grammar-readiness and
option-forcing hunks of our patch. The rest shrinks to the subpath exports
and the wrapped-row height retention from #10018.

The parser now decodes git-quoted names itself, so drop our second decode,
which turned a literal backslash into nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Oct 7, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 7, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This dependency upgrade also rewires the production file editor and diff renderer, including worker-highlight readiness, edit synchronization, virtualization, and cache behavior. The changes span user-facing web and mobile review paths and are broader than routine dependency maintenance.

You can add or adjust custom eligibility rules. Learn more.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB −24 B (−0.5%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB −24 B (−2.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB −41 B (−0.2%) 29.3 KiB ✅
Claude Live turn messages 2 1 −1 (−50.0%) 8 ✅

Baseline: 517188b · PR result: 799d365 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 22351285-37c9-441d-a84b-bb0c4958b680
📥 Commits

Reviewing files that changed from the base of the PR and between 517188b and 799d365.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • apps/mobile/package.json
  • apps/mobile/src/features/review/reviewModel.ts
  • apps/web/package.json
  • apps/web/src/components/diffs/AnnotatableCodeView.tsx
  • apps/web/src/components/diffs/StyledDiffCodeView.test.tsx
  • apps/web/src/components/diffs/StyledDiffCodeView.tsx
  • apps/web/src/components/files/FilePreviewPanel.tsx
  • apps/web/src/components/files/ReadOnlySourcePreview.tsx
  • apps/web/src/components/files/fileContentRevision.test.ts
  • apps/web/src/components/files/fileContentRevision.ts
  • apps/web/src/components/files/fileEditorHighlight.test.ts
  • apps/web/src/components/files/fileEditorLanguageReadiness.test.ts
  • apps/web/src/components/files/fileEditorVirtualization.test.ts
  • apps/web/src/components/files/projectFilesQueryState.ts
  • apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
  • apps/web/src/lib/diffRendering.test.ts
  • apps/web/src/lib/diffRendering.ts
  • apps/web/vite.config.ts
  • patches/@pierre%2Fdiffs@1.3.0-beta.10.patch
  • patches/@pierre%2Fdiffs@1.5.2.patch
  • pnpm-workspace.yaml
💤 Files with no reviewable changes (4)
  • apps/web/src/components/files/fileEditorHighlight.test.ts
  • apps/web/src/components/files/fileContentRevision.ts
  • apps/web/src/components/files/fileEditorLanguageReadiness.test.ts
  • patches/@pierre%2Fdiffs@1.3.0-beta.10.patch

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The PR upgrades Pierre packages and updates their local diff patch. It migrates editable file previews to the edit API, updates diff viewer types, and changes mobile and web review path mapping to use parser-provided names directly.

Changes

Pierre editor and diff integration

Layer / File(s) Summary
Upgrade Pierre packages and patch
apps/mobile/package.json, apps/web/package.json, pnpm-workspace.yaml, patches/*, apps/web/vite.config.ts, apps/web/src/components/files/fileEditorVirtualization.test.ts
The @pierre/diffs catalog version changes to 1.5.2, and its local patch is updated with partial layout-cache invalidation, resize reconciliation, and package exports. The app dependency and Vite entry point are updated. Virtualization tests use the new edit API.
Update diff viewer types and tests
apps/web/src/components/diffs/*, apps/web/src/components/files/ReadOnlySourcePreview.tsx, apps/web/src/components/pullRequest/PullRequestCodeTab.tsx
Diff viewer props, handles, and callback types specify undefined as the second generic argument. The worker initialization timeout test expects a rejection.
Migrate editable file previews
apps/web/src/components/files/FilePreviewPanel.tsx, apps/web/src/components/files/projectFilesQueryState.ts, apps/web/src/components/files/fileContentRevision*, apps/web/src/components/files/fileEditor*Readiness.test.ts, apps/web/src/components/files/fileEditorHighlight.test.ts
FilePreviewPanel uses the edit API and tracks editor changes and highlight readiness. Query state exposes the current project file contents. The editor-specific cache-key helper and two editor test files are removed.
Preserve parser-provided Git paths
apps/mobile/src/features/review/reviewModel.ts, apps/web/src/lib/diffRendering.ts, apps/web/src/lib/diffRendering.test.ts
Mobile and web path mapping no longer unquotes parser-provided names. A web test checks that a quoted path containing an escaped backslash resolves with a literal backslash.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant FilePreviewPanel
  participant WorkerPool
  participant FileRenderer
  participant ProjectFileQuery
  participant SaveQueue
  FilePreviewPanel->>WorkerPool: Prime highlighting
  WorkerPool->>FilePreviewPanel: Return highlight result
  FilePreviewPanel->>FileRenderer: Provide file contents and edit readiness
  FileRenderer->>FilePreviewPanel: Send editor change
  FilePreviewPanel->>ProjectFileQuery: Update optimistic contents
  FilePreviewPanel->>SaveQueue: Queue changed contents
Loading

Suggested reviewers: t3dotgg, maria-rcks

Merge Risk: ⚪ Minimal · up to 799d3

No actionable merge-blocking issue remains after the reviewed changes and normal checks.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the dependency upgrades, which are the primary changes in the pull request.
Description check ✅ Passed The description covers the problem, changes, scope and approval, verification results, unverified items, and the undo-history behavior change. It provides focused test and build results and includes U…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@juliusmarminge
juliusmarminge merged commit f8ed2a0 into main Oct 7, 2026
34 of 35 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/bump-pierre-diffs-1.5 branch October 7, 2026 01:07
github-actions Bot added a commit to davidvanderklay/t3code-flake that referenced this pull request Oct 7, 2026
## What's Changed
* fix(web): show attempted paths in file preview errors by @maria-rcks in pingdotgg/t3code#15628
* fix(vcs): passive sidebar rows stop retaining remote pollers by @maria-rcks in pingdotgg/t3code#15666
* feat(web): group keybindings settings by area with a page toolbar by @maria-rcks in pingdotgg/t3code#12822
* feat(web): stop T3-owned subagents from Lineage by @Bil0000 in pingdotgg/t3code#15211
* feat(web): add fast actions to linked pull requests by @maria-rcks in pingdotgg/t3code#16627
* feat(web): open right panel tab menu with Mod+T by @Bil0000 in pingdotgg/t3code#15686
* fix(server): provider sessions clean up when their start is interrupted by @juliusmarminge in pingdotgg/t3code#15571
* fix(web): show "No project" near the top of the new thread picker by @juliusmarminge in pingdotgg/t3code#16628
* refactor(server): instrument WS RPCs in group middleware by @juliusmarminge in pingdotgg/t3code#15548
* chore(deps): upgrade @pierre/diffs to 1.5.2 and @pierre/trees to beta.6 by @juliusmarminge in pingdotgg/t3code#16644
* fix(relay): a host restarting onto a deleted tunnel gets a new one by @juliusmarminge in pingdotgg/t3code#16649
* fix(server): recover a deleted tunnel when Cloudflare says "Tunnel not found" by @juliusmarminge in pingdotgg/t3code#16648
* fix(web): iPhone Duo fold controls follow the phone's orientation by @gabrielelpidio in pingdotgg/t3code#16630
* fix(web): keep workspace options when expanding lineage by @maria-rcks in pingdotgg/t3code#16635
* fix(web): preserve bare anchor placeholders in markdown by @maria-rcks in pingdotgg/t3code#16637
* fix(pi): preserve provider identity in discovered models by @maria-rcks in pingdotgg/t3code#16661
* fix(auth): preserve explicitly granted pairing scopes by @juliusmarminge in pingdotgg/t3code#9785
* feat(auth): separate environment administration permissions by @juliusmarminge in pingdotgg/t3code#9786
* feat(auth): separate source control write permissions by @juliusmarminge in pingdotgg/t3code#9787
* feat(auth): separate filesystem read and write permissions by @juliusmarminge in pingdotgg/t3code#9788
* feat(auth): separate browser preview control permissions by @juliusmarminge in pingdotgg/t3code#9789
* feat(auth): separate diagnostics and usage permissions by @juliusmarminge in pingdotgg/t3code#9790
* feat(auth): allow passive terminal observation by @juliusmarminge in pingdotgg/t3code#9791
* fix(auth): keep old clients connected across scope changes by @juliusmarminge in pingdotgg/t3code#10298
* feat(server): hosted agents like ChatGPT can sign in to the T3 MCP server by @juliusmarminge in pingdotgg/t3code#16718


**Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261006.2752...v0.0.46-nightly.20261007.2761

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261007.2761
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant