Skip to content

Conversation

@Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Jan 9, 2026

Summary

Separates NavigationSearch and AskAi into independent web components to prepare for adding a real full-text search feature later.

The existing /search endpoint was an autocomplete for navigating to pages, not actual search. Renaming it to /navigation-search clarifies its purpose and reserves /search for future full-text search functionality.

Splitting the components also improves code organization - NavigationSearch and AskAi have different responsibilities and lifecycles, so coupling them together added unnecessary complexity.

Changes

  • Rename API endpoint from /search to /navigation-search
  • Split <search-or-ask-ai> into two independent web components:
    • <navigation-search> - autocomplete for page navigation
    • <ask-ai> - AI assistant modal (Cmd+;)
  • Move shared utilities (cooldown, error handling) to web-components/shared/

Test plan

  • Navigation search autocomplete works
  • Ask AI modal opens with Cmd+; and functions correctly
  • Both components hide when API is unavailable

Mpdreamz and others added 7 commits January 9, 2026 15:16
- Move shared search infrastructure from Search/ to NavigationSearch/:
  - navigationSearch.store.ts (renamed from search.store.ts)
  - useNavigationSearchQuery.ts (uses /navigation-search endpoint)
  - useNavigationSearchCooldown.ts
  - useNavigationSearchRateLimitHandler.ts

- Remove Search component and modal infrastructure:
  - Delete Search/ folder (Search.tsx, SearchResults/, etc.)
  - Delete SearchOrAskAiModal.tsx, modal.store.ts, modalmodes.ts
  - Delete useCooldown.ts (only used by modal)

- Simplify SearchOrAskAiButton to only render NavigationSearch

- Update AskAi components to be standalone (remove modal dependencies)

- Update cooldown.store.ts to use local CooldownDomain type

- Update tests and documentation (TESTING.md)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@Mpdreamz Mpdreamz added the fix label Jan 9, 2026
@Mpdreamz Mpdreamz self-assigned this Jan 9, 2026
@Mpdreamz Mpdreamz requested review from a team and cotti January 9, 2026 16:52
@Mpdreamz Mpdreamz changed the title fix/search endpoint Isolate /search to /navigation-search and simplify our webcomponents Jan 9, 2026
@Mpdreamz Mpdreamz marked this pull request as ready for review January 9, 2026 16:53
@Mpdreamz Mpdreamz enabled auto-merge (squash) January 13, 2026 10:15
@Mpdreamz Mpdreamz merged commit 0e6f26c into main Jan 13, 2026
30 checks passed
@Mpdreamz Mpdreamz deleted the fix/search-endpoint branch January 13, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants