Files
accounted/components
Jakob Wennberg cd9b540401 feat(inbox): show what a matched underlag would be booked as (#1515)
* feat(inbox): show what a matched underlag would be booked as

The rail told you what was extracted and never what would happen. A
matched item offered "Bokför manuellt" and a dialog, so the only way to
learn the answer was to open the dialog and read it there.

The proposal now sits in the rail: the accounts, the amounts, the day it
would be booked, and a folded reason. Read-only, because convention 14
says nothing AI-suggested posts without review; the dialog below is still
the only way to commit it.

When there is no proposal it says why in a sentence instead of showing an
empty table. An unknown supplier gets "bokför manuellt en gång, så känns
den igen nästa gång", which is true and actionable. A foreign-currency row
matched by a konteringsregel says the moms would be wrong, because it
would.

Balance is stated only when it fails. The lines come from the same builder
the commit path uses and balance by construction, so a mismatch means
something upstream is wrong and the user should see it before booking
rather than after.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(inbox): name the money columns and abort superseded suggestions

Two from review. Debet and Kredit were distinguishable only by column
position and a muted tint, which the design rules rule out: colour is
never the sole indicator. They have headers now.

The suggestion fetch cancelled its setState but not the request. Arrowing
down a list fires one per row, so the superseded ones still ran to
completion server-side and a slow one could resolve after a faster later
one. AbortController now cancels them.

Left alone: lifting the response type into @/types. It is the contract
between one route and one component, and a second declaration is a second
thing to keep in step.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-11 12:14:49 +02:00
..
2026-07-21 23:00:15 +02:00
2026-07-23 16:16:55 +02:00