* feat(webui): add mobile friendly file detail and public share view
* fix(webui): address review feedback for mobile file detail and public share view
* fix(webui): use dynamic viewport and flex column layout for mobile file viewer
* fix(webui): support iOS WebKit video fullscreen and guard requestFullscreen
* fix(webui): compact page indicator and layout in mobile PDF control bar
* feat(webui): render pdf pages via live canvas with selectable text
Replace the rasterize-to-PNG pipeline in the PDF viewer with direct
canvas rendering that tracks the current zoom, so text stays crisp when
zoomed in, and overlay a pdf.js TextLayer that makes text natively
selectable when not in draw mode.
- pdf-viewer: render pages onto a live canvas at a zoom-proportional
scale (debounced, memory-capped) instead of a fixed 2x PNG snapshot
- pdf-viewer: add pdf.js TextLayer overlay per page, transformed in
lockstep with the Konva stage so spans stay aligned while panning
and zooming
- drawing-canvas: accept an optional live canvas element and force a
layer redraw when it is swapped
- add text-layer.css with the minimal pdf.js text layer styles
- add e2e spec verifying text selection in view mode and that draw
mode routes drags to the canvas
* fix(webui): show pdf text selection highlight above the page canvas
The pdf.js text layer was stacked below the opaque Konva page canvas, so
the native selection highlight was painted underneath it and invisible
(selection itself worked). Move the overlay above the canvas and gate its
pointer-events on draw mode: auto when not drawing (select text), none in
draw mode so drags reach the Konva stage below (draw markup).
Verified with screenshot pixel analysis: the selected region now renders
the highlight (blue) where it was pure grayscale before.
* fix(webui): transparent selection background for pdf text layer br elements
* fix(webui): stop pdf text selection over-selecting in empty space
The text layer container was user-selectable (user-select: auto), so when
a drag's caret moved into empty space Chromium targeted the container and
extended the selection to a container-content boundary, selecting across
rows (e.g. dragging from line 1 into the gap selected lines 1-2).
Make the container user-select: none while keeping the text spans
user-select: text, so the caret clamps to the nearest selectable text and
the selection stays put when dragging into empty space.
* fix(webui): deselect pdf text when clicking empty space
With user-select: none on the text layer container, Chromium no longer
clears the selection when clicking non-selectable areas. Clear it manually
on mousedown over the container or <br> (not a text span) so clicking
empty space between lines or outside text deselects, matching native
behavior.
* fix(webui): add content-only pinch-zoom and two-finger pan to media viewers
Intercept trackpad pinch (ctrl+wheel), touchscreen pinch (two touches),
and two-finger move inside the image, video, and PDF viewers so they
transform only the media content instead of triggering browser page
zoom (matching Frame.io behavior).
- New shared pan-zoom math (zoomAtPoint, fitScale, isZoomed) and a
usePanZoomGestures hook using native non-passive wheel/touch listeners
with touch-action: none on the media container.
- Plain wheel / two-finger scroll pans the content, but only once the
user has zoomed in; drag-pan is gated the same way.
- Image and PDF viewers no longer reset zoom to fit on container resizes
while the user has manually zoomed (matches the video viewer).
- DrawingCanvas ignores multi-touch moves so single-pointer pan/draw
doesn't fight the pinch handler; the video viewer keeps play/pause on
the container div to avoid double-toggling when the overlay is active.
Includes unit tests for the pan-zoom math.
* fix(webui): disable click-drag pan for pdf and video viewers
When zoomed, PDF and video previously panned on left-button (or
single-finger touch) drag via the shared DrawingCanvas. That conflicts
with left-click semantics: PDF wants the drag for text selection and
video reserves the click for play/pause.
Remove the gated onPan from both viewers so the Konva overlay stays
pointer-events:none when not drawing - clicks pass straight through
(video click-to-play now works cleanly at any zoom) - while panning
remains available via mouse wheel and two-finger gestures. Image keeps
drag-pan.
* feat(webui): remove original-file display fallbacks, use proxies only
WebUI now never uses the raw original file for display. All viewers
(image, video, compare, pdf) render exclusively from transcoded proxies;
when no proxy exists the viewer shows an unavailable placeholder instead
of falling back to media.original.
- getBestTranscode: drop the isRaw fallback candidates
- video-viewer / compare-video-pane: remove the synthetic 'Original'
resolution entry and the original.downloadUrl hasMedia gate
- image-viewer / compare-image-pane: remove original.downloadUrl default
- pdf-viewer: require pdfTranscode.url (no original fallback)
- download menus (video-control-bar, breadcrumb-nav): use
media.original.key for the 'Original' download option instead of the
isRaw transcode marker entry
Backend:
- transcode-video workflow no longer pushes the isRaw:true marker entry
into videoTranscodes (it pointed at the original file key)
- remove media.original.downloadUrl from the DTO, asset service mapping,
MediaInfo DB type, and transcode workflows/activities (it was only
consumed by the removed display fallbacks; downloads already use key
via the download-url endpoints)
Tests/fixtures updated; docs updated to state the proxy-only display
policy.
* refactor: remove isRaw field via data migration, clean legacy media JSON
Add a Prisma data migration that cleans legacy media JSONB on both
assets and watermark_files:
- drop the raw-original marker entries (isRaw: true) from
videoTranscodes / imageTranscodes — they pointed at the original file
key and were only used by the removed display fallbacks / download
menus, which now use media.original.key directly
- strip the isRaw field from remaining transcode entries
- drop original.downloadUrl (removed from the AssetInfo DTO)
The migration is generated via prisma migrate dev --create-only and
applied automatically by migrate deploy in production. It is guarded by
a test (packages/db/src/clean-media-migration.test.ts) that seeds legacy
media JSON, runs the migration SQL, and asserts the transform on both
tables.
With the data cleaned, remove the isRaw field entirely from the codebase:
- DTO schemas + ImageTranscode/VideoTranscode interfaces
- PrismaJson MediaInfo transcode types
- watermark activity isRaw skip (and its test), watermark proxy mapping,
agent-embedding transcode selection, webui transcode filters, and all
test fixtures
AGENTS.md: clarify that the no-manual-migration rule applies to DDL;
data migrations (pure SQL transforms, no schema change) are allowed
inside a --create-only generated migration and must be tested.