Skip to content

improvement(docs): restructure sidebar, align chrome, rename Mothership to Chat - #6296

Merged
waleedlatif1 merged 1 commit into
stagingfrom
worktree-docs-chrome-polish
Aug 5, 2026
Merged

improvement(docs): restructure sidebar, align chrome, rename Mothership to Chat#6296
waleedlatif1 merged 1 commit into
stagingfrom
worktree-docs-chrome-polish

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Sidebar: 11 separator groups → 5, each module now a collapsible folder that auto-opens on the active page. 61 always-visible rows → 16. Groups mirror the app's own nav (Chats/Workspace/Workflows) instead of inventing a taxonomy. Enterprise and Self-Hosting hoisted out of Platform.
  • Registered the hover-hover variant — without it every @sim/emcn hover state compiled to nothing in docs (0 → 57 rules emitted). The navbar CTA had no hover at all.
  • Restored the sidebar's Geist font stack (it was the only font-family in global.css omitting var(--font-geist-sans), so the sidebar rendered in the OS system font).
  • Added 11 emcn tokens that were undefined in docs and silently falling back to currentColor (--z-*, --shadow-overlay, --code-*, --selection-*).
  • Adopted the named type scale, aligned row geometry/hover tokens/group labels with the app, removed 3 duplicate dark-mode blocks and 107 lines of dead duplicate logo exports.
  • Renamed mothership/chat/ per the constitution (the agent is "Sim", the surface is "Chat"), with redirects for old URLs.
  • Removed the page-type badge, dropped the ## Next heading from the ToC, and made FAQ rows open independently so expanding one no longer shifts the page.

Redirects — the part worth reviewing closely

Old URLs verified live: /mothership/chat, /mothership/:path*/chat/:path*, and two existing redirects that pointed at /mothership (/copilot, /mailer) were repointed — they would otherwise have become 404 chains.

Three mothership strings are deliberately preserved:

  • Video/image src paths — these resolve to remote CDN objects and real files in public/static/mothership/; renaming 404s them.
  • @mothership.sim.ai — a real production inbox domain the mailer page documents.
  • The mothership log-trigger value — a live entry in CORE_TRIGGER_TYPES, i.e. what users actually filter by.

Also fixed a pre-existing docs bug found on the way: the data-drains table listed sources as "Copilot chats"/"Copilot runs", but SOURCE_LABELS ships them as "Chats"/"Chat runs".

Type of Change

  • Improvement

Testing

Production build passes (4,281 static pages generated). Typecheck and biome clean. Verified against a local dev server: old URLs 308 → 200, renamed routes resolve, sidebar renders 5 groups, ToC excludes "Next", badge markup gone. Audited 400 pages / 562 internal links / 139 asset refs — no orphans, no broken links.

Not verified visually — no browser available in this environment. The hover-hover fix in particular turns on hover states site-wide that have never rendered before, so it deserves an eyeball.

Follow-ups (pre-existing, deliberately not in this PR)

  • 5 links with a wrong /docs/ prefix that are genuine 404s
  • workflows/blocks/logs.mdx is orphaned from its folder meta
  • chat/ imagery still shows Mothership branding and lives under mothership/ CDN paths — needs re-captured assets, can't be done piecemeal

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…ip to Chat

Sidebar: 11 separator groups become 5, with each module a collapsible folder
that auto-opens on the active page. 61 always-visible rows drop to 16. Groups
mirror the app's own nav (Chats/Workspace/Workflows) rather than inventing a
taxonomy; Enterprise and Self-Hosting are hoisted out of Platform.

Chrome: register the `hover-hover` variant, without which every @sim/emcn hover
state silently compiled to nothing; restore the sidebar's Geist font stack; add
11 emcn tokens that were falling back to currentColor; adopt the named type
scale; align row geometry, hover tokens and group labels with the app.

Rename: mothership/ -> chat/ with redirects for the old URLs. Asset paths,
the @mothership.sim.ai domain and the `mothership` log-trigger enum value are
deliberately left alone -- they are CDN objects, a real domain, and a live
product value.

Also removes the page-type badge, drops the "Next" heading from the ToC, and
lets FAQ rows open independently so expanding one no longer shifts the page.
@vercel

vercel Bot commented Aug 5, 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 5, 2026 8:40pm

Request Review

@cursor

cursor Bot commented Aug 5, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Docs-site and content-only changes with URL redirects for old paths; no runtime product code or auth/data paths modified.

Overview
This PR reshapes the English docs navigation from many flat sections into five groups (Build, Workspace, Administration, Reference) with module-level meta.json folders, and moves Enterprise and Self-Hosting out from under Platform in the sidebar.

The Mothership doc tree is renamed to /chat, with copy updated so Sim is the agent and Chat is the surface. next.config.ts adds permanent redirects from /mothership and /copilot to /chat (and repoints /mailer to /chat/mailer). The old mothership/ overview page is removed in favor of chat/index.mdx.

Chrome and styling in global.css register the hover-hover variant for Tailwind v4 (so @sim/emcn hovers work), add missing design tokens and z-index scale, align sidebar/TOC typography with the app type scale, and simplify sidebar group labels (no uppercase dividers). PageTypeBadge and frontmatter pageType are removed.

