pediatric-ai-scribe-v3/public
Daniel b98ffc61c7
Some checks failed
Forgejo Android APK / Root app tests (push) Successful in 47s
Forgejo Docker Build / Root app tests (push) Successful in 51s
Forgejo Android APK / Build signed APK (push) Successful in 2m2s
Forgejo Docker Build / Build Docker image (push) Successful in 12s
Forgejo Docker Build / Deploy to the host (push) Failing after 2s
fix: expired invitations can be cleared too, revoked ones still cannot
An expired code is as dead as a used one and just as accounted for, so it is now
deletable. The rule the code enforces is the one that matters: a code that could
still be redeemed is never deleted, because that takes it off the list without
taking it out of anybody's inbox — the holder keeps something that looks valid,
it quietly stops working, and nothing is left to say who had it.

One condition, shared by the single delete and the bulk clear:

  (used_at IS NOT NULL OR (revoked_at IS NULL AND expires_at <= NOW()))

Written that way rather than as "used OR past its date" because the second form
also catches a revoked code whose date has since passed — a row the list still
labels revoked and offers no delete on, so the button and the query would have
disagreed about the same row.

Revoked codes keep their rows. Revoking records a decision somebody took, and a
handful of them is not the clutter a pile of expired codes is.

Verified against the live database across every state: active refused, used
deleted, expired deleted, revoked refused, and revoked-with-a-past-date refused
rather than slipping through as expired.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-11 20:41:18 +02:00
..
.well-known Add SHA256 fingerprint to assetlinks.json for TWA domain verification 2026-03-29 00:32:58 +00:00
audio Match TTS voices to the selected LiteLLM model 2026-07-30 17:34:34 +02:00
components fix: an invitation can only be deleted once it has been used 2026-09-11 20:30:06 +02:00
css refactor: cut the explanatory copy from the sign-in screen and My Resources 2026-09-11 17:57:07 +02:00
data move pe guide data to json 2026-05-08 08:56:21 +02:00
icons Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
images/pe-guide feat(pe-guide): real audio, innocent-murmur panel, APTM image, all-ages resp+CV 2026-04-22 21:00:42 +02:00
img feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
js fix: expired invitations can be cleared too, revoked ones still cannot 2026-09-11 20:41:18 +02:00
vendor fix: recordings that produced nothing, and the boxes that zoomed on iOS 2026-09-11 00:16:19 +02:00
404.html rebrand to Pediatric Clinical Tools, add diagrams tab, simplify litellm transcribe/tts 2026-05-02 18:23:06 +02:00
e2e-harness.html test(e2e): repair the harness, taking the browser suite from 96 failures to 11 2026-09-11 18:54:03 +02:00
favicon.ico Feat: add stethoscope+pencil favicon in SVG, ICO, and PNG sizes 2026-03-22 14:09:18 -04:00
index.html feat: sign in with a code emailed to you, offered beside the password 2026-09-11 20:12:03 +02:00
manifest.json fix: image models can be added and offered; solid phone top bar on iOS 2026-09-10 13:46:19 +02:00
sw.js harden clinical assistant source handling 2026-05-09 19:59:04 +02:00
template-guide.md feat: add extension import preview 2026-05-08 22:26:53 +02:00