Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(ui): unify middle-panel collapse UX across Writers Room, Universe Builder, Series detail

[._.]/ Adam Eivy74a3092c1200
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 1108eceed0..2155043820 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -796,6 +796,19 @@
## Changed
+- **Writers Room / Universe Builder / Series detail — collapse UX now matches
+ CoS.** The three pages previously left a 32px vertical rail in place when
+ their middle sidebar was collapsed. They now mirror the Chief of Staff
+ pattern exactly: the grid track collapses to `0px` and a floating
+ `PanelLeftOpen` button anchored at `left-0 top-2 z-20` (styled as a tab
+ flush with the app nav edge — `rounded-r-md`, `border-l-0`, `bg-port-card/60`)
+ stands in for the rail. Added `transition-[grid-template-columns] duration-200`
+ on the grid container so the swap animates instead of jumping. Each page
+ keeps its own breakpoint convention (`md:` for Writers Room, `lg:` for the
+ other two). Files: `client/src/pages/WritersRoom.jsx`,
+ `client/src/pages/UniverseBuilder.jsx`,
+ `client/src/pages/PipelineSeries.jsx`.
+
- **Pipeline stage `tvScript` renamed to `teleplay` end-to-end.** Full
rename of the internal stage id, not just the visible label. Touches
server schemas (`TEXT_STAGE_IDS`, `STAGE_IDS`), routes
diff --git a/client/src/pages/PipelineSeries.jsx b/client/src/pages/PipelineSeries.jsx
index 07c8101af5..ea059fbbba 100644
--- a/client/src/pages/PipelineSeries.jsx
+++ b/client/src/pages/PipelineSeries.jsx
@@ -161,26 +161,29 @@ export default function PipelineSeries() {
// `gridTemplateColumns` swap between collapsed/expanded widths takes effect.
// Mirrors the UniverseBuilder full-bleed layout so the bible rail sits flush
// against the main app sidebar instead of floating inside Layout padding.
- const desktopGridCols = sidebarCollapsed ? '32px minmax(0, 1fr)' : '360px minmax(0, 1fr)';
+ // Collapsed track is 0px (not a thin rail) — matches CoS pattern where a
+ // floating expand button stands in for the rail.
+ const desktopGridCols = sidebarCollapsed ? '0px minmax(0, 1fr)' : '360px minmax(0, 1fr)';
return (
<div className="flex flex-col h-full">
<div
- className="flex-1 flex flex-col lg:grid min-h-0"
+ className="relative flex-1 flex flex-col lg:grid min-h-0 transition-[grid-template-columns] duration-200"
style={{ gridTemplateColumns: desktopGridCols }}
>
+ {sidebarCollapsed && (
+ <button
+ type="button"
+ onClick={toggleSidebar}
+ className="hidden lg:flex absolute left-0 top-2 z-20 p-1.5 text-gray-500 hover:text-white transition-colors rounded-r-md hover:bg-port-card bg-port-card/60 border border-l-0 border-port-border"
+ title="Show series bible"
+ aria-label="Expand series bible sidebar"
+ >
+ <PanelLeftOpen size={16} />
+ </button>
+ )}
{sidebarCollapsed ? (
- <aside className="hidden lg:flex border-r border-port-border bg-port-card/40 items-start justify-center pt-3">
- <button
- type="button"
- onClick={toggleSidebar}
- className="p-1.5 text-gray-500 hover:text-white"
- title="Show series bible"
- aria-label="Expand series bible sidebar"
- >
- <PanelLeftOpen size={14} />
- </button>
- </aside>
+ <div className="hidden lg:block overflow-hidden min-w-0" />
) : (
<aside className="border-b lg:border-b-0 lg:border-r border-port-border bg-port-card/40 lg:overflow-y-auto">
<BibleSidebar
diff --git a/client/src/pages/UniverseBuilder.jsx b/client/src/pages/UniverseBuilder.jsx
index 57db9097d5..0d5b3b6598 100644
--- a/client/src/pages/UniverseBuilder.jsx
+++ b/client/src/pages/UniverseBuilder.jsx
@@ -760,31 +760,35 @@ export default function UniverseBuilder() {
// Mobile = flex column (grid template ignored); lg+ = grid where the inline
// `gridTemplateColumns` swap between collapsed/expanded widths takes effect.
// Flipping `display` at the breakpoint (rather than overriding grid-cols-1
- // with an inline style) keeps the mobile stack working.
- const desktopGridCols = worldsCollapsed ? '32px minmax(0, 1fr)' : '260px minmax(0, 1fr)';
+ // with an inline style) keeps the mobile stack working. Collapsed track is
+ // 0px (not a thin rail) — matches CoS pattern where a floating expand
+ // button stands in for the rail.
+ const desktopGridCols = worldsCollapsed ? '0px minmax(0, 1fr)' : '260px minmax(0, 1fr)';
return (
<div className="flex flex-col h-full">
<div
- className="flex-1 flex flex-col lg:grid min-h-0"
+ className="relative flex-1 flex flex-col lg:grid min-h-0 transition-[grid-template-columns] duration-200"
style={{ gridTemplateColumns: desktopGridCols }}
>
- {/* Sidebar — world list. Collapses to a thin rail with just an open
- button on desktop; mobile keeps the full sidebar inline (the page
- stacks vertically below `lg`, so collapsing doesn't help there).
- Border-r + tinted bg matches WritersRoom's tight integrated look —
- the editor area flows directly off the sidebar without a card gap. */}
+ {/* Sidebar — world list. Collapses entirely on desktop (no rail) —
+ a floating expand button at the nav edge stands in. Mobile keeps the
+ full sidebar inline (the page stacks vertically below `lg`, so
+ collapsing doesn't help there). Border-r + tinted bg matches
+ WritersRoom's tight integrated look — the editor area flows directly
+ off the sidebar without a card gap. */}
+ {worldsCollapsed && (
+ <button
+ onClick={toggleWorldsCollapsed}
+ className="hidden lg:flex absolute left-0 top-2 z-20 p-1.5 text-gray-500 hover:text-white transition-colors rounded-r-md hover:bg-port-card bg-port-card/60 border border-l-0 border-port-border"
+ title="Show universes"
+ aria-label="Show universes"
+ >
+ <PanelLeftOpen size={16} />
+ </button>
+ )}
{worldsCollapsed ? (
- <aside className="hidden lg:flex border-r border-port-border bg-port-card/40 items-start justify-center pt-3">
- <button
- onClick={toggleWorldsCollapsed}
- className="p-1.5 text-gray-500 hover:text-white"
- title="Show universes"
- aria-label="Show universes"
- >
- <PanelLeftOpen size={14} />
- </button>
- </aside>
+ <div className="hidden lg:block overflow-hidden min-w-0" />
) : (
<aside className="border-b lg:border-b-0 lg:border-r border-port-border bg-port-card/40 px-3 py-3 flex flex-col gap-2 lg:overflow-y-auto">
<div className="flex items-center justify-between">
diff --git a/client/src/pages/WritersRoom.jsx b/client/src/pages/WritersRoom.jsx
index 5743e5c627..a5ccb38825 100644
--- a/client/src/pages/WritersRoom.jsx
+++ b/client/src/pages/WritersRoom.jsx
@@ -112,7 +112,9 @@ export default function WritersRoom() {
// Inline gridTemplateColumns is a no-op while the container is `display: flex`
// (mobile) and takes effect once `md:grid` flips display at the breakpoint.
- const libraryTrack = libraryCollapsed ? '32px' : '260px';
+ // Collapsed track is 0px (not a thin rail) — matches CoS pattern where a
+ // floating expand button stands in for the rail.
+ const libraryTrack = libraryCollapsed ? '0px' : '260px';
const exerciseSuffix = showExercise ? ' 320px' : '';
const desktopGridCols = `${libraryTrack} minmax(0, 1fr)${exerciseSuffix}`;
@@ -125,20 +127,21 @@ export default function WritersRoom() {
</div>
<div
- className="flex-1 flex flex-col md:grid min-h-0"
+ className="relative flex-1 flex flex-col md:grid min-h-0 transition-[grid-template-columns] duration-200"
style={{ gridTemplateColumns: desktopGridCols }}
>
+ {libraryCollapsed && (
+ <button
+ onClick={toggleLibrary}
+ className="hidden md:flex absolute left-0 top-2 z-20 p-1.5 text-gray-500 hover:text-white transition-colors rounded-r-md hover:bg-port-card bg-port-card/60 border border-l-0 border-port-border"
+ title="Show library"
+ aria-label="Show library"
+ >
+ <PanelLeftOpen size={16} />
+ </button>
+ )}
{libraryCollapsed ? (
- <aside className="hidden md:flex border-r border-port-border bg-port-card/40 items-start justify-center pt-3">
- <button
- onClick={toggleLibrary}
- className="p-1.5 text-gray-500 hover:text-white"
- title="Show library"
- aria-label="Show library"
- >
- <PanelLeftOpen size={14} />
- </button>
- </aside>
+ <div className="hidden md:block overflow-hidden min-w-0" />
) : (
<aside className="border-b md:border-b-0 md:border-r border-port-border bg-port-card/40 px-3 py-3 overflow-y-auto max-h-64 md:max-h-none">
<LibraryPane