UX tweaks: table of contents filters out ## Next / ## Next steps headings; FAQ allows multiple open rows; page footer drops social links and redundant Previous/Next labels; academy and platform enterprise docs get terminology fixes (e.g. Copilot → Chat in data drains).

Reviewed by Cursor Bugbot for commit cfdea91. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR reorganizes the documentation navigation and renames the Mothership documentation surface to Chat while aligning the docs chrome with the application.

  • Consolidates the sidebar into fewer collapsible groups and updates navigation styling.
  • Renames documentation routes and links from /mothership to /chat, retaining compatibility redirects.
  • Updates FAQ expansion behavior, page navigation, typography, design tokens, and table-of-contents filtering.
  • Removes the page-type badge and unused logo variants.

Confidence Score: 5/5

The PR appears safe to merge, with no blocking failure remaining.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/docs/next.config.ts Adds legacy Mothership-to-Chat redirects and updates redirects that formerly targeted Mothership.
apps/docs/content/docs/en/meta.json Reorganizes top-level documentation groups to match the product navigation.
apps/docs/components/docs-layout/sidebar-components.tsx Updates collapsible folder rows, active states, spacing, and group-label presentation.
apps/docs/app/[lang]/[[...slug]]/page.tsx Excludes onward-navigation headings from the table of contents and removes page-type badge rendering.
apps/docs/components/ui/faq.tsx Allows multiple FAQ rows to remain expanded independently.
apps/docs/app/global.css Adds shared docs theme tokens and the pointer-aware hover variant while updating documentation chrome styles.

Reviews (2): Last reviewed commit: "improvement(docs): restructure sidebar, ..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile Re: "Global styling expands component coupling" (apps/docs/app/global.css, P2) — pushing back on this one; leaving the code as-is. Four reasons:

1. The rule cited is scoped to apps/sim, not apps/docs. .claude/rules/sim-styling.md declares its own frontmatter:

paths:
  - "apps/sim/**/*.tsx"
  - "apps/sim/**/*.css"

The docs app isn't in scope. apps/docs/app/global.css is the app's only stylesheet and has been for its whole life (1,741 lines before this PR).

2. @custom-variant cannot be component-local — it's a build-time registration. apps/docs is CSS-first Tailwind v4 with no tailwind.config, so the CSS entry file is the only place a custom variant can be declared. The main app registers the identical variant at apps/sim/tailwind.config.ts:302. This wasn't cosmetic: without the declaration every @sim/emcn hover-hover: class compiled to nothing (0 rules emitted; 57 after the fix), so the docs navbar CTA had no hover state at all. That was the bug.

3. Design tokens are global by definition. --z-modal, --code-bg, --selection-bg, --shadow-overlay are :root/.dark custom properties that emcn components read via var(). They were undefined here, so those var() calls were silently resolving to currentColor. The main app defines the same tokens the same way in apps/sim/app/_styles/globals.css. Scoping them to a component would defeat their purpose.

4. The high-specificity selectors aren't new, and they exist because the components aren't ours. They pre-date this PR and override fumadocs, a third-party package whose components we don't own and therefore cannot style locally. This PR modifies existing rules (a missing var(--font-geist-sans), hardcoded px → the named type scale) rather than adding new ones, and it deletes 3 duplicate dark-mode blocks and 4 redundant declarations. Net diff is +73/−49.

Happy to be corrected if you think one of those specifically should move, but "keep styling component-local" can't apply to a Tailwind variant registration, a design-token table, or a third-party override layer.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

All four points are correct — I'll withdraw the comment.

  1. The rule is path-scoped to apps/sim/** and shouldn't have fired on apps/docs.
  2. Tailwind v4 CSS-first has no tailwind.config.ts; the CSS entry file is the only legal place to register a custom variant. That's not a style choice, it's an architectural constraint.
  3. :root custom properties are global by definition — scoping them to a component would break every var() consumer.
  4. Third-party overrides (fumadocs) have to live in global CSS because you don't own the component tree.

The comment was wrong to apply a apps/sim-scoped rule here. Thanks for walking through it precisely.

Shall I remember a rule: "Do not flag apps/docs/app/global.css styling as violating component-local conventions — the docs app uses CSS-first Tailwind v4 with no config file, so variant registrations, design tokens, and third-party overrides must live in the global stylesheet"?

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile Yes, please remember it — with one narrowing so it doesn't over-suppress:

Do not flag apps/docs/app/global.css as violating the component-local styling convention: the docs app is CSS-first Tailwind v4 with no config file, so variant registrations (@custom-variant), :root/.dark design tokens, and third-party overrides (fumadocs) must live in the global stylesheet. The sim-styling.md rule is path-scoped to apps/sim/**.

Still worth flagging in that file: raw hex/rgb where an app token exists, off-scale font weights (only 400/500/600 are legal), hardcoded font sizes where the named scale applies, and hairlines that bypass --border-width. Those are real drift and I'd want to hear about them — it's only the "move this into a component" conclusion that doesn't hold for this file.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@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 cfdea91. Configure here.

@waleedlatif1
waleedlatif1 merged commit dcaa118 into staging Aug 5, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-docs-chrome-polish branch August 5, 2026 20:49
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