Repository navigation
Filter and search by series years, status and summary - #989
Merged
Merged
Conversation
Browser filters for the series start year, end year and status (with a None row for a blank status), and search-box support for all four: start_year:/end_year:/status: are ORM columns like year:, and the series summary becomes a ComicFTS column so bare terms match it. Migration 0059 adds the filter-settings columns and rebuilds the FTS5 table with series_summary, so the first boot re-indexes every comic. The importer prunes unchanged series links, so a series whose summary changes now re-indexes all its comics through the FK re-sync path, and the tag editor's database-only summary edit updates the index rows in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Users can now find comics by the series attributes added in #984–#987.
start_year:/end_year:take the usual numeric operators, e.g.start_year:1990..1999orend_year:<2000.status:matches like a text field, e.g.status:ongoingorstatus:comp*.series_desc:/series_description:/series_summary:search the series summary. A bare search word matches it too.year:. The summary is a new FTS5 column,ComicFTS.series_summary.Re-index behaviour
codex_comicftswith the new column, as 0049 did, because FTS5 tables can't be ALTERed. The table comes back empty, so the first boot on an existing database re-indexes every comic through the startupSearchIndexSyncTask.series_summaryalong with the series name._bulk_update_modelsnow records series whose summary really changed inFTS_UPDATED_M2MS["series_summary"]. The existing Universe re-sync then rewrites every comic of those series, filtered oncomic__series__inwith the value fromF("comic__series__summary").SearchIndexerSyncannotatesseries__summary.AdminSeriesAttrsViewalready saves the summary straight to the database. It now also updates the series'ComicFTS.series_summaryrows in place, so the new text is searchable at once without bumpingComic.updated_ator queueing a sync.Changes from the plan
FTS_UPDATED_M2MSwithsetdefault().update()rather than being assigned. The per-comic phases run once per chunk, so assignment would let a later chunk drop an earlier chunk's series. The existing universes entry still assigns, so it can lose earlier chunks the same way..strip(",")the m2m GROUP_CONCAT values get, so summaries keep their edge commas.series__start_year, etc.) and stops assuming the field name is a Comic column. That assumption would have raisedFieldDoesNotExistand failed the whole availability endpoint.present()/absent()helpers treat a blank""status as the None choice.VuetifySeriesStatusChoiceField. It converts the null code before choice validation, so-1is accepted and an unknown status still returns 400. Its pk serializer keeps the None row's pk as the int-1, which the frontend'sNULL_PKSmatches;BrowserChoicesCharPkSerializerwould have sent"-1".SettingsBrowserFiltersfields moved from step 4 into the migration step, so the suite stays green between steps. Old user-data sidecars get the newschema.sqlcolumns automatically through_reconcile_columns.Tests
tests/test_browser_series_filters.py: availability, choices (including the None row), filtering on series and comic browses, and a settings round trip and validation.tests/test_search_series_fields.py:SearchIndexerSyncrebuild and incremental sync;tests/test_admin_series_attrs.py: a summary edit updates only that series' index rows; a status-only edit leaves them alone.tests/importer/test_basic.py: fixtures gainseries_summary.Verification
make build-choices,make fix,make lint,make tyall clean, andmakemigrations --checkreports no changes.make testpasses: 1734 Python passed with 1 xfailed, and 1033 frontend tests passed.make test-frontendalso passes on its own.start_year:1990..1999,status:ongoingand a bare summary word each return only the matching series' comic.POST /admin/series-attrs) is found by a search for its new word straight away.🤖 Generated with Claude Code