- Remove the temporary Local database tab, the local-agent helper, the
download fallback and the unused table viewer/insert code; Send to Exocad
now writes the picked file directly through the browser file picker
(Chrome and Edge only).
- Remember the picked database in IndexedDB and reopen it on the next send
while the file still exists; show Browse again if it is gone.
- Show the button at every screen size when the browser supports the picker;
hide it everywhere else.
- Rebuild the case header around the panel width (container query): two
columns when wide, one stack when narrow, with Mark as important and Billed
under the external code and Edit/Outsource/Send to Exocad/Get PDF in an
equal-width grid.
- Slim the local database session to what Send to Exocad uses, prune unused
localDb i18n keys, and update the lab-cases docs.
Lab numbers now follow the same cases as Cases and Tasks: a case the lab started itself is included, and a step already handed to another lab is not. Day labels stay inside the charts, the grid follows the dashboard width, and the progress rings share one thin stroke.
Upscale print type without widening the layout, pad the header so the landscape QR is not clipped, and name downloads case-sheet-{orderNumber}.pdf using the printed external code when set.
Cases was the one feature with no edit-specific error code, so cases.service.ts
throws PERMISSION_ACCESS_CASES for a failed read check (:1375) and for a failed
edit check (:1391) alike. The lab voice branch checks TAB_CASES_EDIT, so reusing
it told a member holding TAB_CASES_READ "you do not have access to cases" — false,
and it points them at the wrong setting.
All three layers: the code in error-codes.ts, the throw in assertCanDictate, and
errors.PERMISSION_EDIT_CASES in en, fa and nl.
The two voice.service.spec cases asserting the old code failed on the change and
were updated — they are the guard that caught it.
cases.service.ts:1391 has the same mismatch and is left alone; it is an existing
endpoint's message, not this task's.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
buildLabLineFromVoice returns null whenever no prosthesis job survives — bare
teeth with no material, an out-of-catalog code, every code refused by the stack
rules. applyVoice then closed the sheet and returned in silence.
Dictate "دندون ۱۲ و ۱۴" with no material: lab mode forces labDependent, so the
merged row is available and ticked and the button reads Apply (1). Tapping it
changed nothing and said nothing.
It now raises voiceNothingExtracted through the panel's existing toast, unless a
due date landed — a due-date-only dictation did do something and must stay quiet.
Found by /code-review.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Found by the /orchestrate correctness critic, verified by hand.
applyVoice checked isBlankLine on the TARGET line but never on the line it had
just built. A dictation carrying no line content — a due date on its own, or one
whose codes were all refused — returned a blank newLine(), fell past the
blank-target branch and appended it. The panel then made it active and autosaved
it, and start only requires that SOME line carries jobs (cases.service.ts:549),
so the empty line shipped to the lab floor. That is what decision 9 exists to
prevent; the decision only covered filling a blank target, not appending one.
The spec's own manual step 7 triggers it: dictate «تا پنجشنبه» with line 1
already filled.
buildLabLineFromVoice now returns line: null for a blank line, so the rule sits
in the pure function a test can reach rather than in a component nothing renders.
The due date still lands — it belongs to the case header, not the line.
Six tests that asserted an empty line now assert null, and one new test covers a
due date riding along with real work. Reverting the guard fails five of them.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds a lab-mode narrowing of the catalog for voice extraction,
lab case line draft/apply helpers, and a shared review sheet reused
by both treatment and lab case flows.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>