"Ny faktura" was the slowest form to fill in: the list page lazy-loaded NewInvoiceDialog, which lazy-loaded InvoiceEditor (ssr:false), which then issued four requests on mount (customers, articles, chart of accounts, company settings) and hid the ENTIRE form behind a spinner until the customers query alone resolved, even though the other three had landed. Reopening the dialog paid all of it again. - InvoiceEditor reads customers, articles, posting accounts and settings from lib/reference-data (seeded by the dashboard layout). The whole-form spinner gate is gone; the customer picker shows "Hämtar kunder ..." only while the list is genuinely uncached. Company settings are applied once per editor instance through a guarded effect, so a background revalidation can never re-run the create-mode prefills over notes or a reference the user has typed. Inline customer/article creation invalidates the shared cache (awaited, so the new option resolves before the line points at it). Customers now come through /api/customers, which masks the personnummer column; nothing in the editor rendered it. - NewInvoiceDialog imports the editor statically: the dialog is itself a next/dynamic chunk on the list page, so this is one deferred chunk download when the dialog opens instead of two sequential ones. - New strings: invoice_editor.loading_customers (sv + en). Per "Ny faktura": 2 sequential chunk loads -> 1; blocking mount requests 4 -> 0 (cached) with every field populated on the first render. raw-reference-fetch ratchet: 46 -> 45 files. SendInvoiceDialog and PaymentBookingDialog (init() flows) stay in the baseline for a later PR. Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
87 lines
3.6 KiB
JSON
87 lines
3.6 KiB
JSON
{
|
|
"_comment": "Ratchet baseline for scripts/checks/no-new-antipatterns.mjs. These counts may only decrease. Re-run with --update after a migration lowers them. Goal: both reach 0 (A1 route-auth campaign, D1 rounding codemod).",
|
|
"rawRouteAuth": {
|
|
"count": 1,
|
|
"files": [
|
|
"app/api/mcp-oauth/authorize/route.ts"
|
|
]
|
|
},
|
|
"naiveOreRound": {
|
|
"count": 622
|
|
},
|
|
"handRolledInvariants": {
|
|
"count": 115
|
|
},
|
|
"ledgerScanningReports": {
|
|
"count": 4,
|
|
"files": [
|
|
"lib/bokslut/assets/asset-service.ts",
|
|
"lib/bokslut/reserves/periodiseringsfond-service.ts",
|
|
"lib/bokslut/tax-provision/bolagsskatt-calculator.ts",
|
|
"lib/bokslut/tax-provision/sarskild-loneskatt-calculator.ts"
|
|
]
|
|
},
|
|
"dialogOverflowRisk": {
|
|
"count": 7,
|
|
"files": [
|
|
"app/(dashboard)/supplier-invoices/[id]/page.tsx",
|
|
"components/bookkeeping/JournalEntryForm.tsx",
|
|
"components/invoices/PaymentBookingDialog.tsx",
|
|
"components/invoices/SendInvoiceDialog.tsx",
|
|
"components/reports/views/index.tsx",
|
|
"components/salary/NewEmployeeDialog.tsx",
|
|
"components/transactions/InvoiceMatchDialog.tsx"
|
|
]
|
|
},
|
|
"rawReferenceFetch": {
|
|
"count": 45,
|
|
"files": [
|
|
"app/(dashboard)/assets/[id]/dispose/page.tsx",
|
|
"app/(dashboard)/bookkeeping/year-end/page.tsx",
|
|
"app/(dashboard)/bookkeeping/year-end/periodisering/page.tsx",
|
|
"app/(dashboard)/customers/page.tsx",
|
|
"app/(dashboard)/import/page.tsx",
|
|
"app/(dashboard)/invoices/[id]/page.tsx",
|
|
"app/(dashboard)/invoices/page.tsx",
|
|
"app/(dashboard)/pending/page.tsx",
|
|
"app/(dashboard)/salary/employees/[id]/page.tsx",
|
|
"app/(dashboard)/salary/runs/[id]/page.tsx",
|
|
"app/(dashboard)/supplier-invoices/[id]/page.tsx",
|
|
"components/articles/ArticleForm.tsx",
|
|
"components/bookkeeping/ChartOfAccounts.tsx",
|
|
"components/bookkeeping/ChartOfAccountsManager.tsx",
|
|
"components/bookkeeping/CorrectionEntryDialog.tsx",
|
|
"components/bookkeeping/EditAccountDialog.tsx",
|
|
"components/bookkeeping/StrikeLinesDialog.tsx",
|
|
"components/common/CashAccountSelector.tsx",
|
|
"components/dimensions/types.ts",
|
|
"components/extensions/general/ArcimMigrationWorkspace.tsx",
|
|
"components/extensions/general/InvoiceInboxWorkspace.tsx",
|
|
"components/extensions/general/TicWorkspace.tsx",
|
|
"components/import/BankFileConfirmStep.tsx",
|
|
"components/import/FiscalYearGapNotice.tsx",
|
|
"components/import/ImportReviewStep.tsx",
|
|
"components/import/OpeningBalancePeriodStep.tsx",
|
|
"components/invoices/PaymentBookingDialog.tsx",
|
|
"components/invoices/SendInvoiceDialog.tsx",
|
|
"components/pending-operations/use-account-names.ts",
|
|
"components/reports/SkatteverketPanel.tsx",
|
|
"components/reports/views/index.tsx",
|
|
"components/salary/NewEmployeeDialog.tsx",
|
|
"components/settings/BookingTemplatesPanel.tsx",
|
|
"components/settings/FiscalPeriodEditor.tsx",
|
|
"components/settings/FiscalYearsManager.tsx",
|
|
"components/settings/InvoicePaymentAccountsSettings.tsx",
|
|
"components/supplier-invoices/use-supplier-invoice-data.ts",
|
|
"components/suppliers/SupplierForm.tsx",
|
|
"components/transactions/BulkBookDialog.tsx",
|
|
"components/transactions/DuplicateBookingDialog.tsx",
|
|
"components/transactions/InvoiceMatchDialog.tsx",
|
|
"components/transactions/MatchVoucherDialog.tsx",
|
|
"components/transactions/QuickReviewDialog.tsx",
|
|
"components/transactions/TemplatePicker.tsx",
|
|
"extensions/general/enable-banking/components/AccountPickerDialog.tsx"
|
|
]
|
|
}
|
|
}
|