Skip to content

ModalSearch: revive modal search with HTMX-compatible navigation for Codex#2796

Merged
reakaleek merged 4 commits intomainfrom
feature/modal-search-codex
Feb 26, 2026
Merged

ModalSearch: revive modal search with HTMX-compatible navigation for Codex#2796
reakaleek merged 4 commits intomainfrom
feature/modal-search-codex

Conversation

@reakaleek
Copy link
Member

@reakaleek reakaleek commented Feb 26, 2026

What

  • Add a new ModalSearch component (full-screen modal with search, keyboard navigation, and "Ask AI Assistant" integration) to replace the NavigationSearch popover in the Codex header and landing page
  • Fix HTMX navigation so search result links swap page content correctly

Why

  • The modal search provides a better UX for Codex (centered overlay instead of a popover anchored to the nav)
  • HTMX-boosted links inside portals require the anchor elements to remain in the DOM during the full request/response/swap cycle — the modal now uses a two-phase close (CSS hide on htmx:beforeSend, full unmount on htmx:afterSwap) to keep the anchors alive while HTMX reads hx-select-oob

Notes

  • The ask-ai:ask custom event handler in useAskAiFlyout enables the modal's "Tell me more about {query}" button to open the AI assistant with a pre-filled question
  • The landing page search trigger is now a styled button that dispatches modal-search:open instead of embedding the NavigationSearch component directly

Recording

cursorful-video-1772108671567.mp4

Made with Cursor

…Codex

Replace NavigationSearch with ModalSearch in the Codex header and landing
page. Use two-phase HTMX close strategy: hide backdrop on htmx:beforeSend,
then fully close on htmx:afterSwap to keep anchors in the DOM during the
HTMX request/response/swap cycle. Wire up ask-ai:ask event for the
"Ask AI Assistant" integration.

Made-with: Cursor
@reakaleek reakaleek requested a review from a team as a code owner February 26, 2026 12:20
@reakaleek reakaleek self-assigned this Feb 26, 2026
@reakaleek reakaleek enabled auto-merge (squash) February 26, 2026 12:39
@reakaleek reakaleek merged commit 7178e18 into main Feb 26, 2026
30 checks passed
@reakaleek reakaleek deleted the feature/modal-search-codex branch February 26, 2026 15:33
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.

2 participants