Skip to content

feat: replace footer AI links with a floating assistant picker - #142

Merged
f0rr0 merged 9 commits into
nextfrom
f0rr0/ask-ai-widget
Sep 11, 2026
Merged

feat: replace footer AI links with a floating assistant picker#142
f0rr0 merged 9 commits into
nextfrom
f0rr0/ask-ai-widget

Conversation

@f0rr0

@f0rr0 f0rr0 commented Sep 11, 2026

Copy link
Copy Markdown
Owner

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 AnimatedCopyButton accepts 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:

  • Lint, TypeScript and Typst formatting; 7 focused prompt/resume/analytics tests.
  • Browser validation (temporary local harness, not committed): desktop hover; 390px/320px touch; panel bounds; equal tile sizes; SVG loading; article/profile selection; keyboard radio navigation; context reset during client-side navigation; pointer tracking, idle glances and blinking; absence of press scaling; prompt encoding; clipboard success/failure, timed reset, close/reopen reset, topic reset and late clipboard completion; Escape/focus return; footer clearance; reduced motion; print hiding.
  • Measured spring tracking reaching over 85% of its target within 100ms. Verified no instantaneous displacement on blur, pointer exit or visibility change, intermediate return positions, continued blinking during tracking, and live reduced-motion stop/restart.
  • Inspected light/dark mobile layouts and a 844×390 landscape viewport. Local Journey and writing routes work; local homepage runtime requires DATABASE_URL.
  • External assistant destinations block automated browsing. Outgoing prompts are verified; signed-in handoff and source retrieval still need a manual preview check. Copy prompt remains the fallback.

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.

@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
f0rr0-github-io Ready Ready Preview Sep 11, 2026 4:43pm UTC

@f0rr0
f0rr0 merged commit d732772 into next Sep 11, 2026
3 checks passed
@f0rr0
f0rr0 deleted the f0rr0/ask-ai-widget branch September 11, 2026 16:43
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