Workspace sidebar
A workspace sidebar: switcher, live search, reorderable favourites, inline new projects, a storage meter and the account.
oxyn add workspace-sidebarCheckout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
rsx! {
WorkspaceSidebar {
workspaces: workspaces(),
favorites: favorites,
projects: projects,
storage: 0.38,
on_navigate: move |name: String| open(name),
}
}Rendered from Rust at build time · goes live when visible
When to use
- Agent apps are no longer one chat column.
- A coding agent window holds a thread list, a transcript, a diff, a terminal, a browser preview, a file tree and a status bar at once; the user moves between them dozens of times an hour and expects the layout to stay where they left it.
- What we saw: drag-and-drop pane layout with chat, diff, browser, terminal, file, plan, tasks and subagent panes, pop-out to a window and minimize to a floating corner tile; a resizable 6-area layout (Verdent, note 03); split panes right or down, drag tabs between panes, resize dividers, layout remembered per workspace, single pane with a scrolling tab strip on phones, Cmd/Ctrl+B to swap chat and the secondary view (Hoplite, note 10); a sidebar resizable by dragging its right edge and collapsible from a top-left button (Hoplite, note 10); a rail that snaps to icon-only under ≈160 px with labels fading in ≈0.18 s [R046]; icon-anchored collapse where labels clip and icons don't move [R016]; "sidebar and side panel open/close animate without layout jumps" (Antigravity, note 08).
- The user is trying to arrange the workspace once, move through it by keyboard, and never lose a panel.
When not to use
- The prompt box for an agent, in six layouts: use Composer instead.
- Grey shapes the size of what they stand in for, one sheen sweeping across all of them in step (or a staggered pulse), shown only after a short delay, then a crossfade into the content: use Skeleton instead.
- A run as a line of checkpoints, like git for agents: use Checkpoint lanes instead.
Installation
Workspace sidebar is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add workspace-sidebaruse crate::oxyn::{WorkspaceSidebar, STATUS_INDICATOR_CSS};Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{WorkspaceSidebar, STATUS_INDICATOR_CSS};
Usage
rsx! {
WorkspaceSidebar {
workspaces: workspaces(),
favorites: favorites,
projects: projects,
storage: 0.38,
on_navigate: move |name: String| open(name),
}
}Examples
Default
Favourites, projects, storage and account.
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code
rsx! {
WorkspaceSidebar {
workspaces: workspaces(),
favorites: favorites,
projects: projects,
storage: 0.38,
on_navigate: move |name: String| open(name),
}
}Switcher
The workspace switcher open.
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code
rsx! {
WorkspaceSidebar {
workspaces: workspaces(),
favorites: favorites,
projects: projects,
storage: 0.38,
on_navigate: move |name: String| open(name),
}
}Search
Live search filters both lists.
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code
rsx! {
WorkspaceSidebar {
workspaces: workspaces(),
favorites: favorites,
projects: projects,
storage: 0.38,
on_navigate: move |name: String| open(name),
}
}No match
Nothing matches.
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code
rsx! {
WorkspaceSidebar {
workspaces: workspaces(),
favorites: favorites,
projects: projects,
storage: 0.38,
on_navigate: move |name: String| open(name),
}
}Rail
Folded to the rail.
Checkout redesign
Three flows to review before Thursday. The address step still drops 14% of mobile sessions.
Code
rsx! {
WorkspaceSidebar {
workspaces: workspaces(),
favorites: favorites,
projects: projects,
storage: 0.38,
on_navigate: move |name: String| open(name),
}
}API reference
WorkspaceSidebar
| Prop | Type | Default | Description |
|---|---|---|---|
workspaces | Vec<(String, String)> | vec![("Northwind".to_string(), "Business · 24 members".to_string()), ("Fieldnote".to_string(), "Team · 8 members".to_string()), ("Personal".to_string(), "Free".to_string())] | Workspaces (name, plan line). |
favorites | Vec<String> | vec!["Checkout flows".to_string(), "Critique notes".to_string(), "Q4 roadmap".to_string(), "Component audit".to_string()] | Favourites. |
projects | Vec<String> | vec!["Checkout redesign".to_string(), "Mobile app 4.0".to_string(), "Design system".to_string(), "Onboarding".to_string(), "Help center".to_string()] | Projects. |
query | String | Default::default() | Initial search text. |
menu_open | bool | Default::default() | Start with the switcher open. |
collapsed | bool | Default::default() | Start folded. |
storage | f32 | 0.38 | Storage used (0–1). |
height | f32 | 480.0 | Height (px). |
on_navigate | EventHandler<String> | — | A favourite or project was opened. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| [ | Fold or expand |
| Alt↑or↓ | Reorder a favourite |
| EnterorEscape | Create or cancel a new project |
| Escape | Close the switcher or clear search |
Accessibility
- The switcher is a menu button with radio items.
- Reorders and new projects are announced.
- Storage is a meter.
From the spec
- Resizer:
role="separator",aria-orientation,aria-valuenow/min/maxin px,aria-controlsthe panel, label "Resize file tree"; Enter toggles collapse and announces "File tree collapsed". - Docks: landmarks per §8; collapse buttons have
aria-expanded. - Contrast: resizer line ≥ 3:1 against both neighbours when hovered or focused (1 px resting line may be subtle; it is not the only cue — the cursor and focus ring are).
- Every drag has a keyboard path (resizer arrows, "Move tab to new split right" in the tab menu).
- Live region: layout resets and pane pop-outs are announced politely; nothing is announced during drag.
- Reduced motion: §6 last row.
Motion & interaction
- Hover intent. The cursor changes immediately; the line thickens only after 300 ms so mouse travel across a resizer never flickers it.
- Drag. Size follows the pointer 1:1, painted every frame; no easing while dragging. Content inside the resizing panel reflows live; heavy panels (diff, terminal grid) may freeze-scale their last frame during drag and reflow on release if a reflow costs > 8 ms (proposed).
- Magnets. Within 8 px of a snap point the size jumps to it with a 1 px tick on the line and, on supported trackpads, a haptic tick (macOS only, opt-in).
- Snap to rail ([R046], [R016]). Labels clip from the inline-end and fade over 180 ms while icons stay put (icon-anchored); expanding reverses with labels cascading 20 ms apart (cap 8).
- Collapse / expand via shortcut. Width animates with
spring.snap; the center's content does not slide — its scroll anchor holds (zero-jump rule) and only its width changes. - Overlay open. Dock slides in 16 px + fade with scrim fade; close reverses faster.
- Tab drag to split. Ghost tab follows the pointer at 0.9 scale with 8 px shadow; the drop region fades in (120 ms) and morphs between halves with
spring.snap; on release the new split opens from the drop edge. - Double-click reset. Size glides to default with
spring.snap. - Restore. Never animated: the saved layout is the first frame (Hoplite's "Paint from your saved session" principle, note 10).
- Corner tile minimize. Pane scales into the tile's position (
dur.travel240 ms); the tile keeps a live loader dot and a title; click restores along the reverse path.
Timing
| Transition | Duration | Delay | Easing / spring | Stagger | Frame rate |
|---|---|---|---|---|---|
| Resizer hover highlight | 120 ms in / 120 ms out | 300 ms | ease.out | — | 60 Hz |
| Drag follow | 0 (1:1) | — | none | — | display rate |
| Pixel readout tooltip | 120 ms fade | 400 ms still | ease.out | — | 60 Hz |
| Magnet tick | 80 ms line flash | — | ease.out | — | 60 Hz |
| Snap to rail: labels out / in | 180 ms ([R046] ≈0.18 s) | 0 | ease.out | 20 ms, cap 8 (in only) | 60 Hz |
| Collapse / expand (shortcut) | ~220 ms settle | 0 | spring.snap | — | 60 Hz |
| Overlay open / close | 200 ms / 160 ms; scrim 160 / 120 ms | 0 | ease.out / ease.in | — | 60 Hz |
| Drop region in / morph | 120 ms / ~180 ms | 0 | ease.out / spring.snap | — | 60 Hz |
| Split open on drop | 200 ms | 0 | spring.snap | — | 60 Hz |
| Tab fly-back on cancel | 200 ms | 0 | ease.in-out | — | 60 Hz |
| Corner-tile minimize / restore | 240 ms | 0 | ease.in-out | — | 60 Hz |
| Layout persist | debounce 500 ms | after release | — | — | — |
| Breakpoint hysteresis | 48 px | — | — | — | — |
| Reduced motion | all size changes instant; labels and overlays use an 80 ms opacity crossfade; no ghost scaling (tab ghost is a flat outline); drag still follows 1:1 (it is direct manipulation) | — | linear | none | — |
Responsive behaviour
- The frame fills the stage width; the sidebar keeps its width and the content column takes the rest.
- Below 640 px fold the sidebar to the rail with `[`.
Edge cases (spec)
- Window too small for the saved layout (laptop after an external monitor): clamp fractions to minimums in dock priority center > bottom > left > right; collapse right first; never delete the saved layout — the clamped version is a view, the saved one is restored when space returns.
- Multi-monitor / DPI change mid-drag: sizes are stored in logical px; a DPI change ends the drag.
- Corrupt or future-version
LayoutState: fall back to default + "Layout reset · Undo". - RTL: docks mirror (left dock becomes inline-start on the right); resize arrows invert so → always moves the resizer visually right; F6 order follows visual reading order.
- Tiny sizes: rails at 48 px show 20 px icons with 16 px badges; below 600 px window width there are no side-by-side splits.
- Dense IDE: 22 px tab strips, 6 px resizer hit area (still ≥ 8 px on touch-capable devices).
- Touch: 12 px hit area, long-press 400 ms on a tab to start drag; overlay docks swipe closed.
- Slow networks / remote panes: a pane whose content is remote shows its skeleton (skeletons.md) inside the restored frame; layout never waits on data.
- Very fast agents opening many panes (diff, terminal, browser in 1 s): panes open into their dock's tab strip, not as new splits; an agent never creates a split without user permission (proposed).
- Agent-opened pane while user types: the pane opens unfocused with a 1-pulse attention dot on its tab; focus stays with the user.
Notes for AI
- Import
WorkspaceSidebarfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
WorkspaceSidebarElinoxyn_gpui. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.