summaryrefslogtreecommitdiff
path: root/docs/PROTOCOL.md
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-23 10:58:17 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-23 10:58:17 +0200
commit71a702f375750829c634b552217c9925d549828b (patch)
tree2b963da1d0110ed43920722ba4193ee9c79f2521 /docs/PROTOCOL.md
parent8ccb6d58d8e2f1c65dfd7ab5f0eb7d93f1f19def (diff)
downloadbokf-71a702f375750829c634b552217c9925d549828b.tar.gz
bokf-71a702f375750829c634b552217c9925d549828b.zip
tui: context menu on → / ^O; no F-keys, ^N or ^Enter
→ (where no caret uses it) and ^O (everywhere, also in table cells) open "Åtgärder": a box at the right edge with every action of the view and its key. Screens declare their actions with tui_set_actions(); choosing one feeds its key to the widget, so the menu and accelerators share one path. Function keys, Ctrl+N (now n), Ctrl+Enter and Ctrl+F are gone and no extended keyboard protocol is enabled, so the TUI works in a browser terminal; save/post/validate/preview/template/attach are menu actions. make check rejects F-keys, ^N and ^Enter in clients/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/PROTOCOL.md')
-rw-r--r--docs/PROTOCOL.md63
1 files changed, 35 insertions, 28 deletions
diff --git a/docs/PROTOCOL.md b/docs/PROTOCOL.md
index 9ab9620..709a475 100644
--- a/docs/PROTOCOL.md
+++ b/docs/PROTOCOL.md
@@ -954,9 +954,10 @@ commands. Implemented screens (0.1.0-dev):
`voucher.list` calls) and `s` cycles its sort order (number or date,
ascending or descending, remembered in `tui.conf`); in the detail view
up/down step to the previous/next voucher in that order.
-- **Nytt verifikat** — row editor with live balance display, F5 dry-run
- validation and F9 posting; one `client_ref` per form makes retries safe.
- F4 applies a konteringsmall (prompts for template and `x`).
+- **Nytt verifikat** — row editor with live balance display; the context
+ menu (`^O`) offers Bokför, Validera (dry run), Hämta mall… (prompts for
+ template and `x`) and Bifoga fil…; one `client_ref` per form makes
+ retries safe.
- **Ingående balans** — the effective opening balances of the selected
fiscal year (carry-forward plus any `IB` vouchers, as the reports compute
them); enter accounts with signed amounts (positive debit, negative
@@ -967,7 +968,8 @@ commands. Implemented screens (0.1.0-dev):
as `YYYY-MM-DD - YYYY-MM-DD` (plus label and open/closed) so broken fiscal
years are visible. All screens then work in the selected year.
- **Mallar** — list, create and edit templates in the same form style as
- vouchers (Tab, dynamic rows, F7 clear row, F5 validate, F9 save); archive
+ vouchers (Tab, dynamic rows, `^X` clear row, Validera and Spara in the
+ context menu); archive
keeps the template but hides it from the list.
- **Underlag** — inbox of unlinked attachments; `a` uploads a file and
Enter opens **Granska** (text in a pager, other files in the desktop
@@ -976,47 +978,49 @@ commands. Implemented screens (0.1.0-dev):
- **Bankavstämning** — imported bank transactions (`bank.import`) matched
against vouchers on the bank account, with suggestions; Enter matches the
suggested voucher (or picks another), `u` unmatches, `a` imports a SEB CSV.
- `Ctrl+N` (or the last row `Skapa nytt verifikat…` in the match list) opens
+ `n` (or the last row `Skapa nytt verifikat…` in the match list) opens
**Nytt verifikat** prefilled with the transaction's date, text, signed
amount and bank account; posting it auto-matches the new voucher and
returns to the list. A failed auto-match keeps the posted voucher and
shows the server error.
- **Fakturor** — invoice list (`invoice.list`, newest first) with number,
date, customer, total and status (`utfärdad`/`krediterad`/`betald
- <datum>`). Ctrl+N opens the form, Enter the detail. The form has the
+ <datum>`). `n` opens the form, Enter the detail. The form has the
customer picker, invoice/due (due defaults from the customer's payment
days) and delivery dates, er/var referens and rows (beskrivning, antal,
enhet, à-pris, moms, anm); a row with only beskrivning is a free-text line
- (`text` rows, no amount). `F5` previews the real PDF (`invoice.preview`,
- nothing stored, no number consumed), `F9` issues (`invoice.issue`) and
+ (`text` rows, no amount). The context menu's Förhandsvisa PDF shows the
+ real PDF (`invoice.preview`, nothing stored, no number consumed), Utfärda
+ issues (`invoice.issue`) and
then asks "Skicka faktura <nr> till <e-post>?". The detail shows header
and rows and offers `p = visa PDF` (`invoice.pdf`), `s = skicka`
(`invoice.send`), `u = duplicera` (a new draft with the same rows and
today's dates) and, on unpaid invoices, `b = kvittera betalning`: a
prefilled payment voucher (debit `bank_account`, credit
`invoice_receivable_account`) is opened in the ordinary voucher form and,
- once posted, linked with `invoice.pay`. In the list, `n` sets the next
- invoice number (`invoice.sequence_get`/`sequence_set`, owner-only).
+ once posted, linked with `invoice.pay`. In the list, the context menu's
+ Ändra nästa fakturanummer… sets the next invoice number
+ (`invoice.sequence_get`/`sequence_set`, owner-only).
- **Kunder** — the customer register (name, address, postal code, city, VAT
- number, e-mail, your reference, payment days, notes). Ctrl+N creates,
- Enter edits (F5 validates with a dry run, Ctrl+Enter saves), `d`
- archives/reactivates.
+ number, e-mail, your reference, payment days, notes). `n` creates, Enter
+ edits (Spara row or menu; Validera is a dry run), `d` archives/
+ reactivates a customer or deletes a draft.
- **Lönekörningar** — the monthly payroll runs (`payroll.run_list`, newest
- period first) with status (`bokförd`/`betald`), gross and net. Ctrl+N
+ period first) with status (`bokförd`/`betald`), gross and net. `n`
starts a new run (period YYYY-MM and pay date, defaulting into the
selected fiscal year) when an active employee with a monthly salary
exists, Enter opens an existing run. The run screen shows the status and
- totals, `F5` previews (`payroll.run_preview` for a new run, the stored
- lines for a posted one), `Ctrl+Enter` posts after confirmation
+ totals, Förhandsvisa (`payroll.run_preview` for a new run, the stored
+ lines for a posted one) and Bokför körning… posts after confirmation
(`payroll.run_post`, showing the voucher), and the manual steps are the
action rows **Lönebesked** (PDF via `payroll.payslip`), **AGI-underlag**
(`payroll.agi`, owner only) and **Betala skatt & avgifter**
(`payroll.pay_tax`); a disabled step names its reason. The list title
warns when the current year's tax tables are missing.
- **Anställda** — the employee register (name, masked personnummer, salary,
- tax table/column, e-mail). Ctrl+N creates, Enter edits (an empty
- personnummer keeps the stored one), `d` archives/reactivates; F5
- validates with a dry run and Ctrl+Enter saves.
+ tax table/column, e-mail). `n` creates, Enter edits (an empty
+ personnummer keeps the stored one), `d` archives/reactivates; Validera
+ (dry run) and Spara are in the context menu.
- **Skattetabeller** (via **System**) — stored tax table years, the current
year's status, fetch time and source. Owners fetch Skatteverket's official
monthly table (`payroll.tax_tables_fetch`) or import a file offline
@@ -1028,9 +1032,9 @@ commands. Implemented screens (0.1.0-dev):
Report tables keep their column-header row pinned while the body scrolls.
The draft asks for the board's proposed dividend, kept per fiscal year
with `fiscal_year.update`.
-- **Bokslut** — periodiseringsfond and tax rate fields; F5 shows the posting
- plan as a `bokslut.post` dry run, `^Enter` (or F9) asks for confirmation
- and posts the plan.
+- **Bokslut** — periodiseringsfond and tax rate fields; Visa bokslutsplan
+ shows the posting plan as a `bokslut.post` dry run, Bokför planen… asks
+ for confirmation and posts the plan.
- **Information om året** — the per-year årsredovisning details (material
events, AGM and payment dates, proposed dividend, employees, other notes),
edited per field; a new fiscal year inherits the stable fields. The
@@ -1051,12 +1055,15 @@ commands. Implemented screens (0.1.0-dev):
- **Revision** (via **System**) — chain verification and
behandlingshistorik.
-**Ctrl+N is the universal "add" key**: it starts a new verifikat from the
-dashboard, the voucher list and the voucher detail view; a new mall from the
-Mallar menu; a new customer or employee from their registers; a new payroll
-run from Lönekörningar; a new fiscal year from the year picker; and maps to
-the editor in Ingående balans and to file upload in Underlag. F5 is the
-universal refresh. Hints show the keys per screen.
+**`→` (or `^O`) opens the context menu** ("Åtgärder") with every action of
+the view and the key that does the same; `^O` also works while typing in a
+table cell. **`n` is the universal "add" key**: a new verifikat from the
+dashboard, the voucher list and the voucher detail view; a new mall,
+customer, employee, payroll run, rule or board member from their lists; a
+new fiscal year from the year picker; file upload in Underlag. `r` is the
+universal refresh in lists and views. The TUI uses no function keys and no
+browser-reserved control keys (`Ctrl+N`/`T`/`W`), so it runs unchanged in a
+browser terminal; see TUI-GUIDELINES.md "Keys and the web".
**Ctrl+R reloads the client in place** (for hot-reloading after a rebuild):
it re-execs the installed binary with `--org`, `--fy` and `--screen NAME`