BlueGit

timfa filemanager

Document bulk watched-status flow

timfa Tim Falken · pushed by timfa

Authored 2026-05-15 · 6 months ago

Hash
5e47c7f1092be837394cfa29fa2ebdeadc8c1dc7
Parent
e6a17fae
1 file changed +2 −1
.github/technical-reference.md +2 −1
@@ -75,6 +75,7 @@
75 75 - POST /api/files/copy - Copies a file to a destination folder with conflict strategies (`error`, `overwrite`, `rename`) and user-folder size-limit checks.
76 76 - POST /api/files/video-stream - Creates a short-lived HLS session for a video and returns playlistUrl, durationSeconds, subtitleTracks, and subtitleSummary ({total, converted, skipped}).
77 77 - DELETE /api/files/video-stream/:sessionId - Explicitly releases an active short-lived video stream session and stops backend processing.
78 - POST /api/files/watched-statuses - Returns fast per-user watched statuses for up to 500 file paths without triggering expensive metadata/hash work; response is { statuses: { [filePath]: 'fully'|'partway' } }.
78 79 - POST /api/files/watch-progress - Records per-user watch status (`partway` >=10%, `fully` >=70%) for sidebar "Watched by" display.
79 80
80 81 ## server/routes/share.js
@@ -193,7 +194,7 @@
193 194 - isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
194 195 - makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
195 196 - makeFileItem(item) - Renders tile icons first, then applies any cached watched overlay state (`fully` filled eye, `partway` outlined eye).
196 - loadWatchedStatusesForCurrentDir() - Fetches /files/meta for video files in the current directory, derives the logged-in user's watched state, caches it per path, and updates tile overlays after metadata arrives.
197 - loadWatchedStatusesForCurrentDir() - Fetches watched states in one bulk POST /files/watched-statuses request per directory (with legacy /files/meta fallback), caches statuses per path, and updates tile overlays quickly.
197 198 - attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
198 199 - beginSidebarLoad() - Aborts in-flight sidebar requests and increments a load token so stale async responses cannot mutate the current sidebar state.
199 200 - openSidebar(item) - Renders item details/actions in sidebar; roots show alias + original name + usage stats, hide Move To/Delete, keep Rename.
@@ -75,6 +75,7 @@
75- POST /api/files/copy - Copies a file to a destination folder with conflict strategies (`error`, `overwrite`, `rename`) and user-folder size-limit checks.
75- POST /api/files/copy - Copies a file to a destination folder with conflict strategies (`error`, `overwrite`, `rename`) and user-folder size-limit checks.
76- POST /api/files/video-stream - Creates a short-lived HLS session for a video and returns playlistUrl, durationSeconds, subtitleTracks, and subtitleSummary ({total, converted, skipped}).
76- POST /api/files/video-stream - Creates a short-lived HLS session for a video and returns playlistUrl, durationSeconds, subtitleTracks, and subtitleSummary ({total, converted, skipped}).
77- DELETE /api/files/video-stream/:sessionId - Explicitly releases an active short-lived video stream session and stops backend processing.
77- DELETE /api/files/video-stream/:sessionId - Explicitly releases an active short-lived video stream session and stops backend processing.
78- POST /api/files/watched-statuses - Returns fast per-user watched statuses for up to 500 file paths without triggering expensive metadata/hash work; response is { statuses: { [filePath]: 'fully'|'partway' } }.
78- POST /api/files/watch-progress - Records per-user watch status (`partway` >=10%, `fully` >=70%) for sidebar "Watched by" display.
79- POST /api/files/watch-progress - Records per-user watch status (`partway` >=10%, `fully` >=70%) for sidebar "Watched by" display.
79
80
80## server/routes/share.js
81## server/routes/share.js
@@ -193,7 +194,7 @@
193- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
194- isInlinePreviewableBlob(blob, name) - Determines if a blob can be previewed inline by MIME/extension.
194- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
195- makeFileItem(item) - Builds a .file-item element; roots in Home now use folder-like interaction (single-click focus, double-click open), roots are non-draggable, and mobile long-press contextmenu suppression remains.
195- makeFileItem(item) - Renders tile icons first, then applies any cached watched overlay state (`fully` filled eye, `partway` outlined eye).
196- makeFileItem(item) - Renders tile icons first, then applies any cached watched overlay state (`fully` filled eye, `partway` outlined eye).
196- loadWatchedStatusesForCurrentDir() - Fetches /files/meta for video files in the current directory, derives the logged-in user's watched state, caches it per path, and updates tile overlays after metadata arrives.
197- loadWatchedStatusesForCurrentDir() - Fetches watched states in one bulk POST /files/watched-statuses request per directory (with legacy /files/meta fallback), caches statuses per path, and updates tile overlays quickly.
197- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
198- attachMobileLongPress(el, item) - Adds mobile long-press detection on file/folder tiles to open the item sidebar without desktop side effects.
198- beginSidebarLoad() - Aborts in-flight sidebar requests and increments a load token so stale async responses cannot mutate the current sidebar state.
199- beginSidebarLoad() - Aborts in-flight sidebar requests and increments a load token so stale async responses cannot mutate the current sidebar state.
199- openSidebar(item) - Renders item details/actions in sidebar; roots show alias + original name + usage stats, hide Move To/Delete, keep Rename.
200- openSidebar(item) - Renders item details/actions in sidebar; roots show alias + original name + usage stats, hide Move To/Delete, keep Rename.