* fix(enable-banking): only hard-warn about sibling connections at observed one-session banks
The same-bank warning dialog fired for every bank whenever the user's other
companies held a connection, claiming the siblings could stop syncing. That is
only true for banks binding one active AIS session per PSU (observed: SEB).
Prod shows Handelsbanken tolerates at least four concurrent sessions syncing
daily, and the generic warning made a multi-company user abandon a legitimate
renewal of an expired Handelsbanken connection.
The decision now lives in a pure, tested module (connection-warning.ts):
- One-session banks (SEB): hard warning on fresh connect and renewal alike.
- Other banks, renewal: no dialog; the connection already coexisted.
- Other banks, fresh connect: calm confirmation so a user who meant to renew
notices they are about to create a second connection.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PUKATngZZzqkoDesyxKR3
* fix(enable-banking): fail closed for banks with unknown session policy, exempt shared-session siblings
Skeptic findings on the first cut:
- Unknown banks were treated like verified multi-session banks (silent
renewal), turning absence of evidence into evidence of absence. They now
keep the previous hedged warning on both paths; only Handelsbanken
(verified 2026-08-28: 2-4 concurrent connections per user on DISTINCT
session_ids, all syncing daily) gets the calm tier.
- Siblings sharing the session being renewed are carried by
fanOutSessionRenewal and never break, so they no longer trigger or
inflate the warning; the absolute SEB claim is accurate for the
remaining, genuinely separate sessions.
- Company names are deduped and phrasing follows distinct company count
(one company holding privat + foretag rows is "ett annat bolag").
- Null bank_name no longer throws (DB column is nullable).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PUKATngZZzqkoDesyxKR3
* fix(enable-banking): count clashing companies by id, names are display-only
CodeRabbit: two distinct companies sharing a name, or one whose name fails
to resolve, undercounted to "ett annat bolag". SameBankClash now carries
companyId as identity; the parenthetical name list stays deduped display.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PUKATngZZzqkoDesyxKR3
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>