fix(onboarding): leave a trail for the three settings columns the flow writes

The setup flow writes a record's module map, its glucose unit and its unit
preference. All three have a dedicated settings route that records an audit
row, and the flow recorded none, so "why did my modules change" had no answer
in the activity panel. Restarting the flow did write a row, which made the gap
look like an oversight rather than a decision, because it was one.

Same event names as the dedicated routes, since it is the same column and the
panel should group them. The module row names the keys that actually moved and
the domains kept for their content.
This commit is contained in:
Marc-André Bombeck committed 2026-09-10 11:57:11 +02:00
1 parent 07f1b6ce92
commit b10a3ef22e
5 files changed
+82 -5

No files matched your search

+4 -2
View File
@@ -16389,8 +16389,10 @@ paths:
The older sibling of `POST /api/onboarding/step`. It is unconditional in a way the step route is not: it stamps
the completion whatever the stored step is, it re-stamps on every call rather than refusing a second one, and it
writes no audit row and enforces no rate limit of its own. It also does NOT seed the dashboard from the goal
selection — that only happens on the step route's completing call.
enforces no rate limit of its own. Its legacy half writes no audit row; the needs half writes one
(`user.modules.update`) when it derives, because that is the same column the dedicated modules route audits. It
also does NOT seed the dashboard from the goal selection — that only happens on the step route's completing
call.
Calling this mid-wizard makes every remaining `POST /api/onboarding/step` answer 409