Bring back the side rail as an optional, toggleable panel#44
Merged
Conversation
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]>
There was a problem hiding this comment.
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
sdSidebarpreference withapplySidebar()/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-hiddento 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
localStorage.sdSidebar). A rotating toolbar tip also calls it out.body.sidebar-hiddencollapses 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).How
Pure frontend:
core.ts(sidebar icon),prefs.ts(sdSidebarpref +applySidebar/toggleSidebar),events.ts(inject the top-bar button + tip),app.css(rail restored +.sidebar-hiddencollapse). Compiled topublic/*.js. Reversible.Verified (live, 1600px)
body.sidebar-hidden, raildisplay:none, grid full-bleed,sdSidebar=hiddenpersisted.tscbuild green.🤖 Generated with Claude Code