dsh-conversation-float 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 gosutry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,76 @@
1
- # Temporary Holding Version
1
+ # Conversation float
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **dsh-conversation-float** — lifts the **conversation view** out of its fixed seat in DSH and turns it into a floating panel.
4
+
5
+ The float is **DSH's own** — the dock kit's floating panel, the same one the right sidebar uses — not a second browser window: the taskbar still shows a single DSH window. It holds **the real conversation view**, the same column rather than a redrawn copy, so typing, scrolling, switching between Conversation and Trajectory, the composer, attachments and the persona picker all stay native.
6
+
7
+ [English](README.md) · [简体中文](docs/README.zh.md) · [日本語](docs/README.ja.md) · [Deutsch](docs/README.de.md) · [Español](docs/README.es.md) · [Français](docs/README.fr.md) · [Português](docs/README.pt.md) · [Русский](docs/README.ru.md)
8
+
9
+ ## Use it
10
+
11
+ **Entry**: the small window icon at the right of the session title bar (*Conversation float*).
12
+
13
+ One click opens the float and the rest of the DSH chrome steps aside; the same button then brings DSH back, so it is one toggle. Closing the float, stowing it in the left sidebar or docking it into the right sidebar brings the chrome back on its own.
14
+
15
+ The float **opens large** (about 920×711, scaled to the window) by calling the dock kit's own `resizeFloat` intent — `sidebarRight.require()` → `actions.resizeFloat(sessionId, paneId, rect)`, with `paneId` read from `data-dockkit-float` on the float. It only grows a float; one you already enlarged is never shrunk back.
16
+
17
+ A collapsed right sidebar is **expanded before** the float opens, so "stow back into the sidebar" has somewhere to land, and a collapsed left sidebar is expanded too — collapse is detected by measuring width, so a narrow window never gets a collapse flag written.
18
+
19
+ **Closing the float and returning the conversation to the middle column restores the sidebars exactly as they were before it opened.** If you touched a sidebar **yourself** while the float was open, that last setting wins. "Yourself" counts only your own press or key, in both directions: DSH narrowing the left sidebar on a small window, or a hidden sidebar being re-laid-out, does not count. The snapshot is taken once, before any sidebar is touched, and is never overwritten while the float is up.
20
+
21
+ ## Drag it left, centre or right
22
+
23
+ Hold the float's title bar to drag. **Holding for 1.2 s** puts the drag into judging; from then on the outline follows the band under the pointer and the release drops into that band. Judging starts once per drag, so crossing bands never waits again. Releasing before 1.2 s does nothing — no accidental moves.
24
+
25
+ The three bands are the window's real columns: **left sidebar** (frame column 0, currently 0..280), **middle column** (280..680), **right sidebar** (the `data-rightbar-col` column, 680..1097). The outline covers exactly the block the float will land in, at the same size.
26
+
27
+ | Drop | After release |
28
+ | --- | --- |
29
+ | **Left** | The float is **stowed in the left sidebar drawer**: it is not closed, only invisible, so the middle column stays empty; the left sidebar grows a *Conversation float* row that brings it back |
30
+ | **Centre** | The float closes and the conversation returns to the middle column |
31
+ | **Right** | The conversation docks as a **page in the right sidebar** — a native DSH tab with its own *Return to sidebar* and close |
32
+
33
+ The left-sidebar row exists only after a float has actually been put there; before that the left sidebar stays empty and no permanent entry is added.
34
+
35
+ ## How it works (and why the conversation is not redrawn)
36
+
37
+ - The conversation exists as **one DOM**: the plugin moves the column that carries it into the panel body (same document, same React root) and moves it back on close or host change; if its original seat is gone, the fallback is the middle column.
38
+ - **Stow left** = a marker on the float's root makes it hidden (`visibility`/`opacity`); the panel is **not closed**, which is why the middle column can stay empty.
39
+ - **Dock right** = hands the tab to the right sidebar (`openResource(..., { destination: 'sidebar' })`) and lets DSH do the move and the docking.
40
+
41
+ ## Performance
42
+
43
+ Each animation frame does at most one measurement; the three bands are measured once, on press. The outline is repainted only when the band actually changes, and moves with `transform`. Earlier versions measured layout and wrote four styles on every mouse move — that, not the drop logic, was what made dragging feel slower than DSH's own.
44
+
45
+ ## Known limits
46
+
47
+ - A conversation has exactly one host: the left-sidebar row is an **entry**, never a second live copy of the conversation.
48
+ - Taking the float back out of the drawer puts it back **where it was stowed** (possibly over the left sidebar); it does not recentre.
49
+ - This is a float inside the DSH window, not a separate OS window.
50
+ - Restart DSH and the drawer state is gone; the conversation returns to the middle column.
51
+
52
+ ## Install
53
+
54
+ Requires DSH **>= 0.2.2-rc.1** — the version this bundle is developed and tested against.
55
+
56
+ ### From npm
57
+
58
+ ```bash
59
+ npm i dsh-conversation-float
60
+ ```
61
+
62
+ Then register it in the **profile's `package.json`** — both steps are required:
63
+
64
+ 1. add `"dsh-conversation-float": "^0.1.1"` to `dependencies`
65
+ 2. add `"dsh-conversation-float"` to `dsh.profile.bundles` — only a registered bundle shows up in the plugin list and can be toggled
66
+
67
+ ### From source
68
+
69
+ 1. put the source anywhere
70
+ 2. junction it into `<profile>/node_modules/dsh-conversation-float`
71
+ 3. in the profile's `package.json`: `dependencies` gets `"dsh-conversation-float": "link:<path>"`, `dsh.profile.bundles` gets `"dsh-conversation-float"`
72
+ 4. `client.js` reloads hot; the host half (`index.js`) is a no-op and needs a restart only if you change it
73
+
74
+ ## License
75
+
76
+ MIT