semblance/backend/app
Vadym Samoilenko 7b6a7c7347 Fix admin filters: ISO Z parsing crash + All time period returning month data
Two bugs caused filters to show 0 and period selector to have no effect:

1. Python < 3.11 can't parse JS toISOString() Z suffix — every request with a
   period filter threw ValueError → 500 → frontend received no data. Fixed with
   _parse_iso() helper that replaces Z with +00:00 before fromisoformat().

2. 'All time' sends no from/to params, but backend defaulted to _month_start()
   instead of omitting the ts filter. Fixed with _period_match() helper that
   returns {} (no filter) when both from and to are absent.

Also: stale _user_mtd_cost reference in get_user route replaced with
_user_period_cost(user_id, None, None); adminApi types updated with from/to.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 19:17:57 +01:00
..
auth Complete phases D–G: quota enforcement, token invalidation, admin writes, backfill 2026-04-24 18:34:48 +01:00
models Complete phases D–G: quota enforcement, token invalidation, admin writes, backfill 2026-04-24 18:34:48 +01:00
routes Fix admin filters: ISO Z parsing crash + All time period returning month data 2026-04-24 19:17:57 +01:00
services Improve live token extraction: warn on missing usage_metadata, capture thinking tokens 2026-04-24 19:13:39 +01:00
utils Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
.DS_Store changed permissions 2025-12-19 19:26:16 +00:00
__init__.py Final pieces: decorators on LLM routes, usage self-service, billing page, WS events 2026-04-24 18:43:13 +01:00
db.py Add LLM usage tracking infrastructure (Phases A-C) 2026-04-24 18:08:27 +01:00
extensions.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_debug_tap.py changed permissions 2025-12-19 19:26:16 +00:00
websocket_manager.py Apply Jintech security audit remediation (sprint 3) — 87/92 findings fixed 2026-03-20 12:51:18 +00:00
websocket_manager_async.py Fix AI autonomous mode: cross-loop WebSocket emit + polling fallback 2026-03-23 18:22:24 +00:00