fix: onboarding phase 1 follow-ups: pins, Transactions card, Import messages, docs (#384) #474

Open
maximus wants to merge 7 commits from issue-384-onboarding-followups into issue-437-test-pins
Showing only changes of commit 66bdb19f44 - Show all commits

View file

@ -225,8 +225,13 @@ describe("onboarding samples — seed categorisation (#354)", () => {
"%s: the seed categorises the frozen share and leaves the hand-classified lines alone", "%s: the seed categorises the frozen share and leaves the hand-classified lines alone",
async (name) => { async (name) => {
const keywords = seedKeywords(); const keywords = seedKeywords();
// `categorizeBatch` asks for active keywords by descending priority; the // `categorizeBatch` asks for the active keywords by descending priority
// seed is all priority 0, so the SQL order is the file order. // and keeps the first one that matches. The seed is not all priority 0:
// COSTCO and WALMART are at 50, COUCHE-TARD ESSENCE at 10, the rest at 0.
// The mock sorts the same way; its sort is stable, so equal priorities
// keep the file order, which SQLite does not promise. Neither order moves
// the counts below: on 2026-10-18 no line of either sample matched more
// than one seed keyword (COSTCO WHOLESALE matches COSTCO alone).
select.mockResolvedValue( select.mockResolvedValue(
[...keywords].sort((a, b) => b.priority - a.priority) [...keywords].sort((a, b) => b.priority - a.priority)
); );