Files
ottyl/tickets/065-filter-bar-help-should-describe-filter-syntax-not-regex.md
T
2026-09-06 13:00:21 +01:00

1.8 KiB

065 — Filter bar's help/prompt foregrounds regex syntax instead of the filter bar's own syntax

Summary

A comprehensive filter-bar syntax reference already exists — operators, [param] comparisons, datetime formats, worked examples — behind the <HelpIcon sectionId="filtering"> in webapp/src/components/Docs.tsx:76-140, wired up at FilterBar.tsx:32-34. The problem is emphasis, not missing docs: the input's placeholder (FilterBar.tsx:38) leads with regex("error") and ottyl_seq<5 or ottyl_ts>12:00, making regex look like the primary syntax, and a second <RegexHelpIcon> (a pure regex cheat-sheet, webapp/src/components/RegexHelpIcon.tsx) sits more prominently next to the input than the actual filter-syntax help icon. A user skimming the bar sees "regex" twice before noticing the filter bar has its own broader query language.

Scope

  • Change the input placeholder at FilterBar.tsx:38 to lead with a non-regex filter-bar example (e.g. ottyl_ts>-15m and requests[duration]>200), keeping a regex(...) clause further in the example rather than first if desired.
  • Reorder/re-emphasize the two help icons so the general filter-syntax HelpIcon (→ Docs.tsx's filtering section) reads as the primary affordance, with the regex-specific cheat sheet secondary/clearly labeled as being about regex specifically, not the filter bar as a whole.
  • Out of scope: rewriting the content of Docs.tsx's filtering section — it's already accurate and thorough; this is about surfacing it correctly, not authoring new documentation.

Acceptance criteria

  • The filter bar's placeholder text no longer leads with a bare regex(...) example as the first thing a user sees.
  • The general filter-syntax help is at least as discoverable/prominent as the regex-only cheat sheet.

Depends on

None.