The sync endpoint returns 401 for six distinct auth states (handleSkvError):
NOT_CONNECTED, SESSION_EXPIRED, REFRESH_EXHAUSTED, MISSING_SCOPE,
TOKEN_CORRUPTED, TOKEN_REVOKED. The page treated every 401 as "Skatteverket
är inte anslutet" — directly contradicting Inställningar, which reads the
stored token metadata and truthfully shows "Ansluten" for all but the first.
- syncNow now checks the structured error code: only NOT_CONNECTED flips to
the not-connected empty state. Every other auth failure renders the
server's actual Swedish message as a persistent banner with an "Anslut
igen" CTA, keeping the stored saldo/transactions visible.
- SkatteverketConnectPanel moves to the top of /settings/tax — the
skattekonto and momsdeklaration pages send users there specifically to
(re)connect, and below the tax form it sat out of view.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>