Skip to content

feat(docs): themed 'Ask AI' header pill (kapa.ai)#413

Merged
vishr merged 1 commit into
masterfrom
kapa-ask-ai
Jun 16, 2026
Merged

feat(docs): themed 'Ask AI' header pill (kapa.ai)#413
vishr merged 1 commit into
masterfrom
kapa-ask-ai

Conversation

@vishr

@vishr vishr commented Jun 16, 2026

Copy link
Copy Markdown
Member

What

Replaces kapa.ai's stock floating launcher — a bright square that clashed with the Terminal theme — with a custom "Ask AI" pill in the header, beside the search box. Clicking it opens the kapa modal. This is the entrypoint kapa's own best-practices guide recommends.

Changes

  • astro.config.mjs — hide the floating button (data-button-hide) and open the modal from our pill (data-modal-override-open-selector="#echo-ask-ai"); set the modal title to "Ask AI" (was kapa's auto-default "Echo Docs AI") and its header logo to a sparkle SVG matching the pill (was the Echo cube).
  • Search.astro — render the #echo-ask-ai pill next to the search box.
  • terminal.css — style the pill to mirror the search box (40px tall, dark bg, 8px radius, mono label, cyan sparkle); restore the search box's 352px width that the new wrapper had collapsed; icon-only on narrow viewports.
  • public/ask-ai.svg — Phosphor "sparkle" in Echo cyan, used as the modal logo.
  • Remove the old stubbed Ask Echo components (AskEcho/DocActions/PageTitle) and their CSS.

Verification

  • Production build passes (256 pages).
  • Verified live: the pill renders aligned beside Search, the floating launcher is gone, clicking opens the real kapa modal ("Ask me a question about Echo…"), and the modal shows the cyan sparkle + "Ask AI" title. Dark-mode sync intact.

🤖 Generated with Claude Code

Drop kapa.ai's stock floating launcher (a bright square that clashed with
the Terminal theme) and trigger the modal from our own "Ask AI" pill in the
header, beside the search box — the entrypoint kapa's own best-practices
guide recommends.

- astro.config: hide the floating button (data-button-hide) and open the
  modal from #echo-ask-ai (data-modal-override-open-selector); set the modal
  title to "Ask AI" and its logo to a sparkle SVG matching the pill.
- Search.astro: render the "Ask AI" pill next to the search box.
- terminal.css: style the pill to mirror the search box (40px, dark, 8px
  radius, mono) and restore the search box width that the wrapper collapsed.
- Remove the old stubbed Ask Echo components (AskEcho/DocActions/PageTitle)
  and their styles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vishr vishr merged commit c426fb0 into master Jun 16, 2026
2 checks passed
@vishr vishr deleted the kapa-ask-ai branch June 16, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant