Skip to content

Bring back the side rail as an optional, toggleable panel#44

Merged
falkoro merged 1 commit into
masterfrom
feat/optional-sidebar-rail
Jun 5, 2026
Merged

Bring back the side rail as an optional, toggleable panel#44
falkoro merged 1 commit into
masterfrom
feat/optional-sidebar-rail

Conversation

@falkoro
Copy link
Copy Markdown
Owner

@falkoro falkoro commented Jun 5, 2026

Per request: the cockpit redesign (#42) removed the sidebar — bring it back, improved, but make it optional with a discoverable hint (don't auto-impose it on users).

What changed

  • Side rail restored as the cockpit-styled left column (Machine / Remote / Containers / Links / Unlock) — flat hairlines, monospace, small-caps headers.
  • New "Panels" toggle in the top bar (leftmost, with a sidebar icon) — always-visible hint that the rail is optional. Shows/hides it; choice persists per browser (localStorage.sdSidebar). A rotating toolbar tip also calls it out.
  • body.sidebar-hidden collapses the rail → shells grid goes full-bleed (the clean cockpit look from Cockpit redesign: exe.dev monospace-minimal, sidebar removed, grid is the hero #42).
  • Default = shown on this instance (the rail is important here). Productized/multi-tenant deploys can default it hidden so we don't auto-add it for users — that flip lands with the signup slice (frontend default + future env flag).

How

Pure frontend: core.ts (sidebar icon), prefs.ts (sdSidebar pref + applySidebar/toggleSidebar), events.ts (inject the top-bar button + tip), app.css (rail restored + .sidebar-hidden collapse). Compiled to public/*.js. Reversible.

Verified (live, 1600px)

  • Default load → rail shown + Panels button highlighted.
  • Click Panels → body.sidebar-hidden, rail display:none, grid full-bleed, sdSidebar=hidden persisted.
  • Click again → rail back. Console clean. tsc build green.

🤖 Generated with Claude Code

The cockpit redesign removed the sidebar entirely; restore it as the
cockpit-styled left rail (Machine/Remote/Containers/Links/Unlock) but
make it OPTIONAL:

- New "Panels" toggle in the top bar (always-visible hint) shows/hides
  the rail; choice persists per browser as localStorage sdSidebar.
- body.sidebar-hidden collapses the rail so the shells grid goes
  full-bleed (the clean cockpit look).
- Default = shown on this instance. Productized tenants can default it
  hidden (one flag) so we don't auto-impose the rail on users.

Pure frontend (CSS + injected button), reversible. Verified live:
toggle hides/shows, persists, console clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings June 5, 2026 17:35
@falkoro falkoro merged commit 342c3af into master Jun 5, 2026
@falkoro falkoro deleted the feat/optional-sidebar-rail branch June 5, 2026 17:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Restores the cockpit sidebar as an optional “side rail” that users can show/hide via an always-visible “Panels” toggle in the top bar, persisting the choice in localStorage (sdSidebar) while preserving the full-bleed grid layout when hidden.

Changes:

  • Added sdSidebar preference with applySidebar() / toggleSidebar() to persist and apply the sidebar visibility state.
  • Injected a new top-bar “Panels” button (with a new sidebar icon) and added a rotating tip calling out the toggle.
  • Updated CSS to re-enable the left-rail layout by default and collapse it via body.sidebar-hidden to restore the full-bleed grid.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
public/prefs.js Adds sidebar visibility pref + apply/toggle functions and applies it during applyPrefs().
public/events.js Injects the “Panels” toggle button into the top bar and adds a new rotating tip.
public/core.js Adds the sidebar SVG icon used by the new top-bar button.
public/app.css Restores optional side-rail styling and implements .sidebar-hidden collapse behavior.
frontend/prefs.ts TypeScript source for sidebar preference + apply/toggle logic (compiled to public/prefs.js).
frontend/events.ts TypeScript source for top-bar injection + tip addition (compiled to public/events.js).
frontend/core.ts TypeScript source for the new sidebar icon (compiled to public/core.js).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants