Repository navigation
fix(ask-ai): add mobile close control and repeatable cloud startup - #7950
Merged
Merged
Conversation
What changed: Add one site-owned close button at widths up to 600px, using icon-remove with a 44px touch target, safe-area spacing, and keyboard focus styling. Reinsert it after widget rerenders and clean up its listener and styles when the adapter is disposed. Why: Mobile readers need a persistent way to return to the article. Impact: Route closing through Kapa.close() and the existing onModalClose handler so conversation history and launcher focus are preserved. Hide the vendor close control only on mobile and preserve desktop controls. Verification: TypeScript build, both adapter tests, and all 15 affected Cypress tests passed. Live close, contrast, focus restoration, and resize checks passed at 390px, 600px, and 601px in both themes. Confirmed the shared icon font renders in fresh screenshots. The changed-file verifier deferred these file types. Kapa returned HTTP 403 for answers, blocking completed-answer and long-conversation checks. Existing desktop live layout assertions and the analytics smoke check also failed.
What changed: Configure the mobile widget title as Ask AI and assert the title at the 600px breakpoint. Why: Keep the heading readable beside the mobile close control. Impact: Preserve the InfluxDB Ask AI title above 600px and update the title when the open widget resizes. Verification: TypeScript build and both adapter tests passed. The changed-file verifier deferred these file types. Browser verification was not completed for this follow-up.
What changed: Default cloud Cypress configuration to a writable cache location, check Xvfb before setup work, and add a headed live-test wrapper that creates and cleans up its own virtual display. Fix live-spec discovery in the general npm command. Document the Edit Environment steps needed to install system packages, retain certificate permissions, and publish. Why: Browser verification depended on shell-local config and a display left running by an earlier command. Impact: Cloud defaults remain isolated in the OpenAI environment scripts. Explicit config overrides and proxy/CA settings are preserved. The general live command discovers both Kapa specs without requiring cloud settings. Verification: Seven setup tests, Bash syntax checks, ShellCheck 0.10.0, and formatting passed. The changed-file verifier deferred these paths. The new wrapper passed readiness and the live close/resize test, and completed a real answer. The history test then failed because its full-text comparison includes a changing vendor Thinking status label. No test assertions were weakened. Fresh published-environment restoration still requires an Edit Environment session.
What changed: Configure Ask AI as the shared widget title and update the live title assertion. Why: The full title also truncates in the desktop sidebar. Impact: Remove the viewport-specific title override while preserving widget sizing and controls. Verification: TypeScript build passed. Changed-file verification deferred these file types.
sanderson
approved these changes
Oct 28, 2026
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.
What changed
Add one site-owned close button to the fullscreen Ask AI header at widths up to 600px. Use
icon-remove, a 44×44px touch target, safe-area spacing, reserved header space, and visible keyboard focus. Use the short heading “Ask AI” at every viewport width to avoid truncation in both fullscreen and sidebar layouts.The adapter restores the button after widget rerenders and cleans up its listener and styles on disposal. The button calls
Kapa.close()and leaves state, navigation, and focus restoration toonModalClose. Suppress the vendor close control only on mobile.Make browser startup repeatable in the OpenAI cloud scripts. Default Cypress configuration to a writable cache directory, check Xvfb before installation work, and add
kapa-live.shto run headed Chromium on an owned virtual display. Fix live-spec discovery in the general npm command. Document the remaining Edit Environment steps intools/cloud-environment/openai/README.md.Why
Mobile readers need a persistent way to return to the article. Verification also needs reproducible startup instead of shell-local settings and a display left running by another command.
Impact
Preserve conversation history, desktop controls, and fullscreen breakpoints. Cloud defaults remain in the cloud scripts; explicit configuration overrides and proxy/CA settings are preserved. System package installation, sandbox grants, and environment publishing remain explicit Edit Environment operations.
Verification
Remaining limits:
Captcha token is invalid; headed mode worked but cannot guarantee CAPTCHA acceptance in every session.Run the cloud mobile verification against a ready preview with:
Checklist
npx hugo --quiet)The affected article rendered successfully in the local Hugo preview. Remaining test and environment limitations are documented above.