@shivaedev/work-board 0.4.1 → 0.6.0

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.
Files changed (162) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +59 -18
  3. package/assets/native.js +36 -0
  4. package/dist/board.d.ts +1 -1
  5. package/dist/board.d.ts.map +1 -1
  6. package/dist/board.js +40 -8
  7. package/dist/board.js.map +1 -1
  8. package/dist/browser/client.d.ts +88 -0
  9. package/dist/browser/client.d.ts.map +1 -0
  10. package/dist/browser/client.js +53 -0
  11. package/dist/browser/client.js.map +1 -0
  12. package/dist/browser/session.d.ts +89 -0
  13. package/dist/browser/session.d.ts.map +1 -0
  14. package/dist/browser/session.js +20 -0
  15. package/dist/browser/session.js.map +1 -0
  16. package/dist/cli.js +1 -1
  17. package/dist/files/changes.d.ts +4 -1
  18. package/dist/files/changes.d.ts.map +1 -1
  19. package/dist/files/changes.js +7 -3
  20. package/dist/files/changes.js.map +1 -1
  21. package/dist/files/list.d.ts +1 -1
  22. package/dist/files/list.d.ts.map +1 -1
  23. package/dist/files/list.js +5 -3
  24. package/dist/files/list.js.map +1 -1
  25. package/dist/files/watchDirectories.d.ts.map +1 -1
  26. package/dist/files/watchDirectories.js +2 -1
  27. package/dist/files/watchDirectories.js.map +1 -1
  28. package/dist/history/schema.js +1 -1
  29. package/dist/history/schema.js.map +1 -1
  30. package/dist/history/script.d.ts.map +1 -1
  31. package/dist/history/script.js +15 -12
  32. package/dist/history/script.js.map +1 -1
  33. package/dist/http/assets.d.ts +2 -0
  34. package/dist/http/assets.d.ts.map +1 -1
  35. package/dist/http/assets.js +14 -0
  36. package/dist/http/assets.js.map +1 -1
  37. package/dist/http/attachment.d.ts +4 -0
  38. package/dist/http/attachment.d.ts.map +1 -0
  39. package/dist/http/attachment.js +43 -0
  40. package/dist/http/attachment.js.map +1 -0
  41. package/dist/http/history.d.ts.map +1 -1
  42. package/dist/http/history.js +1 -13
  43. package/dist/http/history.js.map +1 -1
  44. package/dist/http/sameOrigin.d.ts +3 -0
  45. package/dist/http/sameOrigin.d.ts.map +1 -0
  46. package/dist/http/sameOrigin.js +14 -0
  47. package/dist/http/sameOrigin.js.map +1 -0
  48. package/dist/metadata/sourceLinks.d.ts.map +1 -1
  49. package/dist/metadata/sourceLinks.js +3 -1
  50. package/dist/metadata/sourceLinks.js.map +1 -1
  51. package/dist/page/ageScript.d.ts +2 -0
  52. package/dist/page/ageScript.d.ts.map +1 -0
  53. package/dist/page/ageScript.js +23 -0
  54. package/dist/page/ageScript.js.map +1 -0
  55. package/dist/page/client.d.ts +1 -1
  56. package/dist/page/client.d.ts.map +1 -1
  57. package/dist/page/client.js +74 -74
  58. package/dist/page/diagrams.d.ts +1 -1
  59. package/dist/page/diagrams.d.ts.map +1 -1
  60. package/dist/page/diagrams.js +7 -0
  61. package/dist/page/diagrams.js.map +1 -1
  62. package/dist/page/navigationScript.d.ts.map +1 -1
  63. package/dist/page/navigationScript.js +7 -5
  64. package/dist/page/navigationScript.js.map +1 -1
  65. package/dist/page/searchScript.d.ts.map +1 -1
  66. package/dist/page/searchScript.js +6 -4
  67. package/dist/page/searchScript.js.map +1 -1
  68. package/dist/page/shell.d.ts.map +1 -1
  69. package/dist/page/shell.js +4 -3
  70. package/dist/page/shell.js.map +1 -1
  71. package/dist/page/stateScript.js +1 -1
  72. package/dist/page/style.d.ts.map +1 -1
  73. package/dist/page/style.js +4 -2
  74. package/dist/page/style.js.map +1 -1
  75. package/dist/page/swap.d.ts +1 -1
  76. package/dist/page/swap.d.ts.map +1 -1
  77. package/dist/page/swap.js +23 -7
  78. package/dist/page/swap.js.map +1 -1
  79. package/dist/page/visualDialog.d.ts +3 -0
  80. package/dist/page/visualDialog.d.ts.map +1 -0
  81. package/dist/page/visualDialog.js +25 -0
  82. package/dist/page/visualDialog.js.map +1 -0
  83. package/dist/page/visualScript.d.ts +2 -0
  84. package/dist/page/visualScript.d.ts.map +1 -0
  85. package/dist/page/visualScript.js +42 -0
  86. package/dist/page/visualScript.js.map +1 -0
  87. package/dist/page/visualViewport.d.ts +2 -0
  88. package/dist/page/visualViewport.d.ts.map +1 -0
  89. package/dist/page/visualViewport.js +87 -0
  90. package/dist/page/visualViewport.js.map +1 -0
  91. package/dist/path/attachment.d.ts +3 -0
  92. package/dist/path/attachment.d.ts.map +1 -0
  93. package/dist/path/attachment.js +22 -0
  94. package/dist/path/attachment.js.map +1 -0
  95. package/dist/path/isMarkdown.d.ts +2 -0
  96. package/dist/path/isMarkdown.d.ts.map +1 -0
  97. package/dist/path/isMarkdown.js +7 -0
  98. package/dist/path/isMarkdown.js.map +1 -0
  99. package/dist/render/documentLinks.d.ts +2 -1
  100. package/dist/render/documentLinks.d.ts.map +1 -1
  101. package/dist/render/documentLinks.js +15 -4
  102. package/dist/render/documentLinks.js.map +1 -1
  103. package/dist/rpc/affected.d.ts +4 -0
  104. package/dist/rpc/affected.d.ts.map +1 -0
  105. package/dist/rpc/affected.js +75 -0
  106. package/dist/rpc/affected.js.map +1 -0
  107. package/dist/rpc/contract.d.ts +134 -0
  108. package/dist/rpc/contract.d.ts.map +1 -0
  109. package/dist/rpc/contract.js +59 -0
  110. package/dist/rpc/contract.js.map +1 -0
  111. package/dist/rpc/hints.d.ts +17 -0
  112. package/dist/rpc/hints.d.ts.map +1 -0
  113. package/dist/rpc/hints.js +28 -0
  114. package/dist/rpc/hints.js.map +1 -0
  115. package/dist/rpc/keys.d.ts +7 -0
  116. package/dist/rpc/keys.d.ts.map +1 -0
  117. package/dist/rpc/keys.js +9 -0
  118. package/dist/rpc/keys.js.map +1 -0
  119. package/dist/rpc/pageKeys.d.ts +3 -0
  120. package/dist/rpc/pageKeys.d.ts.map +1 -0
  121. package/dist/rpc/pageKeys.js +14 -0
  122. package/dist/rpc/pageKeys.js.map +1 -0
  123. package/dist/rpc/server.d.ts +12 -0
  124. package/dist/rpc/server.d.ts.map +1 -0
  125. package/dist/rpc/server.js +32 -0
  126. package/dist/rpc/server.js.map +1 -0
  127. package/package.json +9 -4
  128. package/src/board.ts +46 -9
  129. package/src/browser/client.ts +59 -0
  130. package/src/browser/session.ts +26 -0
  131. package/src/cli.ts +1 -1
  132. package/src/files/changes.ts +14 -4
  133. package/src/files/list.ts +5 -4
  134. package/src/files/watchDirectories.ts +2 -1
  135. package/src/history/schema.ts +1 -1
  136. package/src/history/script.ts +15 -12
  137. package/src/http/assets.ts +15 -0
  138. package/src/http/attachment.ts +46 -0
  139. package/src/http/history.ts +1 -12
  140. package/src/http/sameOrigin.ts +14 -0
  141. package/src/metadata/sourceLinks.ts +3 -1
  142. package/src/page/ageScript.ts +22 -0
  143. package/src/page/client.ts +74 -74
  144. package/src/page/diagrams.ts +7 -0
  145. package/src/page/navigationScript.ts +7 -5
  146. package/src/page/searchScript.ts +6 -4
  147. package/src/page/shell.ts +4 -3
  148. package/src/page/stateScript.ts +1 -1
  149. package/src/page/style.ts +5 -2
  150. package/src/page/swap.ts +23 -7
  151. package/src/page/visualDialog.ts +25 -0
  152. package/src/page/visualScript.ts +41 -0
  153. package/src/page/visualViewport.ts +86 -0
  154. package/src/path/attachment.ts +23 -0
  155. package/src/path/isMarkdown.ts +6 -0
  156. package/src/render/documentLinks.ts +15 -4
  157. package/src/rpc/affected.ts +77 -0
  158. package/src/rpc/contract.ts +62 -0
  159. package/src/rpc/hints.ts +34 -0
  160. package/src/rpc/keys.ts +9 -0
  161. package/src/rpc/pageKeys.ts +14 -0
  162. package/src/rpc/server.ts +55 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Changed
6
+
7
+ - Record the approved Platform-first live client direction and its actual shared HTTP/browser fixture evidence; Work Board adopts that foundation in 0.5.0 below.
8
+
9
+ ## 0.6.0 - 2026-10-06
10
+
11
+ ### Added
12
+
13
+ - Serve source-relative PNG, JPEG, GIF and WebP images inside the workspace with
14
+ loopback guards, resolved-path containment, correct media headers, no caching
15
+ and a 16 MiB limit. Refuse traversal, escaping file/directory links and active
16
+ attachment formats. Watch image edits through native reconciliation.
17
+ - Add a keyboard image gallery and Mermaid inspection with bounded zoom, a
18
+ scrollable/fullscreen viewport, local downloads and focus restoration. Explain
19
+ missing images and failed diagrams; retain Mermaid source without JavaScript.
20
+ - Disclose an open preview after source updates and require reopening before
21
+ saving it. Downloads copy files locally and never write workspace sources.
22
+
23
+ ### Fixed
24
+
25
+ - Normalize visual controls and refreshed image URLs during reading-state swaps
26
+ so unchanged images and drawings keep their source context. Existing history
27
+ baselines remain Markdown-only; image bytes are not added to Mark seen snapshots.
28
+
29
+ ## 0.5.0 - 2026-10-06
30
+
31
+ ### Added
32
+
33
+ - Add Pause/Resume updates with a bounded pending-hint count and transient,
34
+ motion-free outlines on changed reading blocks. Resume, reconnect and watcher
35
+ uncertainty reconcile the workspace without reporting retained reads as fresh.
36
+
37
+ ### Changed
38
+
39
+ - Use native Effect RPC, AtomRegistry and effect-contract live/resume support
40
+ for browser reads and update ownership, bundled locally with esbuild. Preserve
41
+ server-rendered HTML and ordinary GET links; the compatibility `/events`,
42
+ search and history endpoints remain available.
43
+ - Invalidate affected source documents, stable identities and derived views
44
+ through both former and current backlinks, board membership, criterion evidence
45
+ and attention targets. Leave unrelated documents mounted; reconcile fully when
46
+ paths, delivery or the rebuilt index are uncertain. Sequence numbers detect
47
+ server-local PubSub loss; they are not a durable replay protocol.
48
+
49
+ ### Fixed
50
+
51
+ - Prepare the local native browser bundle before standalone and sharded workspace
52
+ tests, sharing the production build command so fresh CI checkouts can run the
53
+ browser regressions without a prior package build.
54
+ - Refresh missing favorites after navigation-only changes, recreate native client
55
+ ownership after a persisted pageshow, and retain explicit Mark seen cancellation,
56
+ clearing and expiry disclosure while automatic updates are paused. Keep one
57
+ local baseline per workspace, 30-day/2 MiB limits and source files read only.
58
+
3
59
  ## 0.4.1 - 2026-10-05
4
60
 
5
61
  ### Fixed
package/README.md CHANGED
@@ -12,8 +12,9 @@ work-board ./project-notes --port 4747 --home plan.md
12
12
  It listens on `127.0.0.1` only and answers only requests addressed to a loopback
13
13
  host. Every `.md` file under the folder appears in the collapsible sidebar with
14
14
  how long ago it changed. Below the folder, files and folders starting with a dot
15
- and `node_modules` are never entered, and anything that is not Markdown is
16
- skipped; the folder itself may be a dot folder such as `.notes`.
15
+ and `node_modules` are never entered. Only Markdown appears in the sidebar;
16
+ supported local images are served when explicitly referenced below. The folder
17
+ itself may be a dot folder such as `.notes`.
17
18
 
18
19
  Directory symlinks explicitly include reference folders, including ones outside
19
20
  the workspace. Their Markdown keeps the link's workspace-relative URLs. Broken
@@ -55,6 +56,35 @@ preference says otherwise. A keyboard skip link moves directly to the content.
55
56
  | `--port` | `4747` | The port on `127.0.0.1`. `0` picks a free one. |
56
57
  | `--home` | none | The file shown at `/` as a board, relative to the folder. The command stops with an error unless it leads to one of the markdown files listed from the folder. Without it, `/` shows the first file as a document. |
57
58
 
59
+ ## Local visual evidence
60
+
61
+ Use ordinary Markdown such as `![Review screenshot](shots/review.png)` or
62
+ `[Open screenshot](shots/review.png)`. PNG, JPEG (`.jpg`/`.jpeg`), GIF and WebP
63
+ paths resolve relative to the source file, including a nested home served at `/`.
64
+ The local image route serves at most 16 MiB per file, checks the resolved path on
65
+ every request, and refuses hidden/dependency paths, traversal and links outside
66
+ the workspace. Outside-workspace reference folders retain their Markdown support;
67
+ their images must be copied inside the workspace to be served. SVG, HTML, PDF and
68
+ arbitrary attachments are not served through this route.
69
+
70
+ Open a local image link (including an evidence source), or click/focus an embedded
71
+ image and press Enter, to inspect a gallery of the
72
+ current document's images. Previous/Next and arrow keys select images. Zoom from
73
+ 25% to 800%, scroll, Fit, Actual size or Fullscreen to inspect details; Escape closes the viewer
74
+ and restores source focus. **Save locally** uses the browser download mechanism.
75
+ An unavailable image keeps its alt text and explains the local path/type/boundary
76
+ and size checks. Images still render through ordinary GET requests without JavaScript.
77
+
78
+ A rendered Mermaid diagram has **Inspect diagram**, with the same zoom, scrolling,
79
+ fullscreen, Actual size and keyboard dismissal, plus a local SVG download of its current
80
+ drawing. Failed diagrams expose their source and a readable error; source remains
81
+ visible without JavaScript. When fullscreen is unavailable, scrolling still works.
82
+ An open preview remains the earlier drawing/image after a source update, discloses
83
+ that state and requires reopening before saving. Image edits trigger conservative
84
+ native reconciliation and image reloads, respecting Pause/Resume. The explicit
85
+ Mark seen baseline stays Markdown-only: image bytes are not captured or retained.
86
+ Viewing and downloading do not write source files or imply verified acceptance.
87
+
58
88
  ## Document navigation
59
89
 
60
90
  Markdown headings have passage links and an **On this page** outline, including separate
@@ -294,22 +324,33 @@ event: change
294
324
  data: {"paths":["plan.md"]}
295
325
  ```
296
326
 
297
- Open pages fetch their file again and replace only the blocks that changed,
298
- also when blocks were added or removed around them; the rest of the page,
299
- including which `<details>` are open and every drawn diagram, stays as it is,
300
- and the page never reloads. A page that loses the connection shows
301
- "reconnecting" and catches up once it is back. When the open file is deleted
302
- or renamed, the page shows that it is gone. A refresh that gets no page back
303
- keeps the page as it is and shows "refresh failed" until the next one
304
- succeeds.
305
-
306
- If watching the folder fails, the server restarts the watch, waiting longer
307
- after each failure. Meanwhile `/events` sends `event: down`, open pages show
308
- "reconnecting", and once watching resumes `event: ready` makes them catch up on
309
- anything they missed.
310
-
311
- Each open page keeps one connection to `/events`, and browsers allow only a few
312
- per host, so the intended use is one board per browser.
327
+ Open pages use locally bundled native Effect RPC and AtomRegistry queries over
328
+ `POST /_board/rpc`. The existing GET endpoints and `/events` stream remain
329
+ available for compatibility. No browser assets or source data need a cloud service.
330
+
331
+ Changed hints invalidate affected documents and derived views through former and
332
+ current references, board membership, criterion evidence and attention targets.
333
+ Unrelated documents keep their mounted query and DOM blocks. Relevant updates
334
+ preserve unchanged controls, expanded details and diagrams; changed reading blocks
335
+ receive a brief outline without animation. Native GET links and server-rendered
336
+ HTML remain usable with JavaScript disabled.
337
+
338
+ Use **Pause updates** to stop automatic invalidation while reading. The count
339
+ reports observed hints, bounded at **256+**, rather than a count of edits or work
340
+ completed. Resume and reconnect reconcile the full workspace. A missed server-local
341
+ PubSub sequence, unknown path or incomplete index also requires reconciliation;
342
+ there is no durable event journal or replay guarantee.
343
+
344
+ Connection, source-watcher availability, pending reads and read failures remain
345
+ separate. The status reports **live** only when the connection and last observed
346
+ watcher are available and active page/navigation reads have settled. A failed read
347
+ keeps the visible source and reports **refresh failed**. A transport outage or
348
+ unavailable watcher reports **reconnecting**. Mark seen remains an explicit action;
349
+ pausing never disables clearing or the 30-day baseline expiry.
350
+
351
+ Each page owns a native streaming HTTP subscription and disposes its registry on
352
+ pagehide. Returning from the browser's page cache creates a fresh client. Browser
353
+ HTTP connection limits still apply; simultaneous tab capacity is not established.
313
354
 
314
355
  ## Embedding
315
356