Skip to content

Wire up AND/OR for tags and properties, and add tag exclude #126

Open

Description

@disconsented

The search page has AND/OR controls for tags and for properties, but both are disabled and the back end always uses AND.

Current state:

  • UI: the tag SegmentedControl (ui/src/routes/app/[id]/[[slug]]/search.svelte:524) and the property SegmentedControl (search.svelte:661) are disabled. Both also write to the same value variable, and the property control has a fixed value="and".
  • Back end: build_query in src/web/query.rs uses ContainAll for tags (query.rs:407) and for include_props. exclude_props uses ContainNone.
  • Tags have no exclude. Properties have one: a property chip toggles positive, and the UI sends the negative ones as exclude_props.

Work:

  • Add tags_mode and props_mode (and | or) parameters to Parameters in src/web/query.rs. The default is and, so the current links keep their behaviour. Map and to ContainAll and or to ContainAny.
  • Add an exclude_tags parameter that maps to ContainNone on tags. Excludes always apply with AND, whatever the mode is.
  • Enable the two controls, give each one its own state, and keep the mode in the URL params like the other filters.
  • Let the user mark a tag as excluded, the same way a property chip is marked now (red tonal style, toggle on click).
  • Add statement tests next to the current ones in query.rs: the rendered SQL for each mode, and an exclude together with an include.

Note: OR on a large set of tags can make the query slower. Check it against the 5s list timeout (query.rs:264).

Activity

  1. added
    enhancement
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions