Files

1.8 KiB

ADDED Requirements

The system SHALL provide a text input that filters knowledge entries in real-time as the user types. Filtering SHALL match against both metadata (title, tags) and the full body text of each knowledge entry.

Scenario: Search matches entry title

  • WHEN user types "matt" in the search input
  • THEN only entries whose title or body contains "matt" (case-insensitive) are displayed

Scenario: Search matches entry body text

  • WHEN user types "三层加载" in the search input
  • THEN all entries whose body text contains "三层加载" are displayed

Scenario: Search matches tag

  • WHEN user types "Claude Code" in the search input
  • THEN all entries tagged with "Claude Code" are displayed, along with entries mentioning it in body text

Scenario: No results found

  • WHEN user types a keyword that matches no entry
  • THEN the system SHALL display a "没有找到相关条目" (no results) message

Scenario: Clearing search restores all entries

  • WHEN user clears the search input
  • THEN all entries are displayed again in their original order (date descending)

Scenario: Search is case-insensitive

  • WHEN user types "CLAUDE" or "claude" or "Claude"
  • THEN the system SHALL return the same results regardless of case

Requirement: Highlight matched text

The system SHALL visually highlight the portion of text that matched the search query in each displayed result.

Scenario: Single word match

  • WHEN user searches for "skill" and an entry title is "Matt Pocock Skills"
  • THEN the word "Skills" in the title is visually highlighted

Scenario: Multi-word query

  • WHEN user searches for "ai agent" (two words)
  • THEN entries containing both words are prioritized and matched text is highlighted