• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

andgineer / dinary-server / 24733236455

21 Apr 2026 04:09PM UTC coverage: 76.383% (+3.5%) from 72.854%
24733236455

push

github

andgineer
fix(pwa): default-group selection + symmetric manage UI

Three related PWA fixes bundled:

1. Default (group, category) on first paint no longer gets stuck.
   ``findGroupByName`` / ``findCategoryByName`` now use a locale-aware
   case-insensitive comparison, so ``DEFAULT_GROUP_NAME="еда"`` matches
   the seeded capitalised group ``"Еда"``. Previously the mismatch
   left the category ``<select>`` on its HTML placeholder
   ``— select group first —`` until the operator manually toggled
   the group away and back. A happy-dom regression test pins both
   the narrow matcher contract and the end-to-end first-paint flow.

2. Label ``Envelope`` → ``Group`` in index.html (semantic mismatch),
   and the per-picker toggle relabelled ``Показать неактивные`` →
   ``Управлять`` / ``Закрыть``.

3. Symmetric management UI. The toggle now shows a single unified
   list with two sections: active rows with ``Скрыть`` (PATCH
   is_active=false via new ``adminDeactivate*``), inactive rows
   with ``Активировать``. ``Удалить`` is gated on a server-computed
   ``removable`` boolean on every catalog row so the button only
   appears where a DELETE would actually hard-delete — no more
   confusing "нажал удалить и ничего не случилось" dead-ends. The
   flag is the union of FK checks in ``expenses`` / ``expense_tags``
   / mapping tables plus an ``events.auto_tags`` name scan (tags
   only); aggregate queries keep it O(tables), not O(rows).

Also removes the obsolete ``401 clears admin token`` JS test — the
shared-token gate was removed earlier and ``dinary:admin_token`` is
no longer touched by the client.

inv pre: 0 errors. pytest: 414 passed (+3 new removable-flag tests).
npm test: 49 passed (+2 new happy-dom tests; happy-dom added as
devDependency).

Made-with: Cursor

36 of 36 new or added lines in 1 file covered. (100.0%)

420 existing lines in 14 files now uncovered.

3079 of 4031 relevant lines covered (76.38%)

0.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

83.33
/src/dinary/api/admin_catalog.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc