Skip to content

chore(web): port upstream preview and layout fixes (2026-10-09 round 3) - #271

Merged
TheDarkPhantom merged 4 commits into
mainfrom
chore/upstream-web-fixes-2026-10-09
Oct 9, 2026
Merged

TheDarkPhantom merged 4 commits into
mainfrom
chore/upstream-web-fixes-2026-10-09

Conversation

@TheDarkPhantom

Copy link
Copy Markdown
Owner

Upstream shipped a batch of file-preview and layout fixes on 2026-10-08. This hand-ports the ones that apply to the fork's diverged code and records why the rest do not.

Ported

  • fix(web): images, video, HTML and PDF preview in a thread before its first message pingdotgg/t3code#17352 (Julius Marminge) Images, HTML and PDF now preview in a thread before its first message. A draft has no server thread, so the asset request resolved to "not found". Drafts now send their workspace root on the existing workspace-file resource (the fork's workspaceRoot override, honoured only for registered projects) instead of upstream's new draft-workspace-file resource, which depends on upstream's filesystem-read auth scope.
  • fix(web): centered scrollers no longer shift when the scrollbar appears pingdotgg/t3code#17077 (maria) Centered scrollers no longer shift sideways when the scrollbar appears. Ports the require-centered-scroll-gutter lint rule and fixes the four fork sites it flags: preview empty state, preview unreachable page, usage page, and a reasoned suppression on the image preview, which never scrolls.
  • fix(web): file previews handle downloads, in-page links, and repo paths, and favicons stop leaking internal hosts pingdotgg/t3code#16950 (Julius Marminge)
    • HTML previews and inline HTML attachments allow downloads (allow-downloads in the iframe sandbox and the asset CSP).
    • Markdown headings get GitHub-style ids, so table-of-contents links work. An in-page link scrolls to its heading without writing the fragment to the URL. Desktop routes through the hash, so the old behaviour navigated away from the thread.
    • Favicon requests send only a public hostname, never the port, and skip private, tailnet, reserved and internal-looking hosts. The fork had no filtering, so upstream's host classification comes over as a new apps/web/src/lib/faviconHost.ts, and chat link favicons now go through it.

Skipped

Verification

  • vp test run FilePreviewPanel.test.ts, lib/favicon.test.ts, markdown-heading-ids.test.ts, markdown-links.test.ts, server http.test.ts: 94 passed
  • vp lint on changed files: 0 errors. Linting apps and packages with the new rule turned up exactly the four sites fixed here.
  • tsgo --noEmit for apps/web, apps/server, oxlint-plugin-t3code: clean
  • vp run check:avicode and vp run test:avicode: pass

🤖 Generated with Claude Code

TheDarkPhantom and others added 4 commits October 9, 2026 13:53
…essage (pingdotgg#17352)

A draft has no thread on the server yet, so the workspace-file asset it
requested resolved to "not found". Drafts now name their workspace root on
the existing workspace-file resource, which the server honours when it is a
registered project. Upstream added a new draft-workspace-file resource gated
by its filesystem-read scope; the fork reuses its own workspaceRoot override
instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rs (pingdotgg#17077)

A classic scrollbar narrows a scroller when it appears, so content centered
inside it jumped sideways once it grew past the fold. Ports the
require-centered-scroll-gutter lint rule and adds scrollbar-gutter-both to the
fork's flagged scrollers: the preview empty and unreachable states, and the
usage page. The image preview never scrolls, so it carries a reasoned
suppression. Upstream's other sites (device panel, attachment preview, pull
request and provider placeholders) do not exist in the fork.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…read, favicons stop leaking internal hosts (pingdotgg#16950)

- HTML previews and inline HTML attachments add allow-downloads to their
  sandbox, so download links and buttons in the page work.
- Rendered markdown headings get GitHub-style ids, and an in-page link
  scrolls to its heading without writing the fragment to the URL. Desktop
  keeps its route in the hash, so the old pushState (or the browser
  following a link with no target) navigated away from the thread.
- Favicon requests send only a public hostname, never the port, and skip
  private, tailnet, reserved, and internal-looking hosts. The fork had no
  host filtering at all, so this ports upstream's classification as a new
  web file and routes chat link favicons through it.

Not ported: upstream's repo-root resolution for inline code in a rendered
file. The fork resolves inline code from the workspace root already, with
no sibling-relative base directory.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Oct 9, 2026
@TheDarkPhantom
TheDarkPhantom merged commit 0ac707c into main Oct 9, 2026
12 checks passed
@TheDarkPhantom
TheDarkPhantom deleted the chore/upstream-web-fixes-2026-10-09 branch October 9, 2026 06:09
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