aboutsummaryrefslogtreecommitdiff
path: root/src/lib/server/services/references.ts
Commit message (Collapse)AuthorAge
* fix: make grocery and reference ordering deterministicMartin Kagamino Lehoux13 days
| | | | | | | | | | | Every list query lacked a tiebreak, so rows sharing a sort key (same-ms createdAt inserts, tied or NULL quality scores) came back in unspecified order and bestRef flipped between loads. Add explicit tiebreaks: items createdAt desc, id desc (newest first); references qualityScore desc, id asc (first inserted wins ties). Categories were already total (order, name unique). Pin the rules with service tests.
* refactor: services layer, valibot validation, shared CSS utilities, aria ↵Martin Kagamino Lehoux2026-07-28
labels, and drizzle migrate - Extract groceries/categories/references services with db injection - Add valibot for form validation and safe numeric id parsing - Fix category delete FK behavior with onDelete: set null + migration - Replace custom migrate.js with drizzle-orm/libsql/migrator - Add shared CSS utility classes in app.css (forms, lists, buttons) - Add aria-pressed and aria-label on interactive elements - Remove redundant app.css imports and unused /stores import - Add integration tests for all services using drizzle migrate helper - Remove smoke test; add db:migrate and db:studio scripts