pediatric-ai-scribe-v3/public/js
Daniel 39c1663334 feat: invite-only registration
registration_enabled was a single switch: open to anyone, or closed to
everyone. This adds the setting an operator actually wants in between — open
to people you invited.

A code is single-use, expires (7 days by default, 90 maximum), and can be
revoked or deleted. It is stored hashed with only its last four characters
kept, because an invite grants account creation and a database dump should
not hand someone a working one. The code is readable exactly once, in the
response that creates it.

The claim is a single conditional UPDATE carrying every condition, so two
registrations racing the same code cannot both succeed. It happens after the
account exists, so a code is never spent on a failed registration — and if
the race is lost, the just-created account is removed rather than left behind
as a free registration. The rejection never says which of the four reasons
applied; distinguishing them would tell someone probing codes which guesses
were closer.

Codes avoid I, L, O and U so they survive being read aloud or copied off a
screen, and matching ignores case and separators.

The sign-up field appears only when the server says a code is required. The
admin card creates, lists, revokes and deletes, and carries the toggle.

Verified against the live database: create, claim, second claim refused,
unknown code refused, revoking a used code refused, delete. 684 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-10 23:12:07 +02:00
..
admin fix: image models can be added and offered; solid phone top bar on iOS 2026-09-10 13:46:19 +02:00
assistant fix: resolve a citation by its number, not its position in the array 2026-09-10 19:10:54 +02:00
bedside allow bedside respiratory without weight 2026-05-08 09:10:33 +02:00
calculators consolidate calculator growth helpers 2026-05-08 04:36:39 +02:00
learningHub feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
notes feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
wellVisit extract well visit schedule data 2026-05-08 05:11:29 +02:00
accountBoundary.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
admin-docs.js docs refresh current workflows 2026-05-09 00:40:45 +02:00
admin.js feat: invite-only registration 2026-09-10 23:12:07 +02:00
app.js feat: the announcement banner renders Markdown, safely 2026-09-10 19:08:12 +02:00
audioBackup.js feat: export a recording; report a recorder that has silently died 2026-09-10 15:58:58 +02:00
auth.js feat: invite-only registration 2026-09-10 23:12:07 +02:00
authFetch.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
calc-math.js feat: Bedside clinical reference module + age→weight estimator + dose-math unit tests 2026-04-20 02:49:42 +02:00
calculators.js remove redundant module wrappers 2026-05-08 05:30:32 +02:00
chartReview.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
clinicalAssistant.js feat: invite-only registration 2026-09-10 23:12:07 +02:00
diagrams.js fix diagram delete confirmation 2026-05-08 06:28:12 +02:00
documents.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
drugs-loader.js convert admin docs and drug loader to modules 2026-05-08 07:50:26 +02:00
e2e-bootstrap.js fix docs toc fallback and remove redundant iifes 2026-05-08 23:08:47 +02:00
ed-encounters.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
encounters.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
extensions.js fix: image Done state, chat titles that keep whole words, and readable extension cards 2026-09-10 06:44:22 +02:00
generatedImages.js perf: store real image previews in MinIO, generated at creation and on demand 2026-09-10 06:39:30 +02:00
hospitalCourse.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
learningHub.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
liveEncounter.js feat: keep the screen awake while recording, and keep every recording 24h 2026-09-10 16:42:31 +02:00
memories.js clarify template-only AI memory context 2026-05-08 07:38:27 +02:00
milestones.js test clinical note entrypoints 2026-05-08 06:33:34 +02:00
milestonesData.js v4: Fix milestones display + add OpenID auth + 100MB PDF support 2026-04-01 17:59:51 +00:00
nextcloud.js convert settings loaders to modules 2026-05-08 07:17:29 +02:00
notes.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
peGuide.js move pe guide data to json 2026-05-08 08:56:21 +02:00
secureStorage.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
shadess.js harden clinical assistant source handling 2026-05-09 19:59:04 +02:00
sickVisit.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
soap.js feat: add patient education handouts 2026-05-08 22:26:53 +02:00
speechRecognition.js convert speech helpers to modules 2026-05-08 08:09:38 +02:00
transcriptionSettings.js convert settings helpers to modules 2026-05-08 07:54:08 +02:00
ui-state.js convert settings helpers to modules 2026-05-08 07:54:08 +02:00
voiceDictation.js fix docs toc fallback and remove redundant iifes 2026-05-08 23:08:47 +02:00
voicePreferences.js convert settings helpers to modules 2026-05-08 07:54:08 +02:00
wellVisit.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00