Eight clinical reasons were being collected by window.prompt

Refactorkamo-internal
Shipped
27 Agosti 2026, 08:46 UTC
Author
kamo
Commit
f288db8

Stopping a medication, closing an order loop, cancelling an appointment, merging two patients, declaring two records not a match, withdrawing portal access, deciding a held identity match, reconciling a document from another practice. Every one of them captures a sentence that becomes part of the clinical or compliance record, and every one was an OS prompt. That is the wrong control for it. A prompt is single-line, so a reason worth writing gets truncated by the box rather than by its author. It carries no statement of what is about to happen, so somebody four dialogs deep is answering a question they can no longer see. It cannot be validated before it closes. It ignores the theme entirely. And a browser is free to suppress it, which turns a required reason into a silent cancel. The house already knew this — hr/training/WaiveDialog says so in its own docstring, having replaced a prompt for the same reasons. The clinical module regressed to one anyway. One ReasonDialog rather than eight bespoke ones: they differ only in their words, and eight copies is how one of them quietly stops requiring the reason — the duplication that has already cost this codebase the market picker twice and the permission list twice. It states the consequence above the field so it stays visible while typing, requires a non-empty reason, caps at the narrowest column behind any of these actions, counts down, and clears on every opening so a reason typed for one patient can never arrive on another's record. Ctrl/Cmd+Enter submits and plain Enter inserts a newline, because these are prose. The dialog is labelled by its own heading so a screen reader announces the question rather than "dialog". The reason stays required on the server. A dialog is a convenience, not a rule.

All changes

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei