pmx-canvas 0.1.30 → 0.1.31
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/CHANGELOG.md +58 -0
- package/dist/canvas/global.css +38 -56
- package/dist/canvas/index.js +30 -30
- package/dist/types/server/canvas-state.d.ts +7 -0
- package/dist/types/server/html-surface.d.ts +6 -0
- package/dist/types/server/index.d.ts +13 -3
- package/dist/types/server/server.d.ts +12 -0
- package/docs/sdk.md +3 -1
- package/package.json +1 -1
- package/src/cli/index.ts +8 -1
- package/src/client/canvas/DockedNode.tsx +38 -38
- package/src/client/theme/global.css +38 -56
- package/src/mcp/canvas-access.ts +3 -1
- package/src/server/canvas-state.ts +24 -10
- package/src/server/html-surface.ts +22 -2
- package/src/server/index.ts +24 -7
- package/src/server/server.ts +55 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,63 @@
|
|
|
3
3
|
All notable changes to `pmx-canvas` are documented here. This project follows
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## [0.1.31] - 2026-06-07
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **Default docked status + context widgets.** A freshly opened canvas now shows
|
|
11
|
+
the agent's status widget docked at the left of the top menu and the context
|
|
12
|
+
widget docked at the right — flanking the toolbar as one continuous bar at the
|
|
13
|
+
same height. They are the same `status-main` / `context-main` nodes the
|
|
14
|
+
agent-event path already creates, just present from the start. Each collapsed
|
|
15
|
+
widget has an expand (▸) and an undock (⊙) control; undocking returns it to the
|
|
16
|
+
canvas as a normal node. Seeded **once on first run** (brand-new workspace
|
|
17
|
+
only) — never added to a canvas that already has content, and deleting or
|
|
18
|
+
undocking them is remembered (they are not re-seeded). `--demo` is unaffected
|
|
19
|
+
(it seeds the demo board instead).
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **Collapsed docked widgets match the toolbar height.** The collapsed context
|
|
24
|
+
widget now renders inline in the top HUD row (mirroring the status widget)
|
|
25
|
+
instead of as a separate right-edge side-tab, and a shared `--hud-bar-height`
|
|
26
|
+
keeps the toolbar and both docked pills at an identical height.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **Context nodes can be undocked.** Previously a `context` node was re-forced to
|
|
31
|
+
`dockPosition: 'right'` on every write, so it could never leave the dock. The
|
|
32
|
+
right-docked collapsed default is now applied at create time only; updates
|
|
33
|
+
(including undock → `dockPosition: null`) are respected.
|
|
34
|
+
|
|
35
|
+
- **SDK node-response parity (report #31/#32).** `PmxCanvas.addNode`, `getNode`,
|
|
36
|
+
and `addHtmlNode` now return the fully serialized node enriched with a
|
|
37
|
+
`surfaceUrl` (for surface-eligible types) and a `nodeId` alias for `id`,
|
|
38
|
+
matching the HTTP/CLI `node`-create responses field-for-field. `addHtmlNode`
|
|
39
|
+
now returns the created node object instead of a bare id string (consistent
|
|
40
|
+
with `addNode`); read `.id` if you only need the identifier. The internal
|
|
41
|
+
`CanvasAccess` contract is unchanged (still returns a bare id).
|
|
42
|
+
|
|
43
|
+
- **HTML "Open as site" tab title (report #35).** The standalone surface document
|
|
44
|
+
for an `html` node now carries a `<title>` (the node title) when the author
|
|
45
|
+
HTML does not already declare one, so the browser tab shows the node title
|
|
46
|
+
instead of falling back to the raw `/api/canvas/surface/<id>` URL. An
|
|
47
|
+
author-provided `<title>` is never overridden, and the injected title is
|
|
48
|
+
HTML-escaped.
|
|
49
|
+
|
|
50
|
+
### Notes
|
|
51
|
+
|
|
52
|
+
- **Report #33/#34/#36 — not reproduced.** #33 (elicitation/mode immediate
|
|
53
|
+
resolve) and #34 (delivery "claim" route) were already closed by the tester's
|
|
54
|
+
Codex retest as wrong-route repros. #36 (CLI emitting invalid JSON for html
|
|
55
|
+
primitives) does not reproduce: all 19 primitive kinds return valid JSON
|
|
56
|
+
through both `pmx-canvas html primitive add | jq` and raw `curl | jq`, with
|
|
57
|
+
zero unescaped control characters — the CLI re-serializes via `JSON.stringify`
|
|
58
|
+
and the server uses `Response.json`, both of which always escape U+0000–U+001F.
|
|
59
|
+
The full rendered HTML body is intentionally retained in the create response
|
|
60
|
+
(it is relied upon by consumers and renderer tests; agents wanting a compact
|
|
61
|
+
payload can use the MCP tool, which is already compact by default).
|
|
62
|
+
|
|
6
63
|
## [0.1.30] - 2026-06-07
|
|
7
64
|
|
|
8
65
|
### Added
|
|
@@ -1575,6 +1632,7 @@ otherwise have to discover by trial and error.
|
|
|
1575
1632
|
- Regression coverage for snapshot flat-`id` aliases on both MCP and
|
|
1576
1633
|
HTTP surfaces, plus async / top-level-`await` WebView script bodies.
|
|
1577
1634
|
|
|
1635
|
+
[0.1.31]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.31
|
|
1578
1636
|
[0.1.30]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.30
|
|
1579
1637
|
[0.1.29]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.29
|
|
1580
1638
|
[0.1.28]: https://github.com/pskoett/pmx-canvas/releases/tag/v0.1.28
|
package/dist/canvas/global.css
CHANGED
|
@@ -56,6 +56,10 @@
|
|
|
56
56
|
--mono: "IBM Plex Mono", "SF Mono", "Fira Code", monospace;
|
|
57
57
|
--radius: 10px;
|
|
58
58
|
--radius-sm: 6px;
|
|
59
|
+
/* Shared height for the top HUD row so the toolbar and the collapsed docked
|
|
60
|
+
status/context widgets that flank it line up to the same height. Matches the
|
|
61
|
+
toolbar's natural content height (icon buttons at 6px padding). */
|
|
62
|
+
--hud-bar-height: 44px;
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
:root[data-theme="light"] {
|
|
@@ -481,6 +485,8 @@ body,
|
|
|
481
485
|
align-items: center;
|
|
482
486
|
gap: 6px;
|
|
483
487
|
padding: 6px 10px;
|
|
488
|
+
min-height: var(--hud-bar-height);
|
|
489
|
+
box-sizing: border-box;
|
|
484
490
|
background: var(--c-panel-glass);
|
|
485
491
|
backdrop-filter: blur(12px);
|
|
486
492
|
border: 1px solid var(--c-line);
|
|
@@ -1409,6 +1415,38 @@ html.is-node-resizing .ext-app-preview-catcher {
|
|
|
1409
1415
|
max-width: 320px;
|
|
1410
1416
|
}
|
|
1411
1417
|
|
|
1418
|
+
/* Collapsed docked widget = a single menu-height pill that flanks the toolbar.
|
|
1419
|
+
Pinned to the same height as .canvas-toolbar so the top HUD row reads as one
|
|
1420
|
+
continuous bar (status on the left, context on the right). */
|
|
1421
|
+
.docked-node--collapsed {
|
|
1422
|
+
height: var(--hud-bar-height);
|
|
1423
|
+
box-sizing: border-box;
|
|
1424
|
+
justify-content: center;
|
|
1425
|
+
width: auto;
|
|
1426
|
+
/* Reset the base .docked-node min-width so the collapsed pill hugs its content
|
|
1427
|
+
(badge + count + controls) instead of stretching to a 200px bar. */
|
|
1428
|
+
min-width: 0;
|
|
1429
|
+
}
|
|
1430
|
+
.docked-node--collapsed .docked-node-header {
|
|
1431
|
+
height: 100%;
|
|
1432
|
+
padding: 0 10px;
|
|
1433
|
+
border-bottom: none;
|
|
1434
|
+
}
|
|
1435
|
+
.docked-node-count {
|
|
1436
|
+
min-width: 18px;
|
|
1437
|
+
height: 18px;
|
|
1438
|
+
padding: 0 5px;
|
|
1439
|
+
display: inline-flex;
|
|
1440
|
+
align-items: center;
|
|
1441
|
+
justify-content: center;
|
|
1442
|
+
border-radius: 9px;
|
|
1443
|
+
background: var(--c-accent);
|
|
1444
|
+
color: var(--c-contrast-fg);
|
|
1445
|
+
font-size: 10px;
|
|
1446
|
+
font-weight: 700;
|
|
1447
|
+
flex-shrink: 0;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1412
1450
|
.docked-node-header {
|
|
1413
1451
|
display: flex;
|
|
1414
1452
|
align-items: center;
|
|
@@ -1948,62 +1986,6 @@ html.is-node-resizing .ext-app-preview-catcher {
|
|
|
1948
1986
|
max-width: 200px;
|
|
1949
1987
|
}
|
|
1950
1988
|
|
|
1951
|
-
/* Context dock — collapsed pill mirrors Updates pill, sits above it */
|
|
1952
|
-
.context-dock-tab {
|
|
1953
|
-
position: fixed;
|
|
1954
|
-
top: 92px;
|
|
1955
|
-
right: 0;
|
|
1956
|
-
display: flex;
|
|
1957
|
-
align-items: center;
|
|
1958
|
-
gap: 8px;
|
|
1959
|
-
padding: 8px 12px 8px 14px;
|
|
1960
|
-
background: color-mix(in srgb, var(--c-panel-glass) 96%, transparent);
|
|
1961
|
-
backdrop-filter: blur(16px);
|
|
1962
|
-
border: 1px solid color-mix(in srgb, var(--c-line) 82%, var(--c-accent) 18%);
|
|
1963
|
-
border-right: 0;
|
|
1964
|
-
border-radius: 14px 0 0 14px;
|
|
1965
|
-
box-shadow: 0 12px 36px var(--c-shadow);
|
|
1966
|
-
color: var(--c-text);
|
|
1967
|
-
cursor: pointer;
|
|
1968
|
-
font: inherit;
|
|
1969
|
-
font-size: 11px;
|
|
1970
|
-
font-weight: 600;
|
|
1971
|
-
letter-spacing: 0.08em;
|
|
1972
|
-
text-transform: uppercase;
|
|
1973
|
-
z-index: 60;
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
.context-dock-tab:hover {
|
|
1977
|
-
border-color: color-mix(in srgb, var(--c-accent) 40%, var(--c-line) 60%);
|
|
1978
|
-
color: var(--c-accent);
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
.context-dock-tab svg {
|
|
1982
|
-
display: block;
|
|
1983
|
-
color: var(--c-accent);
|
|
1984
|
-
flex-shrink: 0;
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
.context-dock-tab-label {
|
|
1988
|
-
white-space: nowrap;
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
.context-dock-tab-badge {
|
|
1992
|
-
min-width: 18px;
|
|
1993
|
-
height: 18px;
|
|
1994
|
-
padding: 0 5px;
|
|
1995
|
-
display: inline-flex;
|
|
1996
|
-
align-items: center;
|
|
1997
|
-
justify-content: center;
|
|
1998
|
-
border-radius: 9px;
|
|
1999
|
-
background: var(--c-accent);
|
|
2000
|
-
color: var(--c-contrast-fg);
|
|
2001
|
-
font-size: 10px;
|
|
2002
|
-
font-weight: 700;
|
|
2003
|
-
letter-spacing: 0;
|
|
2004
|
-
text-transform: none;
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
1989
|
/* Context dock — expanded panel anchored top-right edge.
|
|
2008
1990
|
Mutually exclusive with the Updates panel (see DockedNode.tsx and
|
|
2009
1991
|
AttentionHistory.tsx) — opening one collapses the other, so they can both
|