Skip to content

feat(web): diff file tree, image zoom, and HTML/PDF file viewer (upstream ports) - #249

Merged
TheDarkPhantom merged 4 commits into
mainfrom
feat/upstream-file-tree-viewer
Sep 29, 2026
Merged

TheDarkPhantom merged 4 commits into
mainfrom
feat/upstream-file-tree-viewer

Conversation

@TheDarkPhantom

Copy link
Copy Markdown
Owner

What

Four hand-ported upstream features covering the changes panel and viewing files in the app, one commit each:

Skipped

Verification

  • vp test run on fileTreeExpansion, diffFileTree.logic, FilePreviewPanel, ElectronProtocol, and parseChangelog: all pass
  • tsgo --noEmit for apps/web and apps/desktop: clean (desktop prints only pre-existing effect suggestions)
  • vp lint / vp fmt on the touched paths: clean
  • vp run check:avicode: passes

Needs a manual pass in the desktop app: the diff tree toggle and reveal, the Files collapse-all button, zooming an expanded image, and an HTML file plus a PDF in the file viewer (packaged build, for the CSP change).

🤖 Generated with Claude Code

TheDarkPhantom and others added 4 commits September 30, 2026 05:29
The Files panel's collapse-all toggle kept its own flag, so it went stale once
folders were opened or closed by hand. It now reads the tree's expansion state
through shared fileTreeExpansion helpers and only shows when folders exist.

Ported from pingdotgg#8889

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A long diff had no way to see its changed files as folders. A toolbar toggle in
the diff panel now opens a Pierre file tree beside the diff; picking a file
expands it if collapsed and scrolls the diff to it. The choice persists in
localStorage. The Files panel now shares the tree theme via pierre-tree-theme.ts.

The pull request Code tab half of the upstream change is skipped: the fork has
no pullRequest/ surface. Also folds in two small upstream follow-ups to the
same tree: a file-to-symlink type change no longer yields a duplicate path
(pingdotgg#11075), and clicking the already-selected row reveals it
again (pingdotgg#9951).

Ported from pingdotgg#9330

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
An expanded screenshot was capped to the viewport with no way to read small
text. The image dialog now hosts a ZoomableImage: scroll or click to zoom around
the pointer, drag or use the arrow keys to pan, Enter/+/-/0 from the keyboard.
Arrow keys still page between images unless there is horizontal room to pan
(the guard from pingdotgg#11470). Modal dialogs now also block
type-to-focus so zoom keys do not jump into the composer.

Ported from pingdotgg#10869

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
HTML and PDF files could only be opened in the in-app browser; the file viewer
showed HTML as source and tried to read a PDF as text. The viewer now frames
the file from its signed workspace-file asset URL. HTML runs in an iframe
sandboxed with allow-scripts allow-forms allow-popups allow-modals (no
allow-same-origin, so an opaque origin), and a header toggle switches between
page and source, remembered in localStorage. A link to a line still opens the
source. PDFs skip the text read and use Chromium's viewer in an unsandboxed
frame. The in-app browser button stays. The frame reloads when the thread
checkpoints so agent edits show up.

Packaged desktop served frame-src 'self' only, which blocks frames from the
environment's HTTP origin, so the renderer CSP now allows frame-src blob:
http: https: (matching upstream pingdotgg#11265). Only the workspace-file case is
ported; the fork has no media-file resource for host files.

Ported from pingdotgg#9143

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 labels Sep 29, 2026
@TheDarkPhantom
TheDarkPhantom merged commit 06c981b into main Sep 29, 2026
12 checks passed
@TheDarkPhantom
TheDarkPhantom deleted the feat/upstream-file-tree-viewer branch September 29, 2026 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 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