Skip to content

feat(ui): move Ask AI to a fixed corner launcher - #8016

Merged
jstirnaman merged 2 commits into
masterfrom
feat/ask-ai-corner-launcher
Nov 6, 2026
Merged

jstirnaman merged 2 commits into
masterfrom
feat/ask-ai-corner-launcher

Conversation

@jstirnaman

Copy link
Copy Markdown
Contributor

What changed

Move the global Ask AI button from the header to the lower-right footer stack. Keep the production gradient, add an outline chat icon, and retain the 1rem label. Use a 128 × 48px minimum on desktop and 112 × 44px on mobile, with reduced mobile padding.

Place the existing timestamp control above the launcher. Hide the stack while chat is open, exclude it from keyboard access behind modal backdrops, and measure its height to provide scrollable page-end clearance. Hide the closed wayfinding modal so enlarged text cannot extend it into the viewport.

Update ADR 0008 and add Playwright coverage. Product-spec and plan files are excluded.

Why

The header button disappears as readers scroll. A compact fixed launcher keeps Ask AI discoverable while limiting the amount of article content it covers.

Impact

Readers can open the existing Kapa composer from any scroll position. Preserve the existing controller, source filters, contextual prefills, conversation history, drawer widths, and focus restoration. Timestamp eligibility, appearance, and date behavior remain unchanged. Temporary overlap with article content is intentional; final feedback actions can scroll clear of the stack. The launcher remains excluded from 404 and print views.

Verification

  • Latest mobile adjustment: 18 Chromium Playwright launcher tests passed at 320, 390, 600, 601, 1280, 1440, and 1920px, including keyboard and touch activation, delayed loading, duplicate suppression, script/open failures and retry, focus restoration, history across resize, modal exclusion, API rendering, page-end clearance, themes, enlarged text, short landscape, print, and 404.
  • Before the mobile-only sizing adjustment: the combined launcher and existing timestamp suite passed all 22 tests, including date selection and sample updates across time zones.
  • Hugo testing-preview builds and API generation passed. TypeScript, ESLint, and diff checks passed. Commit hooks passed TypeScript, JavaScript lint, and Vale.
  • The remark hook could not finish installing its dependencies because the package registry returned HTTP 503; the hook reported this without blocking the commit.
  • Live Kapa verification completed an answer and retained the conversation after close and reopen.
  • Pending: physical-device browser controls/safe areas, actual browser zoom, deployed-preview inspection, and timestamp Copy verification.
  • Git HTTPS transport returned HTTP 503. Published the exact local tree and commit through GitHub's Git API; the remote commit SHA matches local HEAD.

To rerun locally: PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/bin/chromium yarn test:e2e:playwright playwright/e2e/ask-ai-launcher.spec.js playwright/e2e/custom-timestamps.spec.js --workers=2.

Preview pages

  • /influxdb3/cloud-serverless/get-started/write/
    Expected: timestamp control above the compact launcher; opening chat hides both; closing restores focus without a scroll jump. Final feedback can scroll above the stack.
  • /influxdb3/core/api/write-data/
    Expected: one fixed launcher on an API operation page with readable content behind it.
  • /influxdb3/core/admin/identify-version/
    Expected: contextual Ask AI links retain their prefills, source selection, and return focus.
  • / and /404.html
    Expected: homepage launcher without a timestamp control; no launcher on 404.

The repository's PR Preview workflow skips drafts. Mark ready when the deployed preview is needed.

Checklist

  • Signed the InfluxData CLA (if necessary); existing contributor status not independently verified.
  • Rebased/mergeable: branch starts from the fetched origin/master.
  • Local build passes (npx hugo --quiet): Hugo testing server builds passed; this standalone command was not rerun.

Suggested reviewers (click to expand)

The docs team is assigned through CODEOWNERS. Keep this PR in draft until deployed-preview and physical-device verification are complete.

What changed: Move the launcher from the header into the footer stack, retain the shared gradient, and use smaller mobile padding. Update the ADR and add Playwright coverage.

Why: Keep Ask AI available as readers scroll without a wide mobile control.

Impact: Hide footer controls during chat and modal interactions, preserve focus and conversations, and measure page-end clearance. Hide closed wayfinding content at text zoom.

Verification: 18 launcher Playwright tests passed after the mobile adjustment; the earlier combined launcher and timestamp run passed 22 tests. TypeScript, ESLint, Hugo preview builds, and live Kapa answer/history checks passed. Physical-device and deployed-preview checks remain pending.
@jstirnaman
jstirnaman marked this pull request as ready for review November 6, 2026 18:17
@jstirnaman
jstirnaman requested a review from a team as a code owner November 6, 2026 18:17
@jstirnaman
jstirnaman requested review from sanderson and a balanced review from Copilot and removed request for a team November 6, 2026 18:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved modal-readiness and back-forward-cache bugs can cause modal overlap or leave Ask AI blocked, while nonportable screenshot paths, unsupported Firefox touch emulation, and outdated widget assertions cause test failures.

5 open issues
What changed in this PR

Moves the global Ask AI entry point from the header to a fixed lower-right launcher, keeping it accessible while readers scroll and preserving the existing chat integration.

Changes:

  • Adds a responsive, labeled launcher beneath the timestamp control, with safe-area spacing and page-end clearance.
  • Hides the control stack during chat and excludes it from keyboard access behind modals.
  • Adds Playwright coverage and records the revised design in ADR 0008.
File Description
playwright/​e2e/​custom-timestamps.spec.js Sets consistent preferences before timestamp tests.
playwright/​e2e/​ask-ai-launcher.spec.js Adds launcher layout, interaction, accessibility, and recovery coverage.
layouts/​partials/​topnav.html Removes the header launcher.
layouts/​partials/​footer/​widgets.html Adds the labeled launcher and chat icon to the footer stack.
docs/​adr/​0008-shared-article-navigation-and-ask-ai.md Records launcher placement, sizing, and interaction decisions.
assets/​styles/​layouts/​_v3-wayfinding.scss Hides the closed wayfinding modal.
assets/​styles/​layouts/​_page-layout.scss Removes header-specific styling and hides the stack during chat at all widths.
assets/​styles/​layouts/​_footer-widgets.scss Defines responsive launcher styling, safe-area offsets, and scroll clearance.
assets/​js/​components/​ask-ai.ts Measures stack clearance and manages modal-based keyboard exclusion.

Review effort: Balanced

Comment thread assets/js/components/ask-ai.ts Resolved
Comment thread assets/js/components/ask-ai.ts Resolved
Comment thread assets/styles/layouts/_page-layout.scss Resolved
Comment thread playwright/e2e/ask-ai-launcher.spec.js Resolved
Comment thread playwright/e2e/ask-ai-launcher.spec.ts Resolved
What changed: Recheck modal availability after widget readiness and preserve subscriptions for persisted pagehide. Migrate outdated footer resize coverage to Playwright and use per-test screenshot paths.

Why: Prevent modal overlap and blocked launchers after cached navigation. Make test and DOM contracts explicit with TypeScript declarations, typed geometry, a dedicated type-check command, and ESLint project support.

Impact: Preserve launcher behavior while removing redundant comments, optional checks, and function-type assertions. Keep Firefox touch coverage because Playwright 1.63 supports hasTouch.

Verification: 26 Chromium Playwright tests passed. Production and Playwright TypeScript checks, ESLint, diff checks, and Hugo testing build passed. Firefox browser download was blocked by network policy. Product-spec changes remain excluded.
@jstirnaman
jstirnaman merged commit 6b8c167 into master Nov 6, 2026
26 checks passed
@jstirnaman
jstirnaman deleted the feat/ask-ai-corner-launcher branch November 6, 2026 20:34
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.

2 participants