Skip to content

Latest commit

 

History

History
127 lines (91 loc) · 22.1 KB

README.md

File metadata and controls

127 lines (91 loc) · 22.1 KB

@dshfiles/workbench

The original conversation toolbar and child views stay bound to each visible thread

On a phone the thread panel rises as a bottom sheet: Changes and Context facets

Split-pane and narrow-header verification

Two independent original conversation headers with retained drafts

The original header remains reachable at a 360-pixel viewport

The synthetic split/narrow fixture intentionally has no provider credentials; these captures verify controls, history and drafts, not a successful model request.

The account Preview stays docked as content when its single tab row is hidden

Threads floated from the left sidebar over the main area

Empty fixed threads keep the native centered welcome

Independent native terminals in all four panes

Workspace views without duplicate conversation sources

Fixed conversations retain their complete editable inputs

The fixed-chat fixture has no external model credentials; it verifies preserved history and editable drafts.

View contract and layout recovery · Native terminal ownership and verification · Docking decisions

The custom Threads view moved into the bottom pane

Real resource views hosted in the tabbed right pane

A full-height right pane stays open beside the bottom pane

Docking workbench for DSH, with left, centre, right and bottom panes over one panel registry. Tabs can move, split and float; each region persists its own layout. The centre hosts real independently bound conversations alongside registered main pages, plugin views, the Settings hub and native resources. There is no Workbench heading or persistent top toolbar. The @dshfiles/editor package contributes an editor panel, and @dshfiles/jujutsu a reusable repository view.

