Repository navigation
fix(search-algolia): make ask ai fullscreen below 1024px - #502
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
✅ No blocking issues found. Mode: standard. Verdict: ready to merge.
Reviewed changes
I checked the CSS-only Ask AI fullscreen fix against the installed upstream @docsearch/css sidepanel.css and @docsearch/sidepanel-js sources.
- Fullscreen panel below
1024px— The selector.DocSearch-Sidepanel-Container:is(.floating, .inline):is(.side-left, .side-right)has specificity 0,3,0. That ties with upstream's.floating.side-right/.inline.side-leftrules, and this one wins because it comes after the@import. The panel width comes from the inline--sp-widthvariable rather than an inlinewidth, sowidth: 100%also overrides custom andis-expandedwidths. - Expand action hidden — Upstream turns the expand button back on with
display:flexatwidth>=769px(0,1,0). The later 0,1,0 rule here hides it again. - Background scroll lock —
overflow: hiddenonhtml/bodyvia:has(.is-open)closes the 769–1023px gap. Upstream'swidth<=768pxlock already covers smaller screens. - Changeset — Patch bump for the unlinked
@docubook/plugin-search-algolia, as expected.
ℹ️ No regression test for the <1024px override
The fix only works because the selector ties upstream's specificity and comes later in source order, and because the breakpoints line up with upstream's 769px desktop rules. A future @docsearch/css bump could change either one without anyone noticing. src/__tests__/style.test.ts already pins plugin CSS against upstream this way, and the standing rule is "bug fix → regression test". This is optional and not blocking.
Technical details
# Pin the Ask AI fullscreen override in style.test.ts
## Affected sites
- plugins/search-algolia/src/__tests__/style.test.ts — add a case next to the remove-conversation one
- plugins/search-algolia/src/client/style.css:79-96 — the block to pin
## Required outcome
- Assert upstream `sidepanel.css` still applies `width:var(--sp-width)` under a `width>=769px` media query and shows `.DocSearch-Sidepanel-Action-expand` there.
- Assert the plugin CSS has the `@media (width < 1024px)` block with `width: 100%` and hides `.DocSearch-Sidepanel-Action-expand`.claude-opus-5-5 | 𝕏
There was a problem hiding this comment.
✅ No new issues found. Mode: standard. Verdict: ready to merge.
Reviewed changes
Since the last review, one commit was added. It contains only tests, and they pin the <1024px override against upstream @docsearch/css. That resolves the optional regression-test suggestion from the earlier review.
- Upstream desktop rules pinned — The new test collects every
@media screen and (width>=769px)block in the installedsidepanel.css. There are 9 blocks, and the regex handles their single level of nesting. It then checks three things inside those blocks:width: var(--sp-width), all four.{floating,inline}.side-{left,right}selectors, and thedisplay: flexrule for the expand action. If a future@docsearch/cssbump moves the breakpoint or changes specificity, this test will fail. - Plugin override pinned — A second test checks that the
@media (width < 1024px)block comes after thesidepanel.css@import, so it still wins on source order. It also checks that the block keeps the:is()geometry rule, the rule hiding the expand action, and thehtml/bodyscroll lock. - Local verification —
vitest run src/__tests__/style.test.tspasses all 3 tests.
claude-opus-5-5 | 𝕏

Ask AI previously switched to a narrow side panel at 769px, leaving tablet layouts below Flame's desktop breakpoint. Make the panel fill the viewport below 1024px for floating/inline variants on either side, including configured widths. Remove the outer inset and rounded corners, hide the expand action while fullscreen, and prevent background scrolling. Add regression tests that pin the upstream desktop rules, selector specificity and source order assumptions, and the fullscreen geometry, expand action, and scroll lock. Includes a patch changeset for
@docubook/plugin-search-algolia.Verification
Agent Context
/tmp/algolia-fullscreen-build.log,/tmp/algolia-fullscreen-check.mjs,/tmp/algolia-fullscreen-push.log,/tmp/algolia-fullscreen-tests-push.log