improvement(docs): remove Ask AI, add the missing platform surfaces, align the sidebar - #6259
Conversation
… to the app - Removes the Ask AI widget, its /api/chat route, and the four deps exclusive to it (@ai-sdk/openai, @ai-sdk/react, ai, streamdown). lib/embeddings and docsEmbeddings stay — /api/search uses them. - Adds --surface-7 and --surface-hover, the last two platform surfaces docs lacked. - Aligns the sidebar with the app's canonical nav chrome: px-2.5 -> px-2, text-small -> text-sm, hover --surface-3 -> --surface-active, and an active hover of --surface-6, matching the Chip the app's sidebar items are built on.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview Adds missing platform CSS tokens Sidebar is brought in line with the main app’s Reviewed by Cursor Bugbot for commit 0e5d70a. Configure here. |
Greptile SummaryRemoves the docs Ask AI interface, API route, and exclusive dependencies while aligning shared surface tokens and sidebar styling with the main application.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported sidebar hover conflict is resolved because the global
|
| Filename | Overview |
|---|---|
| apps/docs/app/[lang]/layout.tsx | Removes the Ask AI component import and rendering from the docs layout. |
| apps/docs/app/api/chat/route.ts | Deletes the Ask AI backend route and its LLM-assisted documentation retrieval flow. |
| apps/docs/app/global.css | Adds missing shared surfaces and correctly aligns the high-specificity sidebar hover overrides with canonical Chip states. |
| apps/docs/components/ai/ask-ai-panel.tsx | Deletes the Ask AI conversation panel. |
| apps/docs/components/ai/ask-ai.tsx | Deletes the Ask AI floating launcher and lazy-loaded panel integration. |
| apps/docs/components/docs-layout/sidebar-components.tsx | Aligns desktop sidebar spacing, text size, and inactive and active hover fills with the application sidebar. |
| apps/docs/package.json | Removes dependencies that were exclusive to the deleted Ask AI surface. |
| bun.lock | Updates the dependency lockfile after removing Ask AI packages. |
Reviews (2): Last reviewed commit: "fix(docs): make the sidebar hover CSS ag..." | Re-trigger Greptile
Review caught that the sidebar hover alignment in this PR had no visual effect. `global.css` carries !important rules for both the link and button sidebar items — they exist to beat fumadocs' own styles — and they were still forcing the pre-alignment values: --surface-3 on an inactive hover, and --surface-active on an active hover. So the Tailwind utilities were dead on arrival. The global rules now carry the app's values instead (--surface-active inactive, --surface-6 active), matching the utilities rather than fighting them, with a comment noting the two must move together.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0e5d70a. Configure here.
Follow-on to #6252. This work was written alongside that PR but missed the merge, so it lands separately.
Ask AI removed
Deletes the widget, its
/api/chatroute, and the four dependencies exclusive to it —@ai-sdk/openai,@ai-sdk/react,ai,streamdown.lib/embeddingsanddocsEmbeddingsstay:/api/searchuses them for docs search, which is unaffected. Verified/api/chathad exactly one caller (the Ask AI panel) and that none of the four deps is imported anywhere outside the deleted surface.Missing platform surfaces
Adds
--surface-7and--surface-hover, the last two surfaces fromapps/simthat docs did not define. Docs renders@sim/emcnand@sim/workflow-renderercomponents, and an undefinedvar()silently falls back tocurrentColor— so a missing surface is invisible until the branch that uses it renders.Sidebar aligned to the app
The app's sidebar items are
Chips. Docs had drifted from that chrome:px-2lg:px-2.5text-smlg:text-small--surface-active--surface-3--surface-6All four now match, for both page items and folder rows.
Verification
biome,
type-check --force(23/23), and a full docsnext build./api/chatis gone from the route manifest.Not visually verified — the sidebar padding, label size and hover fills are visible changes.