Seven radii were in circulation (4/5/6/8/12/16px + pill) with no rule for
which went where; one toolbar row on /transactions mixed four shape
languages. This locks a 4-tier ladder (design.md convention 16):
- pill: interactive toolbar controls (buttons, chips, pickers, segmented
controls, toolbar search, count nubs)
- rounded-xl (12px): overlay tier: page panel, dialogs, slide-overs
- rounded-lg (8px): cards, form fields, popover/menu content, boxes
- rounded-sm (4px): nested leaves (menu items, checkboxes, kbd/code nubs)
Changes:
- New SegmentedControl primitive (pill-in-pill tablist, h-8) replaces the
hand-rolled bg-muted/70 tablist copied across 11 files
- New ToolbarSearch primitive (pill, h-8) adopted on 9 page toolbars;
dialog/picker searches keep the rounded-lg Input
- dialog.tsx 8px -> 12px, matching SettingsModal/slide-over/CommandPalette
- ContextPicker chips at the shared h-8 toolbar height
- ~300 rounded-md / bare rounded call sites remapped by role; auth icon
tiles and the mobile nav sheet come down from 16px to 12px
- rounded-md, bare rounded, rounded-2xl and rounded-[Npx] are dead
vocabulary, enforced by a new off-ladder-radius check in check:guards
Verified: lint 0 errors, 14422 unit tests pass, check:guards green, tsc
clean on all changed files, sandbox screenshots of transactions/
bookkeeping/granskning toolbars and the Ny verifikation dialog.
Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* refactor(reports): restructure declaration pages around the filing pipeline
Momsdeklaration (/reports/vat-declaration) becomes the four-step flow the
user actually runs: kontrollera, granska, bokfoer, laemna in.
- NEW VatChecksCard, mounted first and ungated: the local pre-flight
checks and the RC-basis-gap worklist used to render inside
SkatteverketPanel BELOW the filing CTAs, and vanished entirely for
free-tier or not-connected users, exactly the manual filers who must
not file a declaration the checks would have blocked.
- The gap worklist scales: compact DataList rows (first 8 + visa alla),
visible shared classification selects, per-row overrides, bulk
"Korrigera alla" behind a confirm dialog with serial progress, and an
in-page declaration refetch replacing "Ladda om sidan". The list
outlives the aggregate RC_BASIS_MISSING check so remaining rows never
vanish after the first fix.
- Summary card: status Badge + font-display headline amount instead of a
Badge carrying the number; sanctioned h3 section heads; Table
primitive; NEW import block (rutor 50/60-62) and the utgaende sum now
includes 60-62 so it matches ruta 49 arithmetic; drill-downs preserved.
- SkatteverketPanel stops being an API console: three forward buttons
(Validera, Spara utkast, Laas och signera), six lookup/recovery actions
in an overflow menu with two-line descriptions, destructive confirms on
radera/koppla bort, one truthful notice slot (not-found is info, never
green), visible disabled-reasons instead of title attrs, signing link
as a real anchor plus auto re-check of inlaemning on tab refocus, and
per-period state reset so a Q1 signing link can never show Q4's
kvittens.
- VatCompositionChart deleted (decorative donut mixing in/out VAT);
export menu keeps xlsx only, XML/PDF live in the Laemna in card.
- Sibling declaration pages adopt the same grammar: PS gets shadcn
selects, auto-fetch with stale-discard, refresh button, envelope-parse
fix (message_sv never existed); NE/INK2 auto-fetch on fiscal-year
change (kills stale-year data), shared keyboard-accessible
DeclarationRutaRow (fixes the expense sign bug), whole-krona amounts
matching filed SRU values, neutral info notes instead of bg-primary/10,
Skeleton loading, accessible download errors.
UI-only: no API, schema, or dependency changes. All strings hardcoded
Swedish (statutory surface). Adversarially reviewed (19-agent pass); all
10 confirmed findings fixed in this commit.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(reports): address CodeRabbit review on #992
- formatWholeKronor truncates instead of rounds: NE/INK2 SRU generators
drop oere with Math.trunc, and the UI must show the filed figures.
- SkatteverketPanel disconnect surfaces non-ok responses instead of
silently stopping the spinner.
- VatChecksCard distinguishes a failed rc-basis-gaps fetch from a real
zero-gap result: destructive note + retry instead of the benign
'Inga verifikationer hittades'.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>