Repository navigation
feat(qcm): expired and old-capture cameras on the card (QQA-10f) - #39
Merged
Merged
Conversation
A camera row whose validUntil has passed already lost its picture in the snapshot reader, but its card still said "No picture is published for this camera", which is not true. The card now says the picture is out of date, makes no request for it, and keeps the owner's link. A camera with a capturedAt now shows how long ago the picture was taken, with the same 30 minute line for "the camera may be stuck" that the Last-Modified age already used. Park cameras, which have no header to read, get an age line for the first time. When both exist on a road camera, the Last-Modified of the picture just fetched wins; capturedAt fills in when it is missing or unreadable. A park card that carries a capture time no longer says the park publishes none. A browser test serves a schema 2 snapshot to the built page and checks all three cases against every request the browser makes. Unit tests cover the age rule and the expired card. Ported from headlessmode-archive #807 (commit 7af3b6b4). Camera snapshot schema 2 (archive commit ac5897d8, its parent in that PR) is already on master, so this carries only the card change. The img-plan load handler keeps master's picture timeout and also reads the age line.
Deploying headlessmode-current with
|
| Latest commit: |
442da06
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2b4ea2e8.headlessmode-current.pages.dev |
| Branch Preview URL: | https://qqa-10f-expiry.headlessmode-current.pages.dev |
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.
Ported from headlessmode-archive #807 (commit 7af3b6b4), QC U13 camera chain (QC-04), plan row U13. Base master. Closed in the archive, not merged there; this is the port.
What changes: a camera card says when its picture is out of date (validUntil passed) instead of "no picture is published", makes no request for it, and keeps the owner's link; a camera with capturedAt shows how long ago the picture was taken, with the same 30 minute stuck-camera line the Last-Modified age already used. Park cameras get an age line for the first time.
Adapted: camera snapshot schema 2 (archive commit ac5897d8, the parent in that archive PR) is already on master, so this carries only the card change. The img-plan load handler keeps master's picture timeout and also reads the age line. The new browser test removes its Chromium profile through
removeProfile;site-coupling.jsonis regenerated.Tests (through
bin/pytest-slot.sh, logs unpiped):