Use

  • View names: reusable views carry sentence-case names without the plugin name (DESIGN.md), for example Quota, Files, Threads and Navigation. The chooser shows a view still registered as Plugin: View without its prefix (Settings Shell: Settings reads Settings, Backlog: Items reads Items) unless two views would share the short name, which then keep their qualified names. The chooser searches full names. Saved layout IDs and view state stay unchanged; restored captions update in place. Conversation names, scoped subjects and file/resource instance titles are not renamed.

  • One sidebar layout (b:952m): the left region is always mounted behind the thread sidebar's rail. Its default is one Sidebar pane (the rail and its list, tab row hidden), which moves, splits and floats like any pane and refuses an ordinary close; Reset layout restores it. The sidebar files a one-time merge request (@dshfiles/workbench/shell-merge): a formerly Fixed browser's dormant left layout is saved as the named layout Free docking (before merge) and the region starts from the default; a formerly Free docking left layout is kept, and the first migrating page turns showMainTabs on. Keep in sidebar requests (same module) dock a view as a stacked pane under the Sidebar pane, and the pane tab menu offers Add to sidebar ▸ ‹folder› while the sidebar provides its folders.

  • One view system: plugins export reusable components through @dshfiles/workbench/registry. Views open in left, centre, right or bottom panes and their Dockview split groups. The owned Threads list and Navigation use this same contract. The sidebar keeps only its brand/history/palette row and native account/footer chrome fixed. Sidebar customization belongs to the Threads panel's settings gear and follows that view.

  • Stable window scene: switching between already-open conversations from different projects changes only the selected conversation, not the tab set or layout. Unrelated New tab choosers, order, pins and drafts remain. Reload uses the current region layouts instead of an older scope cache; a chooser you explicitly close stays closed.

  • New thread welcome: an empty conversation keeps the native centered Into the Unknown heading, workspace/model controls and its original composer inside its own tab. Drafting alone keeps the welcome; the first real turn switches that same editor into normal chat. Loading/unknown history is not mistaken for an empty thread. The welcome also fits narrow and split panes.

  • Conversation tabs: one complete chat-and-editor view per Session. Clicking a closed conversation in the thread list opens it in the reusable italic preview tab, VS Code style (Main tabs › openMode, default preview); typing in it, double-clicking the tab or row, pinning or dragging keeps it, and new mode keeps every open. Clicking an open conversation focuses that exact tab, including after all tabs were closed. A tab never follows selection of another conversation. Drafts survive switching, closing and reopening of kept tabs. Closing the last tab leaves the chooser rather than resurrecting the global current chat.

  • Tab chrome: the selected tab carries an accent top edge (muted outside the focused group), and its close button sits right of the title (Main tabs › closeButtonPosition). Other tabs show their close button on hover or keyboard focus. Selecting a tab scrolls it fully into view once its title and the strip actions have laid out; a strip you scrolled by hand stays where you left it. Past Main tabs › maxTabs (default 10, 0 = no limit) the least recently used tab closes unless it is pinned, active or still working.

  • Main tab rows (productivity pass Q5; opt-in since b:4v6p): the main region's tabs show by default (showMainTabs, Settings › Workbench, or ⌘K Layout: hide tabs / Layout: show tabs); with them off, the main region's tab rows are hidden (threads switch from the list, ⌘K and the keys; New tab, Reopen closed tab and Close other tabs are ⌘K rows) and the thread header takes the row inline. A thread facet picked from the centre chooser then opens in the thread panel instead. Since the one sidebar layout (b:952m) the setting alone decides (data-shell-layout is retired); Pane options uses a split glyph, so the header row has one ⋯.

  • Original chat header: each conversation retains its own title/mode, workspace utilities and Pin/More menu; Trajectory, Traces and Requests are thread-panel facets opened from that menu (Rich Composer's thread views). Child views use the same session and resident editor; hiding the outer Workbench row does not hide or cover this header. The original right-sidebar opener controls the actual dock. Ownership and verification.

  • Long chats: history scrolls inside its pane while the original input remains reachable. Fixed conversations have a viewport-sized flex host through tab switches and reload. Closing an inactive tab leaves the selected chat alone; closing an active tab chooses an existing neighbor without retargeting another tab.

  • Terminals: choose New tab → Terminal in any pane. Each explicit launch creates an independent native terminal for the selected conversation's workspace, without forcing open the right pane. Moving, hiding and reloading retain the real PTY; closing its tab uses native cleanup. Select a conversation/workspace first if no context is available. The launcher never creates hidden conversations or allocates from a passive layout restore.

  • Thread panels: every Choose a view lists the thread facets first: each native right-pane page type that offers a guide entry (Changes, Cost, Jobs, Workspace files, …), with its guide title, description, icon and order. Picking one opens that page for the thread on screen in the chooser's own pane; the body renders through the native sidebar.right.pane.tab seat with that thread's sessionId. An open facet follows the thread on screen: switching threads puts the new thread's page in the same place, and while no thread is on screen (a new-thread draft, a destination page) it keeps its place. With no thread on screen the rows are disabled. Terminal keeps its own launcher, since a terminal belongs to the thread that started it. Thread panels in the right pane.

  • New tab: each group's +, accessible as New tab, sits immediately after its last tab and opens an actual New tab chooser tab, not a dropdown. Empty right/bottom panes start with the same chooser. Its Choose a view region contains Search views, one Settings hub and reusable plugin views. Conversations open from the thread list or New thread; there is no separate Rich Composer or Current conversation picker entry. Legacy global-following conversation aliases retire without changing canonical fixed-session tabs. Choosing a plugin view opens a new occurrence by default; contributors can opt a singleton out with allowMultiple: false. Per-chat Trajectories, resource occurrences and Settings leaf sections are not primary suggestions; saved occurrences still restore. Workspace-only chooser.

  • Pane options: the far-right menu in each group offers Split right, Split down, Layouts, Move tab to, Reset layout and the bottom-pane toggle. Splits create actual Dockview groups, not nested containers. Layouts opens the saved-layout dialog; Move tab to acts on the active tab. There is no duplicate Add panel menu or pane-preference checkbox/up/down control strip.

  • Hide one tab row: right-click its sole tab or blank row space and choose Hide tab row. Only the row disappears; the same content, input and draft stay docked and mounted. Hover the content to find Show tab row at its top-right, focus that button by keyboard, or use the global Show tab rows command. Dropping/adding another tab into the group immediately shows the row and clears the hidden preference. Going back to one does not hide it again automatically. Multiple-tab groups cannot be hidden. The native header flag saves in the existing layout.

  • Account Preview is a view: the existing AI Accounts-only preview starts as a regular bottom-left tab group, not a special fixed strip. It uses the genuine contributor and supports the same move, hide-row, split and close controls. Existing saved placements win, including nested panes; closing it stays closed across reload, and the chooser can reopen it. Reset layout restores the default. Native sidebar account/settings controls, brand and update notices remain fixed. A standalone Sidebar without the Workbench override retains its old Preview fallback.

  • Window-wide floats: right-click a tab and choose Float panel, or use native Shift-float. In the four root panes the floating window can move outside its source pane. Drag its top titlebar to move it; drag its tab onto another pane to dock it. The native panel, live content and draft remain mounted while moving/resizing. Each clicked floating window comes to the front across panes, without raising unrelated sibling floats; its native window position saves normally. Nested paint-contained workbenches still float locally. Hiding/collapsing a source pane keeps its native descendant-visibility behavior; reopening restores it. Legacy local float positions may shift once into window coordinates, without resetting the layout or losing the view.

  • Permanent centre: the last docked centre group has no Close pane action. Closing or floating its last tab leaves a docked New tab chooser, never a missing tab system. Split groups merge only into another docked centre group; floating views keep their resources and drafts. Old floating-only layouts repair automatically. A valid singleton's hidden row stays intentional and recoverable; invalid multi-tab hidden rows reveal automatically.

  • Recovery: Reset layout always restores the visible chat list on the left and the current conversation in the centre, even from a tool page, collapsed sidebar, displaced chats or floating-only layout. It resets root/nested/project placements without changing chat history, drafts, semantic tabs, pins or named layouts. Workbench: Reset layout in the global command palette works independently of centre controls. Recovered chat layout.

  • One centre surface: conversations, pages and plugin views always use Dockview tabs. There is no native-surface option or separate Workbench destination. Saved native preferences are decoded for compatibility but cannot switch the renderer.

  • Right pane: Open right pane appears only in the main group's Pane options, only while the pane is closed. It and the original right-sidebar shortcut control the same full-height tabbed dock, including outside a thread. Close pane is an icon at the right pane's own right edge, never a centre Close right pane control. Closing the pane hides rather than unmounts it, preserving live views, drafts and resource lifetimes. Closing its last remaining tab automatically closes the pane instead of replacing that tab with a chooser. The shortcut and the pane's Close pane icon share one rule: a lone empty New tab chooser is discarded; every live view (including terminals, previews, drafts and pinned semantic tabs) is only hidden and returns unchanged on the next toggle. Several open panels are also kept. On a phone, toggling only hides/reopens the modal sheet, including its chooser. Touch-drag the sheet's header (its grab handle) to resize it, through the shared plugin-ui sheet drag: the sheet follows the finger; dragged up it grows to just under the top bar, dragged down past 30% of its resting height or flicked down faster than 0.5 px/ms it closes, and anything else snaps to the nearer of rest and expanded (instantly under reduced motion). Its content scrolls as before and drags the sheet down only from its scroll top. The open sheet is one browser history entry, so Android's back gesture closes it before it leaves the screen below; closing it any other way consumes that entry. @dshfiles/workbench/phone-history exports the history-layer hook the thread sidebar's phone stack uses too. Closing one of several tabs leaves it open. Reopening a discarded chooser creates one fresh chooser; reopening a hidden live view retains the same panel and resource. A resource/view can also reopen and adopt directly. A right-owned floating panel still counts as a live view.

  • Bottom pane: opened from Pane options or bottomPanel, below left and centre only. It never cuts into the full-height right pane. The frame owns its height and resize handle. An empty pane starts with the chooser and adopts moved views instead of duplicating them. Its own far-right Close pane icon hides it. Cmd+J toggles it from anywhere (Ctrl+J outside macOS) through the capture-phase shortcut plugin, because the browser owns that chord; the chord is a normal command that Settings › Shortcuts rebinds, and while the terminal has focus, Ctrl+J stays with the shell (it is a line feed) outside macOS, whereas Cmd+J on macOS still toggles the panel because the shell never receives it. Existing custom bindings for the old workbench.toggleBottomPanel shortcut row do not migrate automatically: rebind Toggle the bottom panel in Settings › Shortcuts (new row dshfiles-workbench.toggleBottomPanel).

  • Resources: preview, review and terminal providers retain their real Session records behind authorized presentation targets. Original resource commands reveal the tabbed right pane; the Terminal chooser honors the selected pane instead. Passive restoration does not reopen a deliberately closed pane. Views previously moved elsewhere retain their saved destination.

  • Move: Pane options › Move tab to lists where the active tab can go — the other docking regions, and the feature's own full main-view page when its definition names one. Each occurrence lives in exactly one region, so moving it closes the copy the source held; asking for a region that is closed opens it first and hands the panel over when it reports ready.

  • Narrow surfaces: quiet group chrome keeps the New tab, Pane options and applicable Close pane icons accessible without a separate toolbar row.

  • Drag: a panel dragged by its tab into another region is adopted there and leaves the source. Where Dockview's own targets answer, the surface accepts the transfer through api.onUnhandledDragOver (the React wrapper exposes no such prop), which is how a group or tab shows the drop overlay. Dockview's layout-edge target refuses a foreign view outright, so over a region with no panel of its own no target answers at all: the view's own drop zone takes that case, reading the same page-global getPanelData() transfer. Either way the embedder adds the panel — or activates the copy the target already showed — and closes the source's copy. The workbench.drag-between-regions journey drives real pointer input for a round trip between the dock and the bottom row.

  • Layouts: Pane options › Layouts opens the dialog that saves the arrangement of every region under a name, and applies, renames or deletes those names later. A layout only changes the regions it recorded, and applying one opens a region it needs. A saved layout captures every mounted region: a region that was closed while saving is not part of that name.

Settings (dshfiles-workbench)

Key Default Meaning
bottomPanel hidden shown opens the tabbed bottom pane below left and centre; hidden closes it.
demoPanels false Developer fixtures: the Scratchpad and Ticker panels, which count mounts and renders to prove docking never remounts.

The owned frame (@dshfiles/frame-layout) is required. It owns the geometry and publishes the existing main, right and bottom seats. Browser-local right-pane visibility is the single owner of open/close state; the frame and sidebar shortcut consume registered DockPaneActions rather than mirroring a Session's expansion state. Hidden legacy mainSurface, rightPanel and headerToggle keys only decode old profiles. The old dock value seeds visibility once; subsequent closes and reloads preserve the browser's choice.

Native resources. In main-workbench mode the owned Sidebar Right declarer portals real session-bound file preview, diff and terminal slots into panels. It retains the genuine TabDomain, navigation and cleanup contract; moving a panel only detaches its presentation target. Native mode keeps the legacy right-column fallback. A saved resource panel reacquires its real session on reload, never a client-side invented resource.

Legacy nested surfaces. Existing nested-container layouts still restore, retain stable path ownership and participate in saved layouts/reset. No control offers new nested containers. Use Pane options › Split right / Split down for new side-by-side or stacked Dockview groups. Legacy containers cannot move into themselves or descendants.

Responsive evidence

The same controls remain reachable at 360, 480, 768 and 1024 pixels, including when main-tabs contributes New tab.

Icon-only main controls at 360 pixels

Main panels split beside each other

Docs

Panels

  • register({ id, title, component, dockDefault? }) on the page-global registry (@dshfiles/workbench/registry), from any plugin.
  • Main-page tab titles drop the Plugin: prefix of their navigation label. A plugin that knows a better name adds a PanelTitles entry ({ panelId, title }, a dshx registry in @dshfiles/workbench/panel-titles); @dshfiles/main-tabs provides the shell's destination section labels this way.
  • A panel that persists presentation state (view, filter, sort, selection) keys it by occurrence through @dshfiles/workbench/panel-occurrence: panelOccurrence({ panelId, scopeKey? }) joins the Workbench project scope, useWorkbenchScopeKey() re-keys on a scope switch, and panelOccurrenceStorageKey({ base, panelId, scopeKey?, legacyKeys? }) returns <base>/panel/<occurrence>, seeded on first read from the pre-scope per-panel key (or legacyKeys).
  • dockDefault remains readable for existing contributor/layout compatibility. Fresh right and bottom panes start with a New tab chooser; a saved layout still wins.
  • Layouts persist per surface in localStorage: dshfiles.workbench.layout.v1 (main), dshfiles.workbench.dock-layout.v1 (dock), dshfiles.workbench.bottom-layout.v1 (bottom row), dshfiles.workbench.side-panel-layout.v1 (per-thread tab), and named layouts under dshfiles.workbench.saved-layouts.v1. Nested containers use dshfiles.workbench.nested-surfaces.v1, a nested-paths.v1 index and nested-layout.v1:<path> stores. Existing root keys and named-layout records remain readable; migration preserves existing panels and active selection.

This is an owned DSH bundle and shared panel registry. Run pnpm build, pnpm test, and pnpm typecheck from this package.