* feat(auth): add admin password reset CLI command and reset password web UI
* fix(auth): invalidate previous reset tokens and use AsyncLocalStorage for link capture
* 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.
Avoid deriving total frames from container duration when the audio tail mismatch is below the dynamic playback stall threshold. This prevents the rendering of phantom trailing frames that the playhead cannot reach during playback.
Also adds comprehensive unit and E2E tests covering both small and large audio tail gaps.
Add an e2e spec covering restart-on-end for the frame-accurate video
player. Drives the real player to its natural end (seek near the tail,
play out the last frames) and asserts both restart triggers resume from
the start: the play/pause control and clicking the video area.
Adds seekToFrame and waitForEnded helpers to VideoPlayerPage.
Address review feedback: an async predicate with setTimeout inside
page.waitForFunction spawns overlapping executions at rAF rate, and checking
currentTime stability before arrival can resolve prematurely.
Reorder to arrival-first: wait for the target frame via a synchronous rAF-polled
predicate, then wait for currentTime to stabilize using a sequential Node-side
loop so browser evaluations never overlap.
Extend the backend-free video-player harness with the app's real comment↔player
wiring (onTimeUpdate capture, player.currentTime(second) seek on comment click,
and a remount to simulate a second user) and add a Playwright spec.
User A comments on 5 distinct random frames (regenerated each run); user B
reloads and clicks each comment. Asserts the seconds-based roundtrip is
loss-free: frameA -> second=frameA/fps -> seek(second) -> floor(second*fps+0.45)
== frameA, so the comment is stored at the frame the author saw and the reader
lands on that exact frame.
Add a Playwright UI integration test framework for the frame-accurate video
player. Tests run against a backend-free harness served by Bun's native HTML
bundler (matching the project's Bun-based dev/prod serving), so no database,
auth or transcode pipeline is required.
- Add @playwright/test with chromium/firefox/webkit projects; the browser is
selectable via the Playwright --project flag (webkit = Safari engine).
- Serve the harness with Bun.serve + bun-plugin-tailwind (no separate Vite
toolchain); commit a deterministic 16x16/5s/30fps fixture video and matching
AssetInfo.
- Add a play/pause spec covering both the play control and clicking the video
area, asserting the native video clock, seekbar fill and frame readout stay
frame-locked after pause (settle-aware, tolerance-based assertions).
- Mock all backend API calls (anchored /api/ and /files/ routes) for isolation.
- Exclude e2e specs from Vitest; add a separate CI job (webkit on macOS).