Repository navigation
Show file cards only for files that exist - #99
Merged
Merged
Conversation
A file named in inline code always got a card, even when it wasn't there. A bare name like `busy-composer.mp4` resolved to the session folder root, so its card opened "File Not Found" when the file was somewhere else or nowhere. - A video, audio, PDF or document card for a file in the session folder now shows only after a 2-byte read finds the file. If it's missing, the name stays plain inline code, with no link and no card. Other errors keep the card. - A bare name that isn't at the root is looked up with /api/fs/find and kept only on an exact name match. One match opens that file; none or several give no card. - Files outside the folder aren't read up front. A tap that finds one missing removes its card. - Checks run only for rows on screen, once per file, at most 4 at a time, shared across rows. Missing files are checked again when the session opens or resumes and after each reply, so a file the agent writes later gets its card. Verified on the emulator against a session-lab fixture covering each case, in light and dark. Scrolling 40 replies made 45 reads and 43 finds, each for a different file, with at most 4 in flight. scripts/check.sh passes for media, transcript and session. The viewer's pen fix is split out into #100.
Tarquinen
force-pushed
the
fix-file-card-check
branch
from
November 16, 2026 06:18
f29f865 to
31d2201
Compare
Tarquinen
added a commit
that referenced
this pull request
Nov 16, 2026
The full-screen viewer showed the draw pen on a video that could never load and an empty action bar on a file that didn't load. In a gallery, the "File Not Found" block sat at the left of the screen, and the viewer's status titles had no colour, so they were dark on black in the light theme. The pen now shows on a video only once it has loaded, the action bar is hidden on a file that hasn't loaded, the gallery's file page is centred, and the status titles use the text colour. Split out of #99. Verified: scripts/check.sh :feature:media passes on the VM; checked on the emulator with session-lab in light and dark on a missing video in a gallery, a missing single file, the opening state, a document page, a loaded video and swiping between gallery pages.
- One status() (Found, Missing, Pending) replaces isPending and isMissing, which repeated the same guards. shown() is now built on it. - A semaphore with one coroutine per file replaces the hand-written queue (queue, pending, running and pump). Still at most 4 checks at a time, once per file, skipped when no row watches the file any more. - A check now records the folder's generation from when it started. Before, a folder invalidated while a check was in flight stamped the stale answer with the new generation, so a missing file wasn't checked again. It is now checked again straight away. - The files the viewer found missing are a set, not a map of true. Verified: scripts/check.sh for media, transcript and session. On the emulator, this build and the previous commit gave the same cards, the same requests (45 reads and 43 finds scrolling 40 replies, peak 4 in flight), the same card for a file created before a resume, and the same removal of an outside file's card after the viewer couldn't find it. Screenshots matched pixel for pixel below the status bar.
Merged
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
File cards in the transcript now show only for files that exist, and a bare name finds its file in a subfolder.
Before, any inline code that looked like a file name got a card. A bare name like
busy-composer.mp4was looked up at the session folder root, so its card opened "File Not Found" when the file was somewhere else or nowhere./api/fs/find, keeping only exact name matches. One match opens that file; none or several give no cardBefore and after, from a session-lab reply that names a root video (bare and by an outside path), a missing bare name, a PDF only in
docs/, a name two subfolders share, a missing full path inside the folder and a missing one outside it:Checked on the emulator against session-lab in light and dark, tapping each card and link. Scrolling 40 replies that name 45 files made 45 reads and 43 finds, each for a different file, with at most 4 in flight and none for rows off screen. A file created after the reply got its card on resume, re-checking only the missing files on screen.
scripts/check.shpasses for media, transcript and session.The viewer's pen fix is split out into #100.