ompchamber 3.0.0 → 3.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.
Files changed (114) hide show
  1. package/README.md +30 -8
  2. package/dist/client/index.html +1 -1
  3. package/dist/client/index.js +333 -333
  4. package/dist/client/static/js/index-5yfre1kw.css +1 -0
  5. package/dist/client/static/js/{index-prbmx3yj.js → index-qhzsybkn.js} +643 -617
  6. package/package.json +1 -1
  7. package/src/cli/lib/args.js +4 -3
  8. package/src/cli/lib/commands/restart.js +7 -6
  9. package/src/cli/lib/commands/stop.js +38 -31
  10. package/src/cli/lib/commands/update.js +3 -2
  11. package/src/cli/lib/stop-scope.js +23 -0
  12. package/src/cli/lib/stop-scope.test.js +41 -0
  13. package/src/client/components/common/code-editor/handler.test.ts +274 -0
  14. package/src/client/components/common/code-editor/handler.ts +175 -0
  15. package/src/client/components/common/code-editor/index.tsx +185 -220
  16. package/src/client/components/common/code-surface/index.tsx +109 -12
  17. package/src/client/components/common/lazy-panels.tsx +5 -1
  18. package/src/client/components/common/viewport.ts +5 -3
  19. package/src/client/components/layout/RightActivityBar.tsx +2 -1
  20. package/src/client/components/layout/desktop-layout/TopNavbar.tsx +21 -4
  21. package/src/client/components/layout/desktop-layout/index.tsx +24 -4
  22. package/src/client/components/mobile/RightSidebar.tsx +11 -4
  23. package/src/client/components/workspace/browser-panel/AddressBar.tsx +1 -10
  24. package/src/client/components/workspace/browser-panel/Screencast.tsx +4 -5
  25. package/src/client/components/workspace/browser-panel/index.tsx +6 -6
  26. package/src/client/components/workspace/browser-toolbar/index.tsx +22 -12
  27. package/src/client/components/workspace/chat-timeline/ToolCallCard.tsx +1 -1
  28. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Todo.tsx +1 -1
  29. package/src/client/components/workspace/editor/CommandPalette.test.ts +242 -0
  30. package/src/client/components/workspace/editor/CommandPalette.tsx +138 -0
  31. package/src/client/components/workspace/editor/FindWidget.test.ts +261 -0
  32. package/src/client/components/workspace/editor/FindWidget.tsx +219 -0
  33. package/src/client/components/workspace/editor/Toolbar.tsx +19 -1
  34. package/src/client/components/workspace/editor/index.tsx +153 -53
  35. package/src/client/components/workspace/file-explorer/Modals.tsx +79 -2
  36. package/src/client/components/workspace/file-explorer/TreeItem.tsx +43 -113
  37. package/src/client/components/workspace/todo-panel/PhaseGroup.tsx +76 -0
  38. package/src/client/components/workspace/todo-panel/Row.tsx +69 -0
  39. package/src/client/components/workspace/todo-panel/index.tsx +161 -0
  40. package/src/client/hooks/editor/find-harness.test-util.ts +170 -0
  41. package/src/client/hooks/editor/scroll-container.test.ts +102 -0
  42. package/src/client/hooks/editor/scroll-container.ts +26 -0
  43. package/src/client/hooks/editor/use-code-window.ts +2 -20
  44. package/src/client/hooks/editor/use-editor-find-write.test.ts +170 -0
  45. package/src/client/hooks/editor/use-editor-find.test.ts +118 -0
  46. package/src/client/hooks/editor/use-editor-find.ts +321 -0
  47. package/src/client/hooks/editor/use-editor-history.test.ts +216 -0
  48. package/src/client/hooks/editor/use-editor-history.ts +134 -0
  49. package/src/client/hooks/editor/use-occurrences.test.ts +236 -0
  50. package/src/client/hooks/editor/use-occurrences.ts +98 -0
  51. package/src/client/hooks/workspace/file-tree-actions.test.ts +348 -0
  52. package/src/client/hooks/workspace/file-tree-actions.ts +250 -0
  53. package/src/client/hooks/workspace/session-todos.ts +102 -0
  54. package/src/client/tailwind.css +30 -0
  55. package/src/server/lib/bundler/css.test.ts +87 -0
  56. package/src/server/lib/bundler/css.ts +17 -2
  57. package/src/server/lib/bundler/nested-at-rules.test.ts +100 -0
  58. package/src/server/lib/bundler/nested-at-rules.ts +146 -0
  59. package/src/server/lib/lifecycle/launch-mode.test.ts +20 -1
  60. package/src/server/lib/lifecycle/launch-mode.ts +26 -0
  61. package/src/server/lib/lifecycle/restart.ts +9 -14
  62. package/src/server/lib/omp/session/todos.ts +100 -0
  63. package/src/server/routes/fs/action-create.test.ts +90 -0
  64. package/src/server/routes/fs/action.ts +23 -0
  65. package/src/server/routes/omp/index.ts +2 -0
  66. package/src/server/routes/omp/session-todos.ts +80 -0
  67. package/src/shared/lib/chat/{todo-parser.ts → todo/parser.ts} +17 -0
  68. package/src/shared/lib/chat/todo/progress.ts +97 -0
  69. package/src/shared/lib/chat/todo/snapshot.test.ts +156 -0
  70. package/src/shared/lib/chat/todo/snapshot.ts +215 -0
  71. package/src/shared/lib/code/editor/commands.test.ts +155 -0
  72. package/src/shared/lib/code/editor/commands.ts +260 -0
  73. package/src/shared/lib/code/editor/edits.test.ts +100 -0
  74. package/src/shared/lib/code/editor/edits.ts +122 -0
  75. package/src/shared/lib/code/editor/find-status.test.ts +50 -0
  76. package/src/shared/lib/code/editor/find-status.ts +36 -0
  77. package/src/shared/lib/code/editor/find.test.ts +203 -0
  78. package/src/shared/lib/code/editor/find.ts +224 -0
  79. package/src/{client/components/common/code-editor → shared/lib/code/editor}/history.test.ts +1 -1
  80. package/src/shared/lib/code/editor/keymap.test.ts +109 -0
  81. package/src/shared/lib/code/editor/keymap.ts +151 -0
  82. package/src/shared/lib/code/editor/layers.test.ts +77 -0
  83. package/src/shared/lib/code/editor/layers.ts +67 -0
  84. package/src/shared/lib/code/editor/line-edits.test.ts +131 -0
  85. package/src/shared/lib/code/editor/line-edits.ts +159 -0
  86. package/src/shared/lib/code/editor/lines.test.ts +81 -0
  87. package/src/shared/lib/code/editor/lines.ts +83 -0
  88. package/src/shared/lib/code/editor/marks.test.ts +86 -0
  89. package/src/shared/lib/code/editor/marks.ts +106 -0
  90. package/src/shared/lib/code/editor/occurrences.test.ts +117 -0
  91. package/src/shared/lib/code/editor/occurrences.ts +111 -0
  92. package/src/shared/lib/code/editor/palette.test.ts +91 -0
  93. package/src/shared/lib/code/editor/palette.ts +92 -0
  94. package/src/shared/lib/code/editor/reset-css.test.ts +35 -0
  95. package/src/shared/lib/code/editor/reset-css.ts +32 -0
  96. package/src/shared/lib/code/editor/text-commands.test.ts +178 -0
  97. package/src/shared/lib/code/editor/text-commands.ts +154 -0
  98. package/src/shared/lib/code/syntax-highlight.test.ts +75 -0
  99. package/src/shared/lib/code/syntax-highlight.ts +29 -17
  100. package/src/shared/lib/code/windowed-highlight.ts +52 -1
  101. package/src/shared/lib/ui/key-binding.test.ts +115 -0
  102. package/src/shared/lib/ui/key-binding.ts +143 -0
  103. package/src/shared/lib/util/platform.test.ts +87 -0
  104. package/src/shared/lib/util/platform.ts +30 -0
  105. package/src/shared/lib/workspace/keymap.test.ts +82 -0
  106. package/src/shared/lib/workspace/keymap.ts +30 -0
  107. package/src/shared/lib/workspace/refresh-cadence.ts +9 -0
  108. package/src/shared/lib/workspace/right-panels.ts +8 -0
  109. package/src/shared/lib/workspace/session-state/store.ts +0 -1
  110. package/src/shared/types/index.ts +1 -0
  111. package/src/shared/types/todo.ts +108 -0
  112. package/dist/client/static/js/index-ranztes9.css +0 -1
  113. package/src/server/lib/lifecycle/restart.test.ts +0 -21
  114. /package/src/{client/components/common/code-editor → shared/lib/code/editor}/history.ts +0 -0
