summaryrefslogtreecommitdiffstats
path: root/docs/superpowers/specs/2026-08-03-query-completion-design.md
AgeCommit message (Collapse)AuthorFilesLines
9 hoursdocs: add the query completion implementation planDanilo M.1-3/+3
Twelve tasks, TDD throughout, tokenizer first: the parsing rules are where the defects will be and they need neither a widget nor a database to test. CompletionEntry gets its own header. Config needs it and QueryCompleter needs Config, so declaring it in querycompleter.h would make the two headers include each other. Also corrects the spec: NmTags already exists in nmraii.h, it does not need adding.
9 hoursdocs: make the mimetype completion list user-extensibleDanilo M.1-3/+44
Mimetypes are the one completion list with no enumerator and an open-ended set, so [completion] extra_mimetypes appends to the built-ins. Appending rather than replacing means a typo or a short list cannot leave completion worse off than the defaults. Entries are comma-separated with an optional description after '|'. The two separators differ because QSettings splits comma lists itself, so a description containing a comma would otherwise be torn into two entries. The other lists stay fixed: prefixes come from notmuch, paths from the configured accounts, dates are closed once symbolic and relative forms are covered, and tags are read from the database. A user-editable copy of any of them would only drift from its source. For prefixes specifically, the upgrade path is deriving the list from the installed notmuch, not making it editable.
9 hoursdocs: spec query bar completion, require translatable stringsDanilo M.1-0/+240
Design for backlog item 17. Completion covers query prefixes, tag values, date values, path values and mimetype values, each carrying a description so the bar documents the query language while it is typed. A new QueryCompleter class owns it, with the cursor-context tokenizer as a pure function so the parsing rules are testable without a widget or a database. NotmuchWorker gains an all-tags call, which did not exist. Addresses for from:/to: are out of scope: libnotmuch exposes no all-addresses call. Both prefixes still appear so the vocabulary reads complete. Account maildirs belong to path:, not folder:. Account::scopedQuery builds path:"<maildir>/**", and folder: is a different matcher in notmuch, against the folder name rather than the directory path. Also records the translatable-strings rule in CLAUDE.md. Existing code is not yet audited against it.