Commit Graph

726 Commits

Author SHA1 Message Date
lukas 19f1cdd197 feat: migrate playevent_note to StringCriterion and add note string filter to SessionFilterBar 2026-06-12 22:45:25 +02:00
lukas b5546ed828 test: implement E2E Playwright tests for string multi-mode filters 2026-06-12 22:45:25 +02:00
lukas 9cb911401a feat: integrate StringFilter into PlatformFilterBar and PurchaseFilterBar 2026-06-12 22:45:25 +02:00
lukas 2190b9d590 feat: add client-side toggle logic and multi-mode serialization for string filters 2026-06-12 22:45:25 +02:00
lukas 0c109cf2a1 feat: implement StringFilter composite component with 4x2 grid radios 2026-06-12 22:45:25 +02:00
lukas e8a49df2cf test: add comprehensive unit tests for all 8 string criterion modifiers 2026-06-12 22:45:25 +02:00
lukas 3c7ccbdd2b docs: add implementation plan for unifying form checkboxes 2026-06-12 22:45:25 +02:00
lukas 1322e6e71c feat: replace all form BooleanFields with PrimitiveCheckboxWidget via mixin 2026-06-12 22:45:25 +02:00
lukas 58b274a452 refactor: allow Checkbox and Radio primitives to render headlessly without labels 2026-06-12 22:45:25 +02:00
lukas e309ff1b30 docs: add design spec and implementation plan for boolean filters improvement 2026-06-12 22:45:25 +02:00
lukas 35d314768f test: add explicit radio group and True/False choice checks for boolean fields 2026-06-12 22:45:25 +02:00
lukas f9032eef9e feat: add click-to-deselect behavior and update checked-radio serialization in JS 2026-06-12 22:45:25 +02:00
lukas 99af73781b feat: replace single boolean checkboxes with radio groups in all FilterBars 2026-06-12 22:45:25 +02:00
lukas 79d1be2852 feat: implement _parse_bool_nullable and _filter_boolean_radio helper 2026-06-12 22:45:25 +02:00
lukas ebfc9aebfc refactor: generalize Checkbox and add Radio primitive component 2026-06-12 22:45:25 +02:00
lukas 03adcf99a7 Implement date filters in purchase list 2026-06-12 22:45:25 +02:00
lukas b1a4da2704 Improve the layout of the purchase filter bar 2026-06-12 22:45:25 +02:00
lukas 3ce6da708f Improve the layout of the game filter bar 2026-06-12 22:45:25 +02:00
lukas ab079cb447 Use adhoc Component() less 2026-06-12 22:45:25 +02:00
lukas c2996fd91b Add more filters 2026-06-12 22:45:25 +02:00
lukas 22c688bd9a Fix filter bars 2026-06-12 22:45:25 +02:00
lukas 4e77934d06 feat: implement frontend filter bars and integration across all list views 2026-06-12 22:45:25 +02:00
lukas b8d807d302 feat: implement comprehensive filters and cross-entity queries 2026-06-12 22:45:25 +02:00
lukas 67b40255ed Comment staging URL on the open PR after deployment
Looks up the open PR for the pushed branch via the Gitea API using the
workflow token and posts the staging URL once (skips if the same
comment already exists).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 22:45:25 +02:00
lukas eda9d39cdc Install Playwright browsers in CI test jobs
The e2e tests launch chromium, but uv sync only installs the playwright
package, not the browser binaries, so CI failed with "Executable
doesn't exist" for the headless shell.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 22:45:25 +02:00
lukas 3a5b6e2d51 Add Gitea Actions workflows for staging deployments
Django CI/CD / test (push) Failing after 1m1s
Staging deployment / deploy (push) Successful in 59s
Staging deployment / teardown (push) Has been skipped
Django CI/CD / build-and-push (push) Has been skipped
Branch pushes deploy a per-branch staging instance at
tracker-<slug>.home.arpa via the NAS act_runner; branch deletion tears
it down. build.yml ports the GitHub CI workflow so prod image builds
keep running on Gitea now that .gitea/workflows/ exists (Gitea ignores
.github/workflows/ when it does).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 17:08:53 +02:00
lukas e45be806fc Add E2E tests
Django CI/CD / test (push) Failing after 1m1s
Django CI/CD / build-and-push (push) Has been skipped
2026-06-09 12:47:44 +02:00
lukas 83aefcb849 Improve Backspace behavior in single-select SearchSelect
Django CI/CD / test (push) Successful in 44s
Django CI/CD / build-and-push (push) Successful in 1m15s
2026-06-09 12:25:58 +02:00
lukas c7c196a054 Fix non-filter select visuals 2026-06-09 11:56:01 +02:00
lukas c639196266 Search select JavaScript improvements 2026-06-09 11:48:36 +02:00
lukas ed086c9702 Fix prefetch 2026-06-09 11:37:41 +02:00
lukas 6f4841eaaa Update uv.lock
Django CI/CD / test (push) Successful in 47s
Django CI/CD / build-and-push (push) Successful in 1m14s
2026-06-09 09:47:21 +02:00
lukas 5c9bf45c61 Fix contrast issues with search select dropdown 2026-06-09 09:41:30 +02:00
lukas bd228365ed Add pnpm to shell.nix 2026-06-09 09:31:38 +02:00
lukas 1c9fb474df Unify UI for filter modifiers
Django CI/CD / test (push) Successful in 40s
Django CI/CD / build-and-push (push) Successful in 1m16s
2026-06-09 08:47:20 +02:00
lukas 737dd9275b Fix includes all query returning duplicates 2026-06-09 08:47:20 +02:00
lukas 9f436b245d Decrease debounce for search select 2026-06-09 08:47:20 +02:00
lukas 7ebaa51eb0 Ignore .hermes folder 2026-06-09 08:47:20 +02:00
lukas a7ff2962a6 Add number of games filter to purchases 2026-06-09 08:47:20 +02:00
lukas 103219a5e7 Add includes only matcher mode 2026-06-09 08:47:20 +02:00
lukas 14efff8078 Fix filter stuff 2026-06-09 08:47:20 +02:00
Claude ba9b92d419 Align set-criterion modifiers with Stash (any/all/none) and harmonize EXCLUDES
Closes #10.

Backend (common/criteria.py):
- Treat `excludes` as an always-orthogonal AND'd negative across both
  MultiCriterion and ChoiceCriterion; the modifier now governs only the
  `value` (include) set. This removes the prior divergence where
  MultiCriterion.EXCLUDES dropped the excludes list and ChoiceCriterion.EXCLUDES
  swapped include/exclude into a positive.
- Fold INCLUDES / INCLUDES_ALL / EXCLUDES (+ EQUALS/NOT_EQUALS aliases) into the
  shared _SetCriterion base so the two subclasses cannot drift; remove _extra_q.

M2M "has all" (games/filters.py):
- PurchaseFilter._games_to_q builds a pk__in subquery with one join per value so
  INCLUDES_ALL on the many-to-many games field works in a single .filter()
  (a naive Q(games=a) & Q(games=b) collapses to one join and matches nothing).

UI (FilterSelect + filter_bar.js):
- Add an optional any/all/none match-mode <select> (INCLUDES/INCLUDES_ALL/
  EXCLUDES) rendered before the pills via a new `leading` slot on the shared
  combobox shell. A native control so its value is its state. readSearchSelect
  serialises it to data-match; filter_bar folds it into the criterion modifier.
  Orthogonal to the (Any)/(None) presence pseudo-options and the exclude channel.
- Enable it for the M2M Purchase.games field (INCLUDES_ALL is only meaningful
  for multi-valued relations). Styled with already-compiled utilities.

Tests: harmonized EXCLUDES + INCLUDES_ALL for both criterion types, a DB-backed
INCLUDES_ALL vs INCLUDES contrast on Purchase.games, and FilterSelect /
PurchaseFilterBar rendering + round-trip of the match mode.

https://claude.ai/code/session_01KwVrGFbq13mZdhDL9G6zhg
2026-06-09 08:47:20 +02:00
Claude 05534875d6 Remove dead code and fix stale comments in filters.py
Django CI/CD / test (push) Successful in 46s
Django CI/CD / build-and-push (push) Successful in 1m12s
- Remove _filter_number() — defined but never called; take _FILTER_INPUT_CLASS
  with it since it was only used there.
- Remove the isinstance(value/excluded, str) single-string guards in
  _filter_get_choice — JS always emits arrays, this was backward-compat
  dead code.
- Remove identity-copy list comprehensions in PurchaseFilterBar; pass
  Purchase.TYPES and Purchase.OWNERSHIP_TYPES directly.
- Fix stale section comment that said model fields "resolve selected ids
  to labels" — they now use labels embedded in the filter JSON.
- Drop the now-unused escape import.

https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
2026-06-08 21:41:03 +02:00
Claude 428edbcfe8 Remove bare-value fallback from _extract_labeled
The JS always emits {id, label} objects now; the else branch was dead code
and the docstring was wrong. Update the remaining test that was still
passing bare strings.

https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
2026-06-08 21:41:03 +02:00
Claude 11cd62a3b9 Introduce LabeledOption and RangeValues named types
Replace all tuple[str, str] annotations with purpose-specific names:
- LabeledOption = tuple[str, str] for (value, label) pairs used in
  FilterChoice, FilterSelect params, _modifier_options, _find_label,
  and _extract_labeled.
- RangeValues(min, max) NamedTuple for _parse_range return values,
  making the two fields self-documenting at every call site.

Export LabeledOption from common.components alongside SearchSelectOption.
Document the "name compound types explicitly" convention in CLAUDE.md.

https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
2026-06-08 21:41:03 +02:00
Claude d9902146dc Clean up label-embedding architecture
- Move {id,label} stripping into _SetCriterion.from_json() so both
  MultiCriterion and ChoiceCriterion normalise at the parse boundary;
  the querying layer stays typed (list[int] / list[str]) and clean.
- Revert MultiCriterion to a thin _extra_q() override; _SetCriterion.to_q()
  is no longer duplicated.
- JS: readSearchSelect always emits {id, label} objects — no conditional
  mixed-type arrays. filter_bar.js stores them as-is for all fields,
  removing the fragile isIdField hardcoded list.
- Update tests to use the {id, label} filter format.

https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
2026-06-08 21:41:03 +02:00
Claude 83cbac9505 Update uv.lock
https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
2026-06-08 21:41:03 +02:00
Claude 0285243172 Embed labels in filter criteria (Stash-style) to retire pill resolver
Store {id, label} objects instead of bare IDs in MultiCriterion value/excludes.
FilterSelect pills now render directly from the embedded labels — no DB round-trip
to _resolve_game/device/platform_options. The filter URL and saved presets are
self-describing. MultiCriterion.to_q() extracts ids for querying; bare ints are
still accepted for backward compatibility.

Closes #9

https://claude.ai/code/session_01EyAJcMoDktLrY9tSbdHViA
2026-06-08 21:41:03 +02:00
Claude 112d3107ef Consolidate Multi/Choice criteria into a shared _SetCriterion base
MultiCriterion and ChoiceCriterion were near-duplicate copies whose INCLUDES
branches had drifted — the exclude-only bug existed in one but not the other.
Extract the shared include/exclude/null set-membership logic into a _SetCriterion
base implemented once (INCLUDES with empty-list guards, EQUALS as an alias,
IS_NULL/NOT_NULL); subclasses contribute only their value type and their own
modifiers via _extra_q (INCLUDES_ALL for Multi; EXCLUDES/NOT_EQUALS for Choice).
Behaviour preserved (full modifier vocabulary kept); the duplication that caused
the drift is gone. Surfacing the modifier axis and harmonizing EXCLUDES is
tracked in #10.

https://claude.ai/code/session_01XzhXvMvw42CQGc9kmin3GS
2026-06-08 19:12:28 +02:00
Claude 22d7834ae9 Fix exclude-only multi filters matching nothing
MultiCriterion.to_q (used by SessionFilter for game/device) unconditionally added
field__in=value even when value was empty, and __in=[] matches no rows — so a
filter with only excludes (e.g. device excludes 11, no game/device includes)
returned zero results. Guard the empty value like ChoiceCriterion already does,
so an exclude-only criterion means 'all rows except the excluded ids'.

https://claude.ai/code/session_01XzhXvMvw42CQGc9kmin3GS
2026-06-08 19:12:28 +02:00