package/README.md CHANGED
@@ -149,7 +149,7 @@ instance serving that console.
149
149
  |---|---|
150
150
  | `serve` | Start the web server (daemon by default) |
151
151
  | `update` | Install the latest GitHub release, then restart the instance it started |
152
- | `stop` | Stop the running instance |
152
+ | `stop` | Stop the instances the CLI started — `--port`/`--all` to stop any |
153
153
  | `restart` | Stop, then start again — leaving servers started from source alone |
154
154
  | `status` | Report whether an instance is running |
155
155
  | `logs` | Print or follow the server log |
@@ -185,8 +185,11 @@ PORT=3001 bun run dev # or: PORT=3001 bun run start
185
185
  prints the `lsof -nP -iTCP:<port> -sTCP:LISTEN` command to identify it.
186
186
  - `bun run dev` hot reload is unaffected: `--hot` re-evaluates the entry inside the running
187
187
  process, and a port held by that process is recognized as its own.
188
- - `status`, `stop`, `restart` and `logs` act on **every** live instance by default; `--port <port>`
189
- narrows them to one. `restart` skips instances started from source, as `update` does.
188
+ - `status` and `logs` report **every** live instance by default; `--port <port>` narrows them to one.
189
+ `stop` acts on the instances the CLI started, and `restart`/`update` skip the rest: `bun run dev`
190
+ is a supervisor whose only job is to mirror the script under it, so stopping that server exits
191
+ the dev loop with it. Name the instance — `ompchamber stop --port <port>`, or `--all` — to end
192
+ one anyway.
190
193
 
