Skip to content

fix(filters): edit conditions with two parameters - #1482

Closed
revam wants to merge 0 commit into
revamfrom
split/05-filters
Closed

revam wants to merge 0 commit into
revamfrom
split/05-filters

Conversation

@revam

@revam revam commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Why

The filter editor mishandled conditions with two parameters: it offered the wrong picker for HasSourceGenre/HasSourceTag and dropped the second value of others on save.

What changed

  • New PairCriteriaModal: lists PossibleParameterPairs when the server sends them, so picks carry both values.
  • Without pairs (older servers, HasCharacterWithAppearance, HasCreatorWithRole), two inputs: the first from PossibleParameters when sent, the second free text suggesting PossibleSecondParameters (Input takes a list for that).
  • A saved condition keeps its second value, and a saved pair the server no longer offers is flagged, kept on save and stays pickable.
  • Tests for the pair handling in filterTree.

Where to look first

  • src/core/utilities/filterTree.ts: how pairs map back to a condition's parameters.
  • src/components/Collection/Filter/PairCriteriaModal.tsx: the new picker.

Feedback wanted

UX of the pair picker and of the two free inputs.

Left to do

Character and creator filters take free text, as the server sends no possible parameters for them; a search-backed picker would fit them better.

Stack

Part 5 of 12 in the split of #1477. Below: Part 4, hidden secrets in configuration forms. Above: Part 6, the restart reasons and the server version bump.

Testing

pnpm tscheck, pnpm lint, pnpm test and pnpm build pass at this branch's tip. Manual, on 6.0.0-dev.495: add a HasSourceTag condition, save, reopen, and edit it again.

@revam
revam added this pull request to stack #1490 October 3, 2026 17:38
@revam
revam force-pushed the split/05-filters branch from 54a57b2 to 1e9e38c Compare October 3, 2026 18:48
@revam
revam force-pushed the split/04-configuration-secrets branch from 2eec211 to 81d9997 Compare October 3, 2026 18:48
@harshithmohan
harshithmohan force-pushed the split/05-filters branch 2 times, most recently from 728284d to d093f78 Compare October 4, 2026 06:27
Base automatically changed from split/04-configuration-secrets to revam October 4, 2026 08:00
@harshithmohan
harshithmohan removed this pull request from stack #1490 October 5, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants