Rewrite against the real slot/session APIs: grid reflow fix, window top bars, per-window chat lists, glow on main-sidebar selection, MenuItemButton include/exclude, live preview from real chats; headless tests
This commit is contained in:
1 parent
1e908ed64e
commit
f931abd470
4 files changed
+614
-1029
No files matched your search
@@ -1,20 +1,32 @@
|
||||
# @local/dsh-chat-split
|
||||
|
||||
DSH plugin for multi-chat split screen with responsive grid wrapping, per-chat sidebars, and customizable layout rules.
|
||||
Split view for DeepSeek Harness: several chats open at once in the main area.
|
||||
|
||||
## Features
|
||||
|
||||
- **Responsive Grid Layout**: Places chats side-by-side; when the container width falls below the readability threshold, chats automatically wrap vertically into a grid of rows.
|
||||
- **Configurable Minimum Height**: Windows enforce a minimum height (default `396px`, configurable in Settings) to guarantee conversation readability.
|
||||
- **Settings with Interactive Preview**: Dedicated Settings section with an interactive resizable preview box and chat-count selector showing real-time reflow behavior.
|
||||
- **Per-Chat Sidebar**: Every split window features its own toggleable mini-sidebar listing sessions, letting you switch individual windows or jump to conversations.
|
||||
- **Active Split Blue Glow Highlight**: When selecting a chat that is already open in another split window while split view is active, that window pulses with a brief blue glow highlight.
|
||||
- **Include / Exclude Controls**: Add or remove any chat directly from the session menu (`...`) in the workspace sidebar.
|
||||
- **Window Top Bar**: Every window includes controls to move position in the grid (`◀` and `▶`) or close (`✕`) the window.
|
||||
- **Side by side, then a grid.** Chats sit in one row while each still gets the *readability width* (default 420 px). When the window is too narrow for that, they wrap into a grid of rows and columns.
|
||||
- **Minimum height.** Every window is at least **396 px** tall (configurable). If the rows don't fit, the grid scrolls instead of squashing the chats.
|
||||
- **A full chat in every window.** Each window renders the real conversation (messages, composer, tools), the same embedded view DSH uses for sub-agent chats.
|
||||
- **Own chat list per window.** The `☰` button opens that window's own sidebar: filter and switch which chat the window shows. A blue dot marks chats already open in another window, and a green dot marks running ones.
|
||||
- **Top bar per window.** Title, grid position (row · column), move up / left / right / down, and close.
|
||||
- **Blue glow on re-selection.** Selecting a chat that is already open (from a window's list, *+ Add chat*, the "…" menu, or the main sidebar) while split view is showing flashes that window with a short blue glow. Choosing it in the main sidebar keeps you in split view.
|
||||
- **Include / exclude.** Every chat's "…" menu in the sidebar has *Include in split view* / *Exclude from split view*.
|
||||
- **Settings with a live preview.** *Settings → Chat split* has sliders for minimum height, readability width, gap and window chat-list width, plus a scaled preview of the split view built from your real chats. Drag the preview's width/height or change the number of chats to see where it wraps.
|
||||
|
||||
## Usage
|
||||
## Use
|
||||
|
||||
1. Open **Split view** from the sidebar panellist icon (`⊞`).
|
||||
2. Use "+ Add open chats" or click the `...` menu on any session in the workspace sidebar and choose **Include in split view**.
|
||||
3. In any split window, use `◀ Sidebar` to view available sessions and switch chats.
|
||||
4. Customize minimum height and readability width threshold in **Settings → Chat split**.
|
||||
1. Click **Split view** in the sidebar's panel list (the two-pane icon).
|
||||
2. Add chats with **+ Add chat**, the suggestions on the empty page, or *Include in split view* in a chat's "…" menu.
|
||||
3. Rearrange with the arrows in each window's top bar; close with `✕`.
|
||||
|
||||
The list of open chats and the settings are stored in the browser (`localStorage`).
|
||||
|
||||
## Development
|
||||
|
||||
`client.js` is the whole plugin (`index.js` is an empty host half).
|
||||
|
||||
```bash
|
||||
node --test test/*.test.mjs # headless: registrations, rendering, layout maths, main-sidebar glow
|
||||
```
|
||||
|
||||
The test loads `client.js` with real React (`REACT_DIR=<dir with react/ and react-dom/>`) against fake DSH services, and skips when React isn't found.
|
||||
Reference in new issue
Block a user