aboutsummaryrefslogtreecommitdiff
path: root/docs/TUI-GUIDELINES.md
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-18 21:07:38 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-18 21:07:38 +0200
commit49343ab72fa388aeba155c0fa605efdbfd8a345a (patch)
treebe6caf8a331179251aa47b365b837e0026e844c9 /docs/TUI-GUIDELINES.md
parent0ec59a0dfce8d350f26783ccc2456e5cb68c37a5 (diff)
downloadbokf-0.1.27.tar.gz
bokf-0.1.27.zip
bokftui: Huvudbok/Verifikationslista views, Räkenskapsår screen, ^Enter/^Xv0.1.27
The report menu gains Kapitas-style Huvudbok and Verifikationslista tables. "Byt räkenskapsår" is now "Räkenskapsår": the list shows öppen/stängd and ^A closes or reopens the highlighted year (via the new fiscal_year.reopen). Menus remember the selection, Mallar opens straight into the list (Enter edit, ^N new, d arkivera), report tables get column rules and aligned sums, and text_view clears stale lines. Footer hints write control keys as ^N/^A/^C/^R/^X, ^Enter saves or posts a form and ^X clears the focused row (F9 still works as a fallback).
Diffstat (limited to 'docs/TUI-GUIDELINES.md')
-rw-r--r--docs/TUI-GUIDELINES.md20
1 files changed, 12 insertions, 8 deletions
diff --git a/docs/TUI-GUIDELINES.md b/docs/TUI-GUIDELINES.md
index 7907a4a..acb3748 100644
--- a/docs/TUI-GUIDELINES.md
+++ b/docs/TUI-GUIDELINES.md
@@ -9,7 +9,8 @@ implementations. Inspired by Midnight Commander, htop, mutt and calcurse.
After login the org picker ("Välj organisation att representera") is always
shown; the selected org is fixed for the session (`--org ID` bypasses it for
scripts). The fiscal year is chosen from the dashboard and is changeable
-during the session.
+during the session; the `Räkenskapsår` screen also closes and reopens years
+there.
## Universal keys
@@ -20,18 +21,21 @@ during the session.
| `Esc` / `q` | Back one level. At the dashboard it does nothing — Esc never exits the app |
| `Ctrl+C` | Quit the application (closes the session). The only key that exits |
| `Ctrl+R` | Reload the client in place: re-execs the installed binary and restores session, org, fiscal year and the current view (for after a rebuild) |
+| `Ctrl+A` | Close or reopen the highlighted räkenskapsår (Räkenskapsår screen; asks for confirmation) |
| `1`–`9` | In lists: jump to that row. In menus: activate that item |
| `g` | Live goto: "Gå till rad/nummer:" updates the selection as you type digits (backspace steps back); Enter closes the prompt without opening anything |
| arrows, PgUp/PgDn, Home/End | Move/scroll; selection always stays visible |
| `e` | Edit the shown object (IB, where applicable) |
| `a` | Add/upload (Underlag) |
| `c` | Correct (voucher detail) |
+| `d` | Delete/arkivera the selected row (only where the action exists; asks for confirmation) |
| `Ctrl+F` | Attach a file (voucher form) / pick a file (Underlag) via the file browser |
-| `F7` | Clear the current row — only inside row editors (never "new") |
-| `F9` | Save/post the current form |
+| `Ctrl+X` | Clear the current row — only inside row editors (never "new") |
+| `Ctrl+Enter` | Save/post the current form. Enabled via xterm `modifyOtherKeys`; terminals that cannot send it keep `F9` working |
Every screen prints its keys in the footer via `hints()`. If a key exists, the
-footer shows it; if the footer shows it, the key works.
+footer shows it; if the footer shows it, the key works. Control keys are
+written compactly as `^N`, `^A`, `^C`, `^R` to save width.
## Lists (`select_list`, `menu`)
@@ -62,15 +66,15 @@ footer shows it; if the footer shows it, the key works.
the dashes themselves: type `20260315` and the field shows `2026-03-15`.
Backspace deletes a digit (with its separator), ←/→/Home/End move by digit,
and the caret renders like in any other field. Validation (`util_parse_iso_date`)
- happens on F5/F9.
+ happens on F5/`^Enter`.
- Derived values (account names, balances) are dim and non-editable.
- Row tables: always exactly one empty trailing row; entering data appends a
new empty row; an empty row followed by another empty row collapses.
- `F7` clears the selected row.
+ `Ctrl+X` clears the selected row.
- Validation: `F5` validates without writing and reports exactly what is wrong
(field, row number). Server `dry_run` is used where available.
-- Saving: `F9` writes, shows a confirmation message, and returns to the
- previous view. `Esc` cancels without saving.
+- Saving: `Ctrl+Enter` writes, shows a confirmation message, and returns to
+ the previous view. `Esc` cancels without saving.
- File browser (`file_browser`): starts in the org's `attachment_dir` (or
`$HOME`; a leading `~` is expanded to `$HOME`), `.. (uppåt)` is the first row, directories sort first with a
trailing `/`, hidden files are skipped. Enter enters a directory or picks a