Skip to content

feat(settings): self-host settings plane, Sim wordmark in sidebar - #5990

Merged
TheodoreSpeaks merged 4 commits into
stagingfrom
feat/restore-chat-keys-settings
Jul 28, 2026
Merged

feat(settings): self-host settings plane, Sim wordmark in sidebar#5990
TheodoreSpeaks merged 4 commits into
stagingfrom
feat/restore-chat-keys-settings

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • New /selfhost/settings/{general,billing,chat-keys} plane — the settings a self-hoster needs from the managed service, open to any signed-in user
  • Chat keys move off the account plane entirely. They previously lived at a standalone /account/settings/chat-keys page that nothing in the app linked to, behind an isHosted gate
  • Registry unified projection is now optional (mirroring planes), so a section can opt out of the editor sidebar instead of being forced into it
  • Plane items resolve their own description and throw when one is missing — a plane-only section has no unified projection to inherit from
  • Settings sidebar shows the Sim wordmark linking to /?home instead of a Back chip; drops the now-dead backHref prop
  • bun run setup runs bun install first, so a fresh clone is one command

Type of Change

  • New feature

Testing

Tested manually on localhost. type-check, lint:check, and all 11 CI audits (check:boundaries, check:api-validation:strict, check:utils, check:zustand-v5, check:react-query, check:client-boundary, check:bare-icons, check:icon-paths, check:realtime-prune, skills:check, agent-stream-docs:check) pass. 24 settings nav/shell tests pass.

Note: the self-host plane has no inbound link yet — the natural entry point is the setup wizard printing the URL once it connects a Chat key. Follow-up.

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)

Chat keys were only reachable at a standalone /account/settings/chat-keys
page that nothing linked to. They now live on a dedicated self-host plane
alongside the two other settings a self-hoster needs from the managed
service.

- new /selfhost/settings/{general,billing,chat-keys} plane, open to any
  signed-in user
- chat keys move off the account plane entirely; no isHosted gate
- registry `unified` projection is now optional (mirroring `planes`), so a
  section can opt out of the editor sidebar
- plane items resolve their own description and throw when one is missing,
  since a plane-only section has no unified projection to inherit from
- settings sidebar shows the Sim wordmark linking to /?home instead of a
  Back chip; drops the now-dead backHref prop
- `bun run setup` runs `bun install` first so a fresh clone is one command
@TheodoreSpeaks
TheodoreSpeaks requested a review from a team as a code owner July 27, 2026 23:27
@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 27, 2026 11:49pm

Request Review

@cursor

cursor Bot commented Jul 27, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New auth-gated routes and navigation registry changes affect where users manage Chat API keys; misconfigured isHosted/billing gates could redirect or hide chat-keys incorrectly, but scope is mostly UI/routing with existing components.

Overview
Introduces a self-host settings plane at /selfhost/settings (general, billing, chat-keys) for signed-in users, with layout, routing, registry entries, and a renderer that reuses existing General/Billing/Copilot UI.

Chat keys move off the hidden /account/settings/chat-keys route onto the self-host plane (hosted-only); the account chat-keys page is removed. The copilot settings component is renamed/refactored for reuse in workspace and self-host shells (no account back link).

The settings registry gains an optional unified projection and a selfhost plane; plane-only sections must supply their own description. Sidebar chrome is plane-driven: self-host shows the Sim wordmark → /?home instead of Back; backHref is removed.

Docs and onboarding: README quickstart uses git clone + bun run setup (which now runs bun install first); Chat key management URL points to sim.ai/selfhost/settings/chat-keys. PostHog settings_tab_viewed includes selfhost.

Reviewed by Cursor Bugbot for commit 09a13b9. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a self-host settings plane and moves chat keys off the account plane.

  • New /selfhost/settings/{general,billing,chat-keys} routes with session gate and plane-specific nav
  • Optional registry unified projection; plane-only sections (chat-keys) supply their own descriptions
  • Sidebar chrome uses Sim wordmark → /?home on self-host; account/org Back goes to /workspace
  • README/bun run setup one-command clone path; PostHog plane type includes selfhost

Confidence Score: 5/5

This follow-up pass finds no remaining blocking issues relative to prior Greptile threads, so the PR appears safe to merge from that scope.

No prior inline Greptile findings remain outstanding in the available review context, and no eligible follow-up comments were established against previous threads.

Important Files Changed

Filename Overview
apps/sim/components/settings/navigation.ts Adds selfhost plane, optional unified projection, SELFHOST_SETTINGS_ITEMS, and description throw for plane-only sections.
apps/sim/components/settings/standalone-settings-shell.tsx Wires selfhost sidebar filtering (billing/isHosted) and shared shell chrome via SETTINGS_PLANE_CHROME.
apps/sim/components/settings/selfhost-settings-renderer.tsx Client renderer for general, billing, and chat-keys with settings_tab_viewed analytics.
apps/sim/app/selfhost/settings/[section]/page.tsx Auth + section parse, billing/chat-keys feature redirects, Suspense around renderer.
apps/sim/components/settings/settings-sidebar.tsx Replaces backHref with plane chrome; wordmark leave guard vs Back to workspace.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Signed-in user] --> B["/selfhost/settings"]
  B --> C[Redirect general]
  C --> D[StandaloneSettingsShell plane=selfhost]
  D --> E[Sidebar: general / billing / chat-keys]
  E --> F[SelfHostSettingsRenderer]
  F --> G[General]
  F --> H["Billing scope=account"]
  F --> I[Copilot / Chat keys]
Loading

Reviews (2): Last reviewed commit: "fix(settings): hide self-host Chat keys ..." | Re-trigger Greptile

Comment thread apps/sim/components/settings/selfhost-settings-renderer.tsx
The account-plane URL stopped resolving when chat keys moved to
/selfhost/settings.
Comment thread apps/sim/components/settings/navigation.ts
Comment thread apps/sim/app/selfhost/settings/[section]/page.tsx
Replacing the Back chip everywhere was too broad — account and
organization are reached from inside the app, so Back is right there.
Self-host is reached from outside it (the CLI wizard, the README), so it
leads with the brand mark instead.

SETTINGS_PLANE_CHROME declares that per plane, keyed on
StandaloneSettingsPlane so adding a plane forces the decision rather than
defaulting silently. It also absorbs the shell's parallel plane-label map.
Comment thread apps/sim/components/settings/settings-sidebar.tsx
Chat keys are issued by the managed service and useCopilotKeys is
`enabled: isHosted` for that reason. Moving the section onto the self-host
plane dropped its hosted gate, so a self-hosted deployment rendered a
Chat keys nav item whose list could never populate.

Restores the gate on the plane that now owns the URL. sim.ai is unaffected
— the section stays visible there to every signed-in user, which is the
surface self-hosters are pointed at.
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

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 09a13b9. Configure here.

@TheodoreSpeaks
TheodoreSpeaks merged commit 75b8b6f into staging Jul 28, 2026
20 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the feat/restore-chat-keys-settings branch July 28, 2026 00:01
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