WaleedandWaleed Latif c9547dcfe5 fix(desktop): keep page headers clear of the traffic lights (#6098)
* fix(desktop): keep page headers clear of the traffic lights

In the desktop app, collapsing the sidebar hands the top-left of the screen
to the content pane — the macOS traffic lights and the sidebar expander
then sit over page content rather than over the sidebar. Every top-of-page
header bar drew straight underneath them, so back buttons and the
integrations/skills switcher were unreadable and unclickable.

The reason it hit all of them at once is that the bar's geometry was copied
verbatim into seven files, so nothing could reserve that lane in one place.
Extract it as PAGE_HEADER_BAR and fold the lane into its top padding via
`--workspace-content-title-bar-inset`, the variable the content pane
already publishes for exactly this. That variable is 0px everywhere except
the macOS desktop app with the sidebar collapsed, so this is inert on the
web and on an expanded sidebar, where the lights sit over sidebar chrome
that already reserves its own lane.

Covers the settings shell, the credential/skill detail layout, the
integrations and skills switcher, integration block detail and its
fallback, and both upgrade headers. A guard test fails with the file named
if any page re-derives the bar instead of composing it.

* fix(desktop): cover the Resource header bar too

The first pass found its surfaces by grepping one exact class string, which
turned up the minority header. `ResourceHeader` is the same bar written as
`px-4 py-[8.5px]`, and it is the one logs, files, tables, knowledge and
scheduled tasks use — plus every loading fallback. Those all still drew
under the traffic lights, and on the breadcrumb surfaces the occluded
element is an interactive popover button, not just a title.

Share the lane math as TITLE_BAR_LANE_PT and compose it from both bar
geometries, which genuinely differ (the Resource bar is bordered and has a
min height). Nothing nests one bar inside the other, so no reset is needed:
the only out-of-pane render is the landing tables preview.

Move the variable's `0px` default to `:root` alongside the other
desktop-title-bar vars, so it is defined for bars outside
`.workspace-content-shell` — the standalone settings shell and that landing
preview — where an undefined var() inside calc() would be invalid at
computed-value time and drop padding-top entirely. That replaces the
per-call fallback, leaving one default instead of two that can drift.

Fold the assertions into the existing desktop title-bar surface audit
rather than a second audit file with its own conventions. The standalone
guard is gone: it keyed on one spelling of the geometry, so it was blind to
`px-4 py-[8.5px]` — the very re-derivation that made this pass necessary.

* fix(desktop): cover fullscreen routes, spare embedded panels

Review round 2 found the two arrangements the collapsed-sidebar selector
alone gets wrong.

A fullscreen route (/upgrade) slides the sidebar to zero width without
collapsing it, so `data-sidebar-collapsed` is absent and the lane stayed
zero while the pane was in fact sitting under the traffic lights. The pane
owns the lane whenever the sidebar is not there to own it, so the selector
now matches a new `data-content-fullscreen` as well.

The mirror error: the variable is inherited, and the mothership panel is
the right half of the pane — never under the lights — yet it embeds whole
pages (KnowledgeBase and friends) whose header bars reserve the lane. Those
bars were gaining ~38px inside the panel. The panel now zeroes the variable
for its subtree.

I had checked for exactly this nesting and concluded it did not exist,
having looked only at the settings pages that import `Resource` types
without rendering `Resource.Header`. `resource-content.tsx` renders the
knowledge page itself, which does.

An assertion each, both verified to fail when the fix is reverted.

* fix(desktop): size the peek card to its content, soften the overlay shadow

The floating sidebar pinned both its top and bottom edges, so it always drew at
full window height. On a short surface — the settings list — that left a tall
empty slab of card hanging below the last entry.

The card now hugs its content and caps at the pane height less the traffic-light
lane and the bottom gutter. Dropping the bottom pin is most of it: the four
`h-full` rules down the chain resolve against an auto-height parent and collapse
to content on their own. But nothing would then bound the sidebar's own
`flex-1 overflow-y-auto` region, so a long workflow list would be clipped by the
card's `overflow-hidden` instead of scrolling. The card is therefore a capped
flex column, and the shell is allowed to shrink inside it, which restores a
definite height for the chain to resolve against. That rule is scoped to
`[data-peek]` and is inert while docked, where the shell is not a flex item.

Also eases `--shadow-overlay` in both themes (alpha ~27% lighter, bloom pulled in
from 48px to 30px), keeping it clearly above `--shadow-medium` so the scale still
reads in order. The peek card drops the shadow entirely and separates on the same
`--border` hairline the content pane beside it uses.

* fix(desktop): stop the login page scrolling, drop the pane border at the window edge

Two reports against the desktop window chrome.

The login page scrolled by exactly the traffic-light lane. `.desktop-title-bar-page`
reserved the lane with `margin-top` plus a `calc(100vh - lane)` height, which sums to
the viewport on its own — but `body` carries `min-height: 100vh`, and body is a plain
block box with no padding, border, or BFC, so that top margin had nothing to collapse
against and collapsed through, displacing body itself. The document came out one full
lane taller than the viewport while the shell's `calc` saving was re-inflated
underneath it. Reserving the lane with padding *inside* the box removes both the
collapse and the `calc`: global `box-sizing: border-box` keeps the padding within the
`100vh`. Measured in the Electron renderer over CDP — 40px of overflow before, 0 after,
with the logo still clear of the lane.

Collapsing the sidebar also left a hairline outline traced just inside the window. The
shell drops to `p-0` there, but the content pane kept its border and 8px radius, so
both drew flush against the square window frame. The pane now drops them exactly when
it is flush. Keyed off the ancestor attributes rather than React state, because the
title-bar attribute is written pre-paint and a state-driven rule would flash the border
before hydration settles.

* docs(desktop): correct the peek card chrome comment

The card's TSDoc still listed `shadow-overlay` as part of its chrome after the
shadow was deliberately dropped, so the comment contradicted the code. It now
records that the card is unshadowed on purpose, and documents the content-hugging
height and the flex-column cap that make the sidebar's scroll region bound itself.

---------

Co-authored-by: Waleed Latif <waleed@simstudio.ai>
2026-07-30 14:25:07 -07:00
2026-07-28 19:25:59 -07:00

Sim.ai Documentation Slack X

Ask DeepWiki Set Up with Cursor

Sim — Integrate, Context, Build, and Monitor AI agents

A workspace to build, deploy and manage AI agents and workflows.

Quickstart

Cloud-hosted: sim.ai

Open sim.ai

Self-hosted

git clone https://github.com/simstudioai/sim.git && cd sim
bun run setup

Open http://localhost:3000

The Sim platform — chat on the left, the visual workflow builder on the right

Capabilities

  • Connect 1,000+ integrations and every major LLM
  • Add Slack, Notion, HubSpot, Salesforce, databases, and more
  • Build agents visually, conversationally, or with code
  • Ingest files, knowledge bases, and structured table data
  • Monitor runs, logs, schedules, and workflow activity

One workspace, every surface

Chat and workflows are just the start — tables, files, knowledge, and scheduled tasks all live in the same workspace.

Tables in Sim — structured data your agents can query

Tables — a database, built in

Files in Sim — documents for your team and every agent

Files — one store for your team and every agent

Knowledge bases in Sim — synced docs your agents can search

Knowledge — your agents' memory

Scheduled tasks in Sim — recurring agent runs on a calendar

Scheduled tasks — runs on your schedule

Self-hosting

Requirements: Bun and Docker.

bun run setup is an interactive wizard: it provisions the database, generates secrets, writes your .env files, connects a Chat API key, and starts Sim the way you choose:

  • Local dev — run from source to contribute or hack on Sim
  • Docker Compose — a self-contained instance for testing self-hosting
  • Kubernetes (Helm) — deploy to a local cluster

When it finishes, open http://localhost:3000.

Manage your install with bun run sim:

bun run sim start | stop | restart   # bring your install up / down / cycle
bun run sim status                    # what's installed and healthy
bun run sim logs                      # follow logs
bun run sim doctor                    # diagnose configuration problems
bun run sim down                      # remove containers (data kept)
bun run sim reset                     # archive .env and wipe managed data

sim detects how you're running (Docker Compose, local dev, or Kubernetes) and acts accordingly.

Prefer a bare sim? Run bun link once — but note sim lands in ~/.bun/bin, which Homebrew's bun doesn't add to your PATH, so you may need export PATH="$HOME/.bun/bin:$PATH" in your shell profile.

Sim also supports local models via Ollama and vLLM. See the self-hosting docs for details.

Chat API Keys

Chat is a Sim-managed service. bun run setup connects a Chat API key for you — sign in when it opens your browser and the key is stored automatically. To view, create, or revoke keys later, go to sim.ai/selfhost/settings/chat-keys.

Environment Variables

See the environment variables reference for the full list, or apps/sim/.env.example for defaults.

Tech Stack

Next.js · Bun · PostgreSQL · Drizzle · Better Auth · Tailwind — and the rest of the stack

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Built by the Sim team in San Francisco

Languages
TypeScript 77%
MDX 20.8%
JavaScript 1.9%
CSS 0.1%