- {aboutOpen ? setAboutOpen(false)} /> : null}
+ {aboutOpen ? setAboutOpen(false)} /> : null}
>
)
}
+
+/**
+ * The two surfaces the Windows desktop app carries besides its own window: the tray app
+ * ("Menu bar") and the Capacity Dock rail it draws ("Sidebar"). Both are on by default and
+ * live above About, where the social glyphs used to be.
+ *
+ * Nothing renders until the main process says this build has a tray app staged, which is why
+ * there is no placeholder row and no disabled switch: on macOS, on Linux, and in a dev build
+ * with nothing staged, the corner is exactly what it always was.
+ */
+function CompanionSwitches() {
+ const [status, setStatus] = useState(null)
+ const [busy, setBusy] = useState<'menuBar' | 'sidebar' | null>(null)
+
+ useEffect(() => {
+ let live = true
+ // `codeburn` is the preload bridge, absent in a plain browser and under tests, and
+ // `companionStatus` is absent on a preload that predates these two switches.
+ void codeburn?.companionStatus?.()
+ .then(next => { if (live) setStatus(next) })
+ .catch(() => {})
+ return () => { live = false }
+ }, [])
+
+ if (!status?.supported) return null
+
+ // Every setter answers with the whole status, so a switch shows what took rather than what
+ // was asked for: an install the person cancelled at the UAC prompt leaves it where it was.
+ const toggle = (key: 'menuBar' | 'sidebar') => {
+ if (busy) return
+ const call = key === 'menuBar' ? codeburn.setMenuBarEnabled : codeburn.setSidebarEnabled
+ if (!call) return
+ setBusy(key)
+ void call.call(codeburn, !status[key])
+ .then(setStatus)
+ .catch(() => {})
+ .finally(() => setBusy(null))
+ }
+
+ const row = (key: 'menuBar' | 'sidebar', label: string, hint: string) => (
+
+ {label}
+
+
+ )
+
+ return (
+
+ {row('menuBar', 'Menu bar', 'Show CodeBurn in the Windows notification area')}
+ {row('sidebar', 'Sidebar', 'Show the Capacity Dock rail on the screen edge')}
+
+ )
+}
diff --git a/app/renderer/styles/plain.css b/app/renderer/styles/plain.css
index 47ff670c..3f64bd13 100644
--- a/app/renderer/styles/plain.css
+++ b/app/renderer/styles/plain.css
@@ -130,10 +130,18 @@ body { overflow: hidden; background: var(--bg); color: var(--ink); }
.foot { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 11px 8px 2px; border-top: 1px solid var(--line); }
.foot .about { color: var(--mut); text-decoration: none; font-size: 12px; font-weight: 520; cursor: pointer; }
.foot .about:hover { color: var(--ink); }
-.foot .social { display: flex; gap: 2px; margin-left: auto; }
-.foot .social a { color: var(--mut2); display: flex; padding: 5px; border-radius: 6px; cursor: pointer; }
-.foot .social a:hover { color: var(--accent); background: var(--hover); }
-.foot .social svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
+/* Windows only: the tray app and the Capacity Dock rail, above About. Same 8px gutter and
+ 12.5px type as a nav item, so the corner reads as one column rather than two. */
+.companion { padding: 8px 8px 2px; border-top: 1px solid var(--line); }
+.companion-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
+.companion-label { color: var(--mut); font-size: 12px; font-weight: 480; }
+.companion-row .switch { margin-left: auto; }
+/* The bare .switch is painted for the dark onboarding sheet; on the sidebar it keys off the
+ theme tokens, exactly as the Settings surface does. */
+.companion .switch { border-color: var(--line2); background: var(--hover); }
+.companion .switch .switch-knob { background: var(--mut); }
+.companion .switch.on { background: var(--accent); border-color: var(--accent); }
+.companion .switch.on .switch-knob { background: #fff; }
/* About overlay: a compact, portal-free card using the reskin's surface tokens. */
.about-modal-backdrop {
@@ -1093,6 +1101,11 @@ html.page-hidden *::after {
.switch.on { background: #f2701c; border-color: #f2701c; }
.switch.on .switch-knob { transform: translateX(16px); background: #fff; }
.switch:focus-visible { outline: 1px solid #f2701c; outline-offset: 1px; }
+/* Compact variant for the 186px sidebar, where the full-size switch crowds the label out. */
+.switch.sm { width: 30px; height: 17px; }
+.switch.sm .switch-knob { width: 12px; height: 12px; }
+.switch.sm.on .switch-knob { transform: translateX(13px); }
+.switch:disabled { opacity: .55; cursor: default; }
/* On themed (Settings) surfaces the same switch keys off theme tokens. */
.set-p .switch { border-color: var(--line2); background: var(--hover); }
.set-p .switch .switch-knob { background: var(--mut); }