feat: replace footer AI links with a floating assistant picker - #142
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the footer’s Claude Code / Codex links with a persistent “Ask an AI” launcher. The picker uses the existing Base UI components and theme tokens, equal-sized assistant tiles, and ChatGPT, Claude, Google and Perplexity SVGs. It opens on desktop hover/click or mobile tap and supports Escape, outside dismissal, focus return, safe-area spacing and a scrollable height limit. The CTA stays “Ask an AI” on every page; context is selected only through the tabs. The launcher is a 44px pill with a 28px face and a muted background. The rounded panel has a tighter, top-aligned header with a 32px close control and no descriptive subtitle. Both surfaces use a subtle outline in light mode and no outer border ring in dark mode; shadows and keyboard focus indicators remain.
The face uses Motion springs for quick pointer tracking and continuous movement back to center on pointer exit, window blur, visibility changes or inactivity. Declarative Motion animations provide short idle glances and blinking, including an occasional double blink, without restarting the blink cycle during tracking. Tailwind handles styling. A React external-store subscription responds to live reduced-motion changes. Pointer events update motion values rather than rendering coordinates through React state; listeners and the idle timer are cleaned up. No widget styles are added to global CSS. The launcher does not shrink on press, matching the rest of the app’s buttons.
Articles default to “This article” and send that article’s canonical Markdown URL, title and a source-grounded question to the chosen assistant. Readers can switch to “About Sid” to use the résumé/work guide instead. The writing index offers “My writing” to help readers find an article. Client-side navigation resets the context, and switching topics clears stale copy feedback. The separate article AI dropdown is removed so there is one consistent provider picker. “View prompt” is omitted; selectable text appears only if copying fails.
The shared
AnimatedCopyButtonaccepts any text and label, with a copy-to-check animation. It uses the journey’s 180ms reveal timing and the accordion/journey easing curve, respects reduced motion, and adds no press scaling. Success is announced to screen readers without an extra visible paragraph. Feedback resets after 1.5 seconds, on close/reopen, and on topic changes; late clipboard responses are ignored after dismissal.Validation:
SiteShell stays a server component. Writing pages pass article context directly, matching the existing portfolio page composition without a client provider, DOM lookup or extra fetch. The redundant blog layout wrapper is removed so each route renders one shell. Provider links are built in one helper; the ad-hoc browser script and test-only DOM attribute have been removed.
No dependencies added. Preview deployment requires Vercel sign-in.