diff --git a/DECISIONS.md b/DECISIONS.md index 22d8614e..3ee90a2e 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -757,3 +757,13 @@ One line per decision: `[YYYY-MM-DD] : `. Appended by agents and [2026-08-03] Issue #814 ships the custom inbox-domain dialog polish (i18n, role gating, load-error state) while INBOX_CUSTOM_DOMAINS_ENABLED stays off: the 2026-07-02 gate decision holds until Emil flips the flag and restores the workspace entry point, so the feature is ship-ready but dormant. [2026-08-03] Issue #789 keeps ROT/RUT submission manual: Accounted generates, archives, and tracks Skatteverket HUS V6 XML, but the authorized user uploads and signs in the official e-service because no supported direct submission contract is available. +[2026-08-03] Net deductions (issue #316) default to settlement accounts 1613/2794/7385/2799 via LINE_ITEM_ACCOUNTS, not 2890 as the issue sketched: keeps getLineItemAccount the single mapping source so payslip lines, previews and vouchers agree; explicit account_number still overrides. +[2026-08-03] net_deduction_benefit_payment keeps a single 7385 default despite covering all benefit kinds: there is one item type with no benefit-kind field, fri bil is the dominant co-payment case, and per-line account_number override handles the rest; a per-benefit split needs a schema change and its own issue. +[2026-08-03] Invoice-list sorting loads every paginated row and keeps normal statuses muted while exception statuses use chips, not row tints: sorting must remain complete beyond PostgREST's 1,000-row cap, and semantic colors stay data-only under the locked design conventions. +[2026-08-03] MCP model-free upload (#748): payload ceiling bumped 58.5K to 59K instead of search-only visibility: both upload paths must stay listed (signed-URL pair is primary for file-capable harnesses, legacy base64 is the only path for clients without file access); create outputSchema trimmed to 3 fields first. +[2026-08-03] Hosted browser sessions use one HMAC-signed, HttpOnly, Supabase-session-bound cookie for idle and absolute timeout state (issue #362). A bounded input heartbeat advances only idle activity; the signed start time never moves, so the 12-hour cap cannot be extended. This stays application-side rather than relying on Supabase refresh-token time-box settings, whose enforcement is refresh-driven and cannot represent real browser inactivity. API-key and MCP bearer surfaces are exempt, self-hosted defaults off, and the sign-in method is copied from a short-lived hint into the signed state instead of user metadata so concurrent sessions cannot overwrite each other's re-auth method. +[2026-08-03] Customer-metadata enrichment during provider migration fills only columns that are NULL and treats empty strings and empty arrays as explicit user clears that reruns must not overwrite: NULL is the only "never configured" state, so a migration rerun can never undo an edit a user made after the first import. The enrichment update is spelled as a literal three-column payload (CustomerMetadataEnrichment) rather than a dynamic record so the phantom-column guard checks the columns instead of counting another unresolvable expression. +[2026-08-03] Asset disposal (#325) commits through a dedicated commit_asset_disposal RPC that delegates to commit_journal_entry with commit_method 'user_accept' instead of adding a new 'asset_disposal' value to the allowed-list: the disposal dialog is a user-accepted commit, actor provenance fields already record the surface, and the register update plus voucher stay one transaction. +[2026-08-03] The disposal RPC validates metadata invariants (non-negative proceeds and VAT, VAT requires a treatment, VAT never above gross proceeds, scrap carries no proceeds) rather than deriving register metadata from the journal lines: duplicating the TS disposal planner in SQL would drift, and once disposed_at is set the register row is frozen by trigger, so corrections go through storno plus a new disposal rather than register edits. +[2026-08-03] Tax depreciation (issue #324) is elected per fiscal period on a pooled snapshot chain, not per asset: fiscal_periods carries method, rule, opening, base, deduction and closing values, with DB guards enforcing method continuity and opening equal to the previous closing; assets keep depreciation_method linear for book depreciation, and company_settings.tax_depreciation_method was dropped because a second company-level method meant an admin/member RLS mismatch and a non-atomic second write; the annual snapshot chain is authoritative. +[2026-08-03] kompletteringsregel_20 with a positive basis and zero acquisition cohorts is refused rather than computed: reducing over an empty cohort set would claim a full write-off the cohort evidence does not support (IL 18 kap. 17 ยง), so such periods require manual review instead of an automatic deduction.