191
194
  The server writes `~/.ompchamber/run/<port>.json` (`pid`, `host`, `mode`, `launchMode`, `startedAt`)
192
195
  once it owns the port, which is how `status`/`stop`/`logs` also see servers started by `bun run dev`
@@ -280,18 +283,37 @@ A push to `main` cuts the release — there is no manual version bump
280
283
 
281
284
  1. `semantic-release` reads the Conventional Commits since the last tag, decides the next
282
285
  version, writes it into `package.json` and a `## [x.y.z]` section of `CHANGELOG.md`, commits
283
- both, then creates the tag and the GitHub Release. Only `feat`, `fix`, `perf`, `refactor`, `docs`
284
- and `revert` can move a version (`bumpStrict` in [`release.config.mjs`](release.config.mjs));
285
- `chore`, `style`, `test`, `build` and `ci` are hidden and bump nothing on their own.
286
+ both, then creates the tag and the GitHub Release.
286
287
  2. The same run dispatches [`publish.yml`](.github/workflows/publish.yml), which checks out the tag,
287
288
  verifies it against `package.json`, typechecks, runs `bun test`, builds `dist/client`, packs a
288
- dry run, and runs `bun publish` behind the **`npm` environment** approval gate.
289
+ dry run, and runs `bun publish`.
290
+
291
+ What a commit does to the version is one table, in
292
+ [`release/release-rules.js`](release/release-rules.js), and `release/bump.test.js` asserts it:
293
+
294
+ | Commit | Version |
295
+ | --- | --- |
296
+ | `feat` | minor |
297
+ | `fix`, `perf`, `revert` | patch |
298
+ | `feat!` / `fix!` / `perf!` / `refactor!`, or a `BREAKING CHANGE:` footer | major |
299
+ | `docs`, `refactor`, `chore`, `style`, `test`, `build`, `ci` | no release |
300
+
301
+ Two of those rows exist because the toolchain's own defaults are wrong here: a `!` on a type that
302
+ cannot carry a breaking change (`chore!`, `docs!`, an unknown `foo!`) used to cut a major version
303
+ through the analyzer's built-in `{ breaking: true }` fallback, and the parser's note regex is
304
+ case-insensitive, so any body line starting with `breaking change` — colon optional — counted as a
305
+ breaking note. The second one is not hypothetical: a `docs` commit whose body wrapped onto
306
+ `breaking-change (!) footer` cut **v1.0.0** where the `feat`s in the range asked for v0.9.0, and the
307
+ changelog printed that prose as its breaking note. Both are fixed in `release/release-rules.js`, and
308
+ both are locked by `release/bump.test.js`.
309
+
310
+ A `BREAKING CHANGE:` footer is therefore read only in uppercase, and only where the type allows it.
289
311
 
290
312
  Two things to set up once and one to never do:
291
313
 
292
314
  - GitHub environment **`npm`** with a secret `NPM_TOKEN`: a granular npm token with read/write on
293
315
  `ompchamber`, 2FA bypass enabled and the `publish and stage` action (a stage-only token is
294
- rejected — Bun has no `npm stage publish`). Add required reviewers there to gate a publish.
316
+ rejected — Bun has no `npm stage publish`).
295
317
  - A failed publish is retried with `gh workflow run publish.yml -f tag=vX.Y.Z`, which leaves the
296
318
  release itself untouched.
297
319
  - **Never** write a skip marker (`[skip ci]`, `[ci skip]`, `[no ci]`) into a message pushed to
@@ -33,7 +33,7 @@
33
33
  href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"
34
34
  />
35
35
  <!--app-head-->
36
- <link rel="stylesheet" crossorigin href="./static/js/index-ranztes9.css"><script type="module" crossorigin src="./static/js/index-prbmx3yj.js"></script></head>
36
+ <link rel="stylesheet" crossorigin href="./static/js/index-5yfre1kw.css"><script type="module" crossorigin src="./static/js/index-qhzsybkn.js"></script></head>
37
37
  <body>
38
38
  <div id="app"></div>
39
39
  <!--app-bootstrap-->