redweb 0.16.1 → 0.16.3

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 (67) hide show
  1. package/CHANGELOG.md +35 -22
  2. package/README.md +293 -289
  3. package/contract.d.ts +11 -11
  4. package/docs/API_EXAMPLES_VERIFICATION.md +22 -22
  5. package/docs/APPLICATION.md +96 -94
  6. package/docs/CLI.md +122 -116
  7. package/docs/CLIENT_DEVELOPMENT.md +9 -9
  8. package/docs/CONNECTED_CLIENTS_VERIFICATION.md +65 -65
  9. package/docs/DEVELOPMENT.md +81 -81
  10. package/docs/GETTING_STARTED.md +78 -58
  11. package/docs/LIVE_HTML.md +555 -478
  12. package/docs/MIGRATION.md +28 -28
  13. package/docs/RELEASE_TRUST.md +88 -88
  14. package/docs/RUNTIME_DIAGNOSTICS.md +78 -78
  15. package/docs/SOCKET_CONTRACTS.md +42 -42
  16. package/docs/SOCKET_PAGES.md +172 -172
  17. package/docs/SOCKET_PAGE_RELEASE_PREPARATION.md +120 -120
  18. package/docs/SOCKET_PAGE_VERIFICATION.md +85 -85
  19. package/docs/generated.json +2286 -2286
  20. package/docs/guides/chatroom.md +1 -1
  21. package/docs/guides/jsx-without-react.md +14 -14
  22. package/docs/reference.json +1329 -1329
  23. package/docs/releases/0.15.0.json +2217 -2217
  24. package/docs/releases/0.16.0.json +2217 -2217
  25. package/docs/releases/0.16.1.json +2286 -2286
  26. package/docs/releases/0.16.2.json +2286 -0
  27. package/docs/releases/0.16.3.json +2286 -0
  28. package/docs/snippets/components.tsx +24 -24
  29. package/docs/snippets/counter.tsx +16 -16
  30. package/docs/snippets/room-access.tsx +11 -11
  31. package/docs/snippets/site.css +2 -2
  32. package/docs/snippets/site.tsx +22 -22
  33. package/docs/topics.json +3 -3
  34. package/index.d.ts +92 -57
  35. package/index.js +13 -8
  36. package/package.json +8 -8
  37. package/recipes/foundation/README.md +7 -0
  38. package/recipes/foundation/app.test.cjs +15 -0
  39. package/recipes/foundation/app.tsx +12 -0
  40. package/recipes/shared/README.md +7 -7
  41. package/src/Application.js +4 -4
  42. package/src/access/failure-codes.json +4 -0
  43. package/src/cli/ProjectInitializer.js +1 -1
  44. package/src/cli/arguments.js +15 -3
  45. package/src/cli/run.js +10 -1
  46. package/src/cli/templates.js +34 -21
  47. package/src/docs/Documentation.js +25 -15
  48. package/src/htmx/Jsx.js +2 -2
  49. package/src/htmx/LiveHtmlServer.js +5 -1
  50. package/src/htmx/LivePage.js +5 -1
  51. package/src/htmx/LiveResource.js +96 -0
  52. package/src/htmx/PageManager.js +126 -13
  53. package/src/htmx/PageSocketRoute.js +132 -132
  54. package/src/htmx/PageTaskLane.js +39 -0
  55. package/src/htmx/ReactiveRenderer.js +8 -8
  56. package/src/htmx/SocketAction.js +19 -19
  57. package/src/htmx/TemplateRenderer.js +1 -1
  58. package/src/htmx/index.js +3 -2
  59. package/src/htmx/metadata.js +117 -6
  60. package/src/ws/BaseHandler.js +6 -6
  61. package/src/ws/ConnectedClients.js +207 -207
  62. package/src/ws/HandlerGuard.js +4 -4
  63. package/src/ws/RoomRegistry.js +4 -4
  64. package/src/ws/RouteRuntime.js +11 -11
  65. package/src/ws/SocketAction.js +16 -16
  66. package/src/ws/SocketContract.js +3 -3
  67. package/src/ws/SocketRoute.js +7 -7
@@ -1,85 +1,85 @@
1
- # Socket-bound TSX verification
2
-
3
- Development verification on 2026-09-02, Windows, Node 22.21.0, headed Chrome 152.
4
- This records feature acceptance, not an npm release or full-repository certification.
5
-
6
- ## Implementation and review
7
-
8
- Core/client branch: `codex/socket-page-actions`. Site branch:
9
- `codex/server-tsx-tutorial` in the sibling landing-page checkout.
10
-
11
- - Typed handler references and `.with(payload)` reuse contract validation, page
12
- ownership, reactive rendering and the existing redweb-client runtime.
13
- - The tutorial has no application browser module or bundling step. Its private
14
- page, game rules, commands, room fan-out and seat recovery live on the server.
15
- - Independent critic reviews covered core/client and the actual tutorial. Fixed
16
- findings included attachment ordering, post-validation disconnect authorization,
17
- duplicate-connection policy, intermediate reply correlation, obsolete render
18
- cancellation and rejected forms incorrectly reporting success. Final review
19
- reported no remaining blocking findings within that scope.
20
-
21
- ## Passing gates
22
-
23
- - 294 tests / 27 suites passed in the rendering regression selection below.
24
- Every module in `src/htmx/*.js`, plus `BaseHandler`, `SocketContract`,
25
- `SocketAction` and `HandlerGuard`, reached 100% statements, branches, functions
26
- and lines. The changed explicit-false dispatch in `SocketRoute` is exercised by
27
- real-network tests; this measurement does not claim all of `SocketRoute` or the
28
- whole repository is covered by this selection.
29
- - Client `npm test` passed linkage, build, declarations and the combined original
30
- source gate: 800 statements, 543 branches, 125 functions and 667 lines, all 100%.
31
- Report: `coverage/client-source/c819157b-6aaa-4020-99f4-152b8df473ed/summary.json`.
32
- It runs plain and instrumented Node tests and headed Chrome on real HTTP/WS.
33
- The existing instrumentation does not count every optional-chain/V8 branch.
34
- - Core pretest checked canonical example output, protocol declarations, all
35
- TypeScript configurations and 69 generated unreleased documentation pages.
36
- The standalone contract entry also bundled for browsers without Node builtins.
37
- - Site build and real HTTP verification passed: 438 pages, 11 examples, 30 API
38
- articles, downloads and internal links. The seven-module documentation coverage
39
- scope remains 100% lines, branches and functions.
40
- - The actual tutorial archive was extracted to a fresh temporary directory,
41
- installed with both explicitly packed development candidates (no links),
42
- compiled, typechecked and tested with real HTTP, WebSockets and SQLite. Its
43
- game-rule and message-schema modules remain all-four 100%; this is not a
44
- whole-tutorial/authentication coverage claim.
45
- - Headed Chrome passed both linked and extracted-package tutorial acceptance:
46
- hello world, two-tab server counter, wrong/right login, two-player game,
47
- third-player full-room rejection with retained input and reusable connection,
48
- reconnect without move replay, disconnect presence, win and logout. Actual
49
- outgoing game connections use `/match`; game commands are `join` and `move`.
50
- - Headed static-site navigation passed both minimal homepage examples, six
51
- highlighted chapters, next links and the project download.
52
-
53
- New integration tests use actual transports, not mocks. Pure failure-boundary
54
- units supplement them. No soak or long fixed-window workload was run.
55
-
56
- ### Reproduce the scoped core coverage gate
57
-
58
- ```sh
59
- node node_modules/jest/bin/jest.js tests/htmx tests/ws tests/unit/socket-action.unit.test.js tests/unit/page-access.unit.test.js tests/unit/socket-contract.unit.test.js tests/unit/utilities.unit.test.js tests/unit/action-input.unit.test.js tests/unit/inspection.unit.test.js tests/unit/development-refresh.unit.test.js tests/unit/development-refresh-boundaries.unit.test.js tests/unit/development-refresh-cleanup.unit.test.js tests/unit/define-app.unit.test.js tests/integration/define-app.integration.test.js tests/integration/socket-page.integration.test.js tests/integration/socket-contract.integration.test.js tests/integration/live-html.integration.test.js tests/integration/page-access.integration.test.js tests/integration/action-input.integration.test.js tests/integration/inspection.integration.test.js --runInBand --silent --coverage --collectCoverageFrom=src/htmx/*.js --collectCoverageFrom=src/ws/BaseHandler.js --collectCoverageFrom=src/ws/SocketContract.js --collectCoverageFrom=src/ws/SocketAction.js --collectCoverageFrom=src/ws/HandlerGuard.js --coverageDirectory=coverage/socket-page-regression
60
- ```
61
-
62
- The site README documents the two candidate-tarball environment variables for
63
- `npm test`. That gate includes headed browser acceptance inside the extracted
64
- archive; Chrome and the tutorial's Node version are required.
65
-
66
- ## Release boundaries and outstanding dependency audit
67
-
68
- The follow-up [release preparation](SOCKET_PAGE_RELEASE_PREPARATION.md) prepares
69
- client 0.3.0 and records the tested application-root qs mitigation. The initial
70
- observations below remain historical; they do not override that later status.
71
-
72
- The old published versions (Redweb 0.14.0/client 0.2.0) do not contain these APIs.
73
- Local tarballs retaining those development metadata versions were verification
74
- inputs, not artifacts to publish over existing releases. Release a new client,
75
- align and release Redweb, then update the site's tutorial pins/lockfile and
76
- catalogue before manual deployment. Existing immutable release snapshots were
77
- not rewritten. Nothing was published or deployed during this task.
78
-
79
- An additional `npm audit --omit=dev` check reports four moderate dependency-tree
80
- entries in the existing site/tutorial locks, rooted in two `qs` advisories:
81
- [bracket-key parsing](https://github.com/advisories/GHSA-x5fp-wj9c-mxmx) and
82
- [attacker-controlled isBuffer](https://github.com/advisories/GHSA-4mjr-xmp4-gh2g).
83
- The installed Express 4 dependency range does not select the published qs 6.16.0
84
- fix. This feature work does not waive that audit or silently force an Express 5
85
- migration. Resolve and verify the dependency policy before production release.
1
+ # Socket-bound TSX verification
2
+
3
+ Development verification on 2026-09-02, Windows, Node 22.21.0, headed Chrome 152.
4
+ This records feature acceptance, not an npm release or full-repository certification.
5
+
6
+ ## Implementation and review
7
+
8
+ Core/client branch: `codex/socket-page-actions`. Site branch:
9
+ `codex/server-tsx-tutorial` in the sibling landing-page checkout.
10
+
11
+ - Typed handler references and `.with(payload)` reuse contract validation, page
12
+ ownership, reactive rendering and the existing redweb-client runtime.
13
+ - The tutorial has no application browser module or bundling step. Its private
14
+ page, game rules, commands, room fan-out and seat recovery live on the server.
15
+ - Independent critic reviews covered core/client and the actual tutorial. Fixed
16
+ findings included attachment ordering, post-validation disconnect authorization,
17
+ duplicate-connection policy, intermediate reply correlation, obsolete render
18
+ cancellation and rejected forms incorrectly reporting success. Final review
19
+ reported no remaining blocking findings within that scope.
20
+
21
+ ## Passing gates
22
+
23
+ - 294 tests / 27 suites passed in the rendering regression selection below.
24
+ Every module in `src/htmx/*.js`, plus `BaseHandler`, `SocketContract`,
25
+ `SocketAction` and `HandlerGuard`, reached 100% statements, branches, functions
26
+ and lines. The changed explicit-false dispatch in `SocketRoute` is exercised by
27
+ real-network tests; this measurement does not claim all of `SocketRoute` or the
28
+ whole repository is covered by this selection.
29
+ - Client `npm test` passed linkage, build, declarations and the combined original
30
+ source gate: 800 statements, 543 branches, 125 functions and 667 lines, all 100%.
31
+ Report: `coverage/client-source/c819157b-6aaa-4020-99f4-152b8df473ed/summary.json`.
32
+ It runs plain and instrumented Node tests and headed Chrome on real HTTP/WS.
33
+ The existing instrumentation does not count every optional-chain/V8 branch.
34
+ - Core pretest checked canonical example output, protocol declarations, all
35
+ TypeScript configurations and 69 generated unreleased documentation pages.
36
+ The standalone contract entry also bundled for browsers without Node builtins.
37
+ - Site build and real HTTP verification passed: 438 pages, 11 examples, 30 API
38
+ articles, downloads and internal links. The seven-module documentation coverage
39
+ scope remains 100% lines, branches and functions.
40
+ - The actual tutorial archive was extracted to a fresh temporary directory,
41
+ installed with both explicitly packed development candidates (no links),
42
+ compiled, typechecked and tested with real HTTP, WebSockets and SQLite. Its
43
+ game-rule and message-schema modules remain all-four 100%; this is not a
44
+ whole-tutorial/authentication coverage claim.
45
+ - Headed Chrome passed both linked and extracted-package tutorial acceptance:
46
+ hello world, two-tab server counter, wrong/right login, two-player game,
47
+ third-player full-room rejection with retained input and reusable connection,
48
+ reconnect without move replay, disconnect presence, win and logout. Actual
49
+ outgoing game connections use `/match`; game commands are `join` and `move`.
50
+ - Headed static-site navigation passed both minimal homepage examples, six
51
+ highlighted chapters, next links and the project download.
52
+
53
+ New integration tests use actual transports, not mocks. Pure failure-boundary
54
+ units supplement them. No soak or long fixed-window workload was run.
55
+
56
+ ### Reproduce the scoped core coverage gate
57
+
58
+ ```sh
59
+ node node_modules/jest/bin/jest.js tests/htmx tests/ws tests/unit/socket-action.unit.test.js tests/unit/page-access.unit.test.js tests/unit/socket-contract.unit.test.js tests/unit/utilities.unit.test.js tests/unit/action-input.unit.test.js tests/unit/inspection.unit.test.js tests/unit/development-refresh.unit.test.js tests/unit/development-refresh-boundaries.unit.test.js tests/unit/development-refresh-cleanup.unit.test.js tests/unit/define-app.unit.test.js tests/integration/define-app.integration.test.js tests/integration/socket-page.integration.test.js tests/integration/socket-contract.integration.test.js tests/integration/live-html.integration.test.js tests/integration/page-access.integration.test.js tests/integration/action-input.integration.test.js tests/integration/inspection.integration.test.js --runInBand --silent --coverage --collectCoverageFrom=src/htmx/*.js --collectCoverageFrom=src/ws/BaseHandler.js --collectCoverageFrom=src/ws/SocketContract.js --collectCoverageFrom=src/ws/SocketAction.js --collectCoverageFrom=src/ws/HandlerGuard.js --coverageDirectory=coverage/socket-page-regression
60
+ ```
61
+
62
+ The site README documents the two candidate-tarball environment variables for
63
+ `npm test`. That gate includes headed browser acceptance inside the extracted
64
+ archive; Chrome and the tutorial's Node version are required.
65
+
66
+ ## Release boundaries and outstanding dependency audit
67
+
68
+ The follow-up [release preparation](SOCKET_PAGE_RELEASE_PREPARATION.md) prepares
69
+ client 0.3.0 and records the tested application-root qs mitigation. The initial
70
+ observations below remain historical; they do not override that later status.
71
+
72
+ The old published versions (Redweb 0.14.0/client 0.2.0) do not contain these APIs.
73
+ Local tarballs retaining those development metadata versions were verification
74
+ inputs, not artifacts to publish over existing releases. Release a new client,
75
+ align and release Redweb, then update the site's tutorial pins/lockfile and
76
+ catalogue before manual deployment. Existing immutable release snapshots were
77
+ not rewritten. Nothing was published or deployed during this task.
78
+
79
+ An additional `npm audit --omit=dev` check reports four moderate dependency-tree
80
+ entries in the existing site/tutorial locks, rooted in two `qs` advisories:
81
+ [bracket-key parsing](https://github.com/advisories/GHSA-x5fp-wj9c-mxmx) and
82
+ [attacker-controlled isBuffer](https://github.com/advisories/GHSA-4mjr-xmp4-gh2g).
83
+ The installed Express 4 dependency range does not select the published qs 6.16.0
84
+ fix. This feature work does not waive that audit or silently force an Express 5
85
+ migration. Resolve and verify the dependency policy before production release.