diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/DECISIONS.md | 5 | ||||
| -rw-r--r-- | docs/STATE.md | 27 | ||||
| -rw-r--r-- | docs/TUI-GUIDELINES.md | 35 |
3 files changed, 38 insertions, 29 deletions
diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md index 1522842..a0c613b 100644 --- a/docs/DECISIONS.md +++ b/docs/DECISIONS.md @@ -256,7 +256,10 @@ kept verbatim from the STATE.md they were pruned from (2026-09-21). error keeps the draft. Screens declare actions in one ordered `struct tui_action` list that drives the `F2` menu, the accelerator keys and the footer hints; `F2` only, no `§`; `Ctrl+Enter` is dropped as a - commit key (`F9` and the save action row remain). Pilots on Kunder. + commit key (`F9` and the save action row remain). **Kunder pilot + implemented 2026-09-22** (`clients/drafts.[ch]`, `<UTKAST>`, the `Spara` + row, the `F2` menu, delete from list and editor); the other screens + follow. ## Completed work formerly listed under "Pending decisions" diff --git a/docs/STATE.md b/docs/STATE.md index 3077b12..b034a9a 100644 --- a/docs/STATE.md +++ b/docs/STATE.md @@ -54,13 +54,17 @@ unit tests and the docs consistency check. employer name there too (it previously used the Comfortaa wordmark). The invoice's `FAKTURA` outline is unchanged; the `MAKANDRA AB` outlines in `src/wordmark.h` are now unused at runtime. -- **TUI interaction model (2026-09-22, design, not implemented)**: the UX - session settled two focus modes, three entity lifecycles, explicit - `Spara` in every savable form and `<UTKAST>` drafts persisted to - `$XDG_CACHE_HOME/bokf/drafts.json` (deletable from both the list and the - editor), plus one `tui_action` registry per screen behind `F2` (no `§`). - Spec in `TUI-GUIDELINES.md` "Interaction model"; decisions in - `DECISIONS.md` #28. Rollout is backlog item 17. +- **TUI interaction model (2026-09-22)**: the UX session settled two focus + modes, three entity lifecycles, explicit `Spara` in every savable form and + `<UTKAST>` drafts persisted to `$XDG_CACHE_HOME/bokf/drafts.json` + (deletable from both the list and the editor), plus one `tui_action` + registry per screen behind `F2` (no `§`). The **Kunder pilot is + implemented** (`clients/drafts.[ch]`, `tui_action_menu()`, + `tui_action_hint()`, `<UTKAST>`, `Spara` row, F2 menu, delete draft) with + unit tests and the pty scenarios `customer-draft`/`customer-draft-save`; + the other screens are unchanged. Spec in `TUI-GUIDELINES.md` "Interaction + model"; decisions in `DECISIONS.md` #28. Rollout continues in backlog + item 17. - **Mail configuration**: Makandra AB (org 2) has **no** `smtp_*` settings in bokf, so `invoice.send` there is `SMTP_NOT_CONFIGURED` (fine if invoices are sent elsewhere — set them up when wanted). Mock AB (org 1) @@ -130,10 +134,11 @@ None open. Completed items that used to be listed here are archived in (`tests/core_<domain>.c`) so `--only` stops cascading; pilot with one domain. 17. Interaction-model rollout (spec: `TUI-GUIDELINES.md` "Interaction - model", decisions #28): `struct tui_action` + `F2` menu in the widget - layer, `clients/drafts.[ch]`, the Kunder pilot, then the other - registers; settings get `Spara`; pty scenarios for draft - create/save/delete/reload. + model", decisions #28): **Kunder done** 2026-09-22 (widget layer + `tui_action`/`F2`, `clients/drafts.[ch]`, drafts/`<UTKAST>`/`Spara`, + pty scenarios). Remaining: the other register screens, explicit + `Spara` in the settings forms (replacing per-field autosave), and + `tui_rt` action menus. Original entries for the struck items are in `docs/DECISIONS.md`. diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md index fbd3b75..1c201aa 100644 --- a/docs/TUI-GUIDELINES.md +++ b/docs/TUI-GUIDELINES.md @@ -5,9 +5,10 @@ copy the behaviour of the voucher list / voucher form; they are the reference implementations. Inspired by Midnight Commander, htop, mutt and calcurse. The **Interaction model** section is the agreed target (settled 2026-09-22, -`DECISIONS.md` #28) and has not been implemented yet. The sections after it -describe today's widget behaviour and stay authoritative until the widget -layer and the screens are migrated; the interaction model wins where they +`DECISIONS.md` #28). The **Kunder** pilot is implemented: drafts in +`$XDG_CACHE_HOME/bokf/drafts.json`, `<UTKAST>` marking, the explicit `Spara` +row, the `F2` action menu and draft deletion work there. Every other screen +still follows the sections below; the interaction model wins where they conflict as each screen moves over. ## Interaction model (target, 2026-09-22) @@ -105,21 +106,21 @@ struct tui_action { commit key (`Ctrl+Enter` is dropped) and `F2` only — no `§` binding (it is not reliably encodable across terminals). -### Deltas to implement +### Implementation status -1. `struct tui_action` + `tui_action_menu()` in `clients/tui.[ch]` - (`tui_form_action` is generalized); the pure ordering/dimming/hint logic - is unit-tested in `tests/test_tui.c`. -2. Action lists on `tui_select_list` and `tui_rt`, replacing the per-screen - key branches; hints and dispatch read the same list. -3. `clients/drafts.[ch]`: JSON store, atomic write, dirty tracking, - temporary ids, `<UTKAST>` marking and the delete action. -4. Registers get the draft/`Spara` model first — pilot on **Kunder** — then - the other register screens; settings drop their per-field autosave and - get a `Spara` row. -5. pty scenarios: a new empty entity is a visible `<UTKAST>`; fill + `Spara` - commits and clears it; delete from the list and from the editor; a draft - survives `Ctrl+R`. +1. Done: `struct tui_action`, `tui_action_menu()` and `tui_action_hint()` in + `clients/tui.[ch]`, unit-tested in `tests/test_tui.c`. +2. Partly done: the Kunder list builds its `F2` actions in a key hook and + appends `F2 = åtgärder` to the footer via `tui_list_hint_extra()`; other + lists have no actions yet, and `tui_rt` still uses its own key branches. +3. Done for Kunder: `clients/drafts.[ch]` (JSON store, atomic 0600 write, + temporary ids, `<UTKAST>` marking, delete action), unit-tested. +4. Done for Kunder: draft/`Spara` model with the `Spara` action row, + `F2` menu and draft deletion from both the list and the editor. The + other register screens and the settings forms (explicit `Spara`, no + per-field autosave) are next. +5. Done for Kunder: pty scenarios `customer-draft` and + `customer-draft-save` cover create, edit, `<UTKAST>`, delete and save. ## Session start |
