Skip to content

feat: chat file-panel UX polish + sandbox LaTeX toolchain#2148

Merged
larryro merged 6 commits into
mainfrom
feat/chat-canvas-ux-and-sandbox-latex
Jun 25, 2026
Merged

feat: chat file-panel UX polish + sandbox LaTeX toolchain#2148
larryro merged 6 commits into
mainfrom
feat/chat-canvas-ux-and-sandbox-latex

Conversation

@larryro

@larryro larryro commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

External-agent chat file-panel UX improvements, plus a LaTeX toolchain in the sandbox image so pandoc can produce publication-grade PDFs. Each change is its own commit.

Changes

feat(platform) — fullscreen toggle for the chat side panel

The docked right-side panel was too narrow for reading documents. Added an expand/collapse control in the panel header that grows it to a full-viewport overlay (reusing the existing mobile overlay path), with Escape to exit. The overlay is z-50 so it covers the sticky z-50 composer instead of letting it bleed through at the bottom.

fix(platform) — canvas file-action toolbar no longer clips in the docked panel

The floating Source/Preview/Copy/Download card was wider than the narrow docked viewer column, so its left edge was clipped (and the last content line could tuck behind it). The card is now capped to the viewer width and wraps to a second row when needed; the content gutter is sized from the card's measured height (the old fixed pb-14 cleared by only ~2px).

fix(platform) — refresh preserves expanded folders + open file

Clicking Refresh collapsed the workspace file tree back to root and dropped the open file, because the body was keyed by refreshNonce (forcing a remount). It's now keyed by threadId alone — the tree already re-fetches its expanded dirs in place off refreshNonce, and a stopped session is re-probed via an effect rather than a full remount.

feat(platform) — sticky Source/Preview across files

The view mode was remembered per file path, so each newly-opened doc reverted to the source default. It now tracks the last-picked mode as the sticky default for untouched files (mirroring the shared wrap toggle), while files you explicitly toggle still keep their own choice.

feat(sandbox) — LaTeX/XeTeX toolchain for pandoc PDF output

Added texlive-xetex texlive-latex-recommended texlive-fonts-recommended texlive-lang-chinese lmodern to the sandbox-runtime image so pandoc --pdf-engine=xelatex --toc yields real TOC / page numbers / headers-footers / title page instead of the render-and-stitch fallback.

  • lmodern is pulled explicitly: pandoc's default template needs lmodern.sty, but it's only a Recommends that --no-install-recommends drops.
  • texlive-lang-chinese provides xeCJK so the Chinese workspace docs typeset (Noto CJK fonts were already baked for the live browser). Chinese output requires -V CJKmainfont="Noto Sans CJK SC".
  • Image size 4.46 → 5.39 GB (~880 MB).

Verification

  • Frontend (Playwright against the dev app, geometry/hit-testing, not just screenshots): fullscreen overlay covers the composer and Escape restores the docked pane; toolbar stays inside the viewer column (wraps to 2 rows) and the last line clears it; refresh keeps vatplus/source expanded and the open file selected; a never-opened doc inherits the last-picked Preview mode.
  • Sandbox (e2e in the rebuilt image as session role uid 10001): xelatex present; pandoc → xelatex PDF for English (with --toc) and Chinese (CJK text extractable via pdftotext) — 3/3 pass.
  • tsc --noEmit and oxlint --type-aware clean on all touched files.

larryro added 6 commits June 25, 2026 18:07
Add an expand/collapse control to the chat panel header so a cramped docked
panel can grow to a full-viewport overlay (reusing the mobile overlay) for
reading documents or the live browser, with Escape to exit. Raise the overlay
to z-50 so it covers the sticky composer instead of letting it bleed through.
…he docked panel

Cap the floating action card to the viewer width and let it wrap, so its
buttons stack to a second row instead of overflowing a narrow docked column and
being clipped. Size the content gutter from the card's measured height so the
last line always scrolls clear of it (the fixed pb-14 cleared by only ~2px and
tucked content behind a wrapped card).
…g workspace files

Key the files body by threadId alone instead of threadId+refreshNonce, so
Refresh no longer remounts and collapses the tree to root. The tree already
re-fetches its expanded dirs in place off the refreshNonce prop; a stopped
session is re-probed via an effect that flips sessionRunning back on, without
remounting the whole body.
…iles

Track the last picked view mode and use it as the default for files the user
hasn't explicitly toggled, so choosing Preview on one doc carries to the next
(like the shared wrap toggle) while individual files still override.
Add texlive-xetex/latex-recommended/fonts-recommended/lang-chinese + lmodern so
'pandoc --pdf-engine=xelatex --toc' produces publication-grade PDFs (real TOC,
page numbers, headers/footers, title page) instead of the render-and-stitch
fallback. lmodern is pulled explicitly because pandoc's default template needs
lmodern.sty but --no-install-recommends drops it; lang-chinese provides xeCJK so
the Chinese workspace docs typeset (Noto CJK fonts already baked).
…ent toolchain

The Validate-images gate was already failing on main: the document-conversion
tools (libreoffice/poppler/pandoc) pushed sandbox-runtime to 3114 MB, over the
2800 MB budget. The new LaTeX/XeTeX layer adds ~660 MB more (~4.0 GB total), so
raise the budget to 4400 MB (~10% headroom) and document the toolchain that
justifies the size.
@larryro larryro merged commit 3218839 into main Jun 25, 2026
53 checks passed
@larryro larryro deleted the feat/chat-canvas-ux-and-sandbox-latex branch June 25, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant