Skip to content

improvement(docs): remove Ask AI, add the missing platform surfaces, align the sidebar - #6259

Merged
waleedlatif1 merged 2 commits into
stagingfrom
improvement/docs-remove-ask-ai
Aug 4, 2026
Merged

improvement(docs): remove Ask AI, add the missing platform surfaces, align the sidebar#6259
waleedlatif1 merged 2 commits into
stagingfrom
improvement/docs-remove-ask-ai

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

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/chat route, and the four dependencies exclusive to it — @ai-sdk/openai, @ai-sdk/react, ai, streamdown.

lib/embeddings and docsEmbeddings stay: /api/search uses them for docs search, which is unaffected. Verified /api/chat had 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-7 and --surface-hover, the last two surfaces from apps/sim that docs did not define. Docs renders @sim/emcn and @sim/workflow-renderer components, and an undefined var() silently falls back to currentColor — 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:

app (canonical) docs (before)
padding-x px-2 lg:px-2.5
label size text-sm lg:text-small
hover fill --surface-active --surface-3
active hover --surface-6 none

All four now match, for both page items and folder rows.

Verification

biome, type-check --force (23/23), and a full docs next build. /api/chat is gone from the route manifest.

Not visually verified — the sidebar padding, label size and hover fills are visible changes.

… 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.
@waleedlatif1
waleedlatif1 requested a review from a team as a code owner August 4, 2026 19:29
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 4, 2026 7:43pm

Request Review

@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
User-facing docs AI is removed and sidebar styling changes; no auth or data-path changes. Remaining search API is unchanged.

Overview
Removes the docs Ask Sim experience end-to-end: the floating widget from the layout, ask-ai / ask-ai-panel components, and the /api/chat streaming route (LLM + hybrid doc retrieval). Drops the four packages only used there (@ai-sdk/openai, @ai-sdk/react, ai, streamdown). Docs search via /api/search and embeddings stay unchanged.

Adds missing platform CSS tokens --surface-7 and --surface-hover in global.css so shared @sim/emcn / workflow-renderer surfaces don’t fall back to currentColor.

Sidebar is brought in line with the main app’s Chip nav: horizontal padding px-2, labels text-sm, hover on --surface-active, and active hover on --surface-6 (in sidebar-components and fumadocs override rules). Removes the lightbox rule that hid the Ask Sim widget.

Reviewed by Cursor Bugbot for commit 0e5d70a. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Removes the docs Ask AI interface, API route, and exclusive dependencies while aligning shared surface tokens and sidebar styling with the main application.

  • Deletes the Ask AI widget and /api/chat implementation.
  • Adds the missing --surface-7 and --surface-hover theme tokens.
  • Aligns sidebar spacing, typography, and hover states with canonical Chip styling.
  • Updates the global sidebar overrides so they no longer defeat the component hover utilities.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported sidebar hover conflict is resolved because the global !important rules and component utilities now apply the same canonical hover surfaces.

Important Files Changed

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

Comment thread apps/docs/components/docs-layout/sidebar-components.tsx
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.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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.

@waleedlatif1
waleedlatif1 merged commit 39c3fe6 into staging Aug 4, 2026
24 checks passed
@waleedlatif1
waleedlatif1 deleted the improvement/docs-remove-ask-ai branch August 4, 2026 19:45
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