docs(flomni): document hook reporting fixes and record real-session test results
CI for csaxs_bec / test (push) Successful in 3m2s

User manual: notes that the hook (name + source, when registered)
appears in tomo_parameters(), the scilog entry, the PDF report, and
the progress-ring label, and clarifies that unregistering a hook does
not clear at_each_angle_hook -- confirmed expected behavior.

AI_docs test checklist: records that sections 3-6b passed real-session
testing (updating the stale "not yet clicked through" status), adds
section 6c (test steps 37-41) for the fixes found during that testing,
and updates section 1's summary (new item 10).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
x01dc
2026-07-14 12:20:47 +02:00
co-authored by Claude Sonnet 5
parent 436c3f0137
commit 8dc4a56b91
2 changed files with 76 additions and 16 deletions
@@ -5,20 +5,15 @@
building it. Section 8 explains exactly how to hand this off to a new
session/chat.
**Status:** First iteration of the Step 3 GUI work is **built, not yet fully
validated**. It compiles, imports cleanly, and its non-Qt-rendering logic
(dynamic form building, step ordering, idempotent-default computation, job
dict assembly) was exercised with a scripted fake-client smoke test.
Section 3 (baseline regression) items 13 have been clicked through against
a live session and passed. **Item 4 needs re-testing** — it passed against
the *old* Submit behaviour (a Yes/Cancel confirmation dialog while busy),
which has since been replaced with a hard block plus a new "Add to queue"
button (section 1 item 8); the step-4 instructions below already describe
the new behaviour. Item 5 onward, and everything in sections 46b —
including the sort-mode reorder buttons, row tooltips, and the
at_each_angle hook dropdown/webpage display added after the first pass —
have **not** been clicked through yet. That's what this document is for.
Companion docs:
**Status:** Sections 3 through 6b have now actually been clicked through
against a live session by Mirko and pass, including item 4 against the new
hard-block Submit behaviour. Real-session testing of 6b surfaced several
gaps (all fixed, see section 6c below): a confusing duplicate row-number
column, `tomo_parameters()`/the queue table/scilog/the PDF report/the
progress-ring label not showing an active hook at all, and a clarification
that `unregister_at_each_angle_hook()` doesn't clear `at_each_angle_hook`
(confirmed expected, now documented). **Section 6c is new and not yet
clicked through.** Companion docs:
`TOMO_QUEUE_COMMAND_JOBS_PLAN.md` section 6 (the design this implements),
`TOMO_QUEUE_TESTING.md` (Steps 1 & 2, already sim-validated).
@@ -114,6 +109,18 @@ support on top of it:
against a live session — see `TOMO_QUEUE_COMMAND_JOBS_PLAN.md` section
3.4. The dropdown and webpage rendering themselves have **not** been
click-tested — see section 6b below.
10. **Fixes from real 6b testing.** The queue table no longer shows two
different-based row indices (Qt's own 1-based gutter is hidden; only
the dialog's 0-based `#` column, matching CLI indices, remains). A tomo
job's Details column now shows `hook: <name>` (or `... (not
registered)`) when one is set — previously always blank for tomo jobs.
`tomo_parameters()`, the end-of-scan scilog entry, `write_pdf_report()`
(both the PDF file and the scilog entry it sends), and
`flomnigui_show_progress()`'s ring label all now show the active hook's
name, flagged if it isn't currently registered — the scilog entry and
PDF report additionally include the hook's actual source code when it
is still registered, so what a tomogram did is part of the permanent
record. See section 6c below for what's not yet click-tested.
---
@@ -324,6 +331,43 @@ file is exactly how a regression sneaks in.
call `flomni.tomo_parameters()`), and setting it to `True` again right
after should stay silent (only the off→on transition prints).
## 6c. Test plan — new: row-number gutter, Details-column hook, report/progress display
Found during real testing of section 6b (thanks, Mirko) — a mix of a small
GUI bug and reporting gaps for the hook feature.
37. Open **☰ Queue control…** with a few jobs queued. Confirm there is
**exactly one** index column — the dialog's own `#` (0-based, matching
`tomo_queue_show()`/`tomo_queue_delete()`/`tomo_queue_move()` indices).
Qt's own 1-based row-number gutter that used to sit to its left should
be gone.
38. Queue a tomo job with an active, currently-registered
`at_each_angle_hook`. Confirm its **Details** column shows
`hook: <name>`. Then unregister that hook
(`flomni.unregister_at_each_angle_hook(...)`) and refresh — confirm
Details now shows `hook: <name> (not registered)` instead of silently
reverting to blank.
39. `flomni.at_each_angle_hook = "some_hook"` with `some_hook` **not**
registered. Confirm `flomni.tomo_parameters()` prints
`At-each-angle hook = some_hook (NOT registered in this session)`, not
just the bare name.
40. With a hook registered and active, run `flomni.flomnigui_show_progress()`
(or trigger it via a queued tomo job) and confirm the ring's center
label includes a `Hook: <name>` line. Confirm the line disappears once
`at_each_angle_hook` is `None`.
41. Run a short tomo scan with a registered, active hook. Confirm:
- the end-of-scan scilog entry includes an "At-each-angle hook: name"
line, and — since the hook is still registered — a
"At-each-angle hook source ('name'): ..." block with the actual
function source underneath;
- `flomni.write_pdf_report()` shows the hook name as a report line in
both the generated PDF (`~/data/raw/documentation/tomo_scan_ID_<id>.pdf`)
and the scilog entry it separately sends, and appends the hook's
source code to both as well.
Then repeat with the hook unregistered before the scan/report runs —
confirm the name still shows (flagged "NOT registered"), but no source
code block appears anywhere.
## 7. Known limitations of this first iteration (by design, not bugs)
Worth knowing before you file something as broken:
+18 -2
View File
@@ -487,8 +487,24 @@ the GUI process can't register hooks itself, only select one by name for the job
you're about to submit or add to the queue. Pick "None (default)" for a normal scan.
If a job's stored hook isn't currently registered anywhere, it still shows up in the
dropdown labeled "(not registered in this session)" so it's never silently hidden.
A queued job's active hook (if any) also appears on the status webpage, both in the
queue's per-job detail and in the live "Current measurement" section.
A queued job's active hook (if any) also appears on the status webpage (queue detail
and "Current measurement"), the ☰ Queue control… table's Details column, and the
`flomnigui_show_progress()` ring's center label.
**Unregistering does not clear `at_each_angle_hook`.** `unregister_at_each_angle_hook()`
only removes the function from this session's registry — if `at_each_angle_hook` (or a
queued job) still names it, that reference is untouched; it just becomes an
unregistered name, flagged as such wherever it's shown (CLI, GUI dropdown, webpage,
Details column). Set `flomni.at_each_angle_hook = None` (or the GUI dropdown's "None
(default)") explicitly if you want to actually clear the selection, not just remove
the hook it points to.
**Where the hook shows up in the permanent record:** `flomni.tomo_parameters()`,
the end-of-scan scilog entry, and `write_pdf_report()` all show the active hook's
name (flagged if unregistered) — and, when it's still registered, its full **source
code** too (scilog entry and PDF report only, not the console print), so what a
tomogram actually did is part of the log even if the hook itself is edited or
removed later.
### Sample storage and transfer