@north-light/cli 0.3.707 → 0.3.709
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/dist/api/client.d.ts +1 -2
- package/dist/api/client.js +3 -3
- package/dist/api/contract.d.ts +1 -1
- package/dist/api/contract.js +1 -1
- package/dist/api/dto/crons.d.ts +3 -0
- package/dist/api/dto/human.d.ts +9 -6
- package/dist/api/dto/inbox.d.ts +2 -0
- package/dist/api/dto/review-comments.d.ts +12 -35
- package/dist/api/dto/reviews.d.ts +3 -10
- package/dist/api/routes.d.ts +0 -1
- package/dist/api/routes.js +1 -1
- package/dist/builtin-memory/05-kinds/review/companion/00-base.md +2 -2
- package/dist/builtin-memory/crouter-sdk/release-notes.md +6 -0
- package/dist/clients/attach/chrome/canvas-panels.d.ts +1 -1
- package/dist/clients/attach/chrome/canvas-panels.js +1 -1
- package/dist/clients/attach/chrome/inbox-strip.js +1 -1
- package/dist/clients/attach/chrome/roster.js +6 -6
- package/dist/clients/attach/chrome/status-line.d.ts +1 -1
- package/dist/clients/attach/chrome/status-line.js +1 -1
- package/dist/clients/attach/chrome/ticket-panel.js +1 -1
- package/dist/clients/attach/input/capabilities.js +1 -1
- package/dist/clients/attach/input/controller.d.ts +4 -1
- package/dist/clients/attach/input/controller.js +3 -3
- package/dist/clients/attach/input/overlay-owner.d.ts +0 -1
- package/dist/clients/attach/input/overlay-owner.js +1 -1
- package/dist/clients/attach/overlays/graph.d.ts +3 -2
- package/dist/clients/attach/overlays/graph.js +1 -1
- package/dist/clients/attach/render/chat-view.d.ts +2 -0
- package/dist/clients/attach/render/chat-view.js +1 -1
- package/dist/clients/attach/render/doc-links.d.ts +1 -1
- package/dist/clients/attach/session/chrome-refresh.js +1 -1
- package/dist/clients/attach/session/connection.d.ts +10 -9
- package/dist/clients/attach/session/connection.js +1 -1
- package/dist/clients/attach/session/context.d.ts +1 -1
- package/dist/clients/attach/session/document-links.d.ts +1 -1
- package/dist/clients/attach/session/document-links.js +1 -1
- package/dist/clients/attach/session/identity.d.ts +2 -0
- package/dist/clients/attach/session/identity.js +1 -1
- package/dist/clients/attach/session/input-wiring.d.ts +2 -0
- package/dist/clients/attach/session/input-wiring.js +1 -1
- package/dist/clients/attach/session/keys.d.ts +2 -2
- package/dist/clients/attach/session/keys.js +1 -1
- package/dist/clients/attach/session/pane-tag.d.ts +3 -1
- package/dist/clients/attach/session/pane-tag.js +1 -1
- package/dist/clients/attach/session/reconnect.js +1 -1
- package/dist/clients/attach/session/surface-host.d.ts +0 -5
- package/dist/clients/attach/session/surface-host.js +1 -1
- package/dist/clients/attach/session/teardown.d.ts +2 -2
- package/dist/clients/attach/session/teardown.js +9 -7
- package/dist/clients/attach/viewer.d.ts +7 -5
- package/dist/clients/attach/viewer.js +571 -584
- package/dist/clients/editor-roundtrip.js +3 -0
- package/dist/clients/inbox/controller.d.ts +1 -6
- package/dist/clients/inbox/controller.js +1 -1
- package/dist/clients/inbox/dto-adapt.js +1 -1
- package/dist/clients/inbox/tui/page-body.js +1 -1
- package/dist/clients/inbox/tui/render.js +2 -2
- package/dist/clients/open-browser.d.ts +2 -0
- package/dist/clients/open-browser.js +1 -0
- package/dist/clients/surfaces/host.d.ts +0 -6
- package/dist/commands/human/review.js +1 -1
- package/dist/commands/node/wait.js +2 -6
- package/dist/commands/sys/context/admin/shell.js +1 -1
- package/dist/core/broker-client/client.d.ts +6 -3
- package/dist/core/broker-client/client.js +1 -1
- package/dist/core/canvas/crons.d.ts +11 -1
- package/dist/core/canvas/crons.js +14 -14
- package/dist/core/canvas/executions.js +1 -1
- package/dist/core/canvas/schema-pg/025-review-anchors.sql +19 -0
- package/dist/core/canvas/schema-pg/026-cron-deadline-body.sql +9 -0
- package/dist/core/canvas/schema-pg/027-cron-fires.sql +4 -0
- package/dist/core/canvas/schema-version.d.ts +1 -1
- package/dist/core/canvas/schema-version.js +1 -1
- package/dist/core/command.js +5 -5
- package/dist/core/feed/messages.d.ts +5 -0
- package/dist/core/feed/messages.js +5 -5
- package/dist/core/human/page-markdown.js +10 -12
- package/dist/core/human/tickets.js +1 -1
- package/dist/core/human/types.d.ts +4 -6
- package/dist/core/keybindings/attach-control.d.ts +0 -3
- package/dist/core/keybindings/attach-control.js +1 -1
- package/dist/core/keybindings/catalog.d.ts +1 -1
- package/dist/core/keybindings/catalog.js +1 -1
- package/dist/core/review/anchors.d.ts +28 -0
- package/dist/core/review/anchors.js +6 -0
- package/dist/core/review/comments.d.ts +2 -2
- package/dist/core/review/comments.js +7 -8
- package/dist/core/review/companion.d.ts +2 -1
- package/dist/core/review/companion.js +1 -1
- package/dist/core/review/document.d.ts +4 -17
- package/dist/core/review/document.js +1 -2
- package/dist/core/review/fork.js +2 -4
- package/dist/core/review/project.d.ts +1 -1
- package/dist/core/review/project.js +2 -2
- package/dist/core/review/realize.js +1 -1
- package/dist/core/review/stage.d.ts +2 -9
- package/dist/core/review/stage.js +1 -1
- package/dist/core/review/types.d.ts +16 -12
- package/dist/core/review/types.js +1 -1
- package/dist/core/runtime/bearings.js +4 -4
- package/dist/core/runtime/boot-root.js +4 -4
- package/dist/core/runtime/broker-cli.js +3 -3
- package/dist/core/runtime/broker-extension-render.js +1 -1
- package/dist/core/runtime/lifecycle.js +2 -2
- package/dist/core/runtime/revive.js +2 -2
- package/dist/core/runtime/runner/blaxel/client.d.ts +4 -0
- package/dist/core/runtime/runner/blaxel/client.js +1 -1
- package/dist/core/runtime/runner/blaxel/runner.d.ts +2 -3
- package/dist/core/runtime/runner/blaxel/runner.js +3 -3
- package/dist/core/runtime/runner/delete-sandboxes.d.ts +5 -0
- package/dist/core/runtime/runner/delete-sandboxes.js +6 -1
- package/dist/core/runtime/runner/types.d.ts +19 -3
- package/dist/core/runtime/tmux-bindings.js +3 -3
- package/dist/daemon/api/bridge.d.ts +5 -0
- package/dist/daemon/api/bridge.js +3 -3
- package/dist/daemon/api/canvas-host.js +1 -1
- package/dist/daemon/api/document-page.d.ts +12 -1
- package/dist/daemon/api/document-page.js +6 -6
- package/dist/daemon/api/handlers/crons.d.ts +2 -0
- package/dist/daemon/api/handlers/crons.js +1 -1
- package/dist/daemon/api/handlers/inbox.js +1 -1
- package/dist/daemon/api/handlers/nodes.js +1 -1
- package/dist/daemon/api/handlers/review-comments.js +1 -1
- package/dist/daemon/api/handlers/reviews.js +1 -1
- package/dist/daemon/api/map.js +2 -2
- package/dist/daemon/api/operations.js +1 -1
- package/dist/daemon/api/review-page.d.ts +3 -0
- package/dist/daemon/api/review-page.js +13 -0
- package/dist/daemon/broker-memory-cap.d.ts +9 -0
- package/dist/daemon/broker-memory-cap.js +2 -0
- package/dist/daemon/broker-signals/bus.d.ts +1 -1
- package/dist/daemon/broker-signals/bus.js +1 -1
- package/dist/daemon/cron/ended.d.ts +3 -0
- package/dist/daemon/cron/ended.js +2 -2
- package/dist/daemon/cron/lease-recovery.js +1 -1
- package/dist/daemon/cron/machine-fire.d.ts +9 -2
- package/dist/daemon/cron/machine-fire.js +1 -1
- package/dist/daemon/cron/passes.js +1 -1
- package/dist/daemon/cron-run.js +2 -2
- package/dist/daemon/crtrd.js +14 -14
- package/dist/daemon/machine-daemon.js +1 -1
- package/dist/daemon/machine-link/client.js +1 -1
- package/dist/daemon/reconcilers/fault-retry-backstop.js +1 -1
- package/dist/daemon/reconcilers/idle-sandbox.d.ts +1 -1
- package/dist/daemon/reconcilers/idle-sandbox.js +2 -2
- package/dist/daemon/reconcilers/node-lifecycle/remote-wake.js +2 -2
- package/dist/daemon/review/comment-notify.js +2 -2
- package/dist/daemon/review/deliver.d.ts +2 -2
- package/dist/daemon/review/deliver.js +6 -2
- package/dist/daemon/review/finish.js +1 -1
- package/dist/doc-editor/Geist-Variable.woff2 +0 -0
- package/dist/doc-editor/GeistMono-Variable.woff2 +0 -0
- package/dist/doc-editor/editor.css +1 -1
- package/dist/doc-editor/review.css +2 -0
- package/dist/doc-editor/review.js +149 -0
- package/dist/pi-extensions/canvas-review-boundary.js +3 -3
- package/docs/sdk/release-notes.md +6 -0
- package/package.json +13 -4
- package/packages/crouter-api/dist/api/client.js +0 -3
- package/packages/crouter-api/dist/api/contract.js +1 -1
- package/packages/crouter-api/dist/api/routes.js +0 -1
- package/packages/crouter-api/dist/clients/attach/chrome/canvas-panels.js +3 -3
- package/packages/crouter-api/dist/clients/attach/chrome/inbox-strip.js +5 -5
- package/packages/crouter-api/dist/clients/attach/chrome/roster.js +17 -28
- package/packages/crouter-api/dist/clients/attach/chrome/status-line.js +2 -7
- package/packages/crouter-api/dist/clients/attach/chrome/ticket-panel.js +1 -1
- package/packages/crouter-api/dist/clients/attach/input/capabilities.js +2 -1
- package/packages/crouter-api/dist/clients/attach/input/controller.js +17 -3
- package/packages/crouter-api/dist/clients/attach/input/overlay-owner.js +0 -7
- package/packages/crouter-api/dist/clients/attach/overlays/graph.js +4 -3
- package/packages/crouter-api/dist/clients/attach/render/chat-view.js +9 -0
- package/packages/crouter-api/dist/clients/attach/session/chrome-refresh.js +6 -3
- package/packages/crouter-api/dist/clients/attach/session/connection.js +53 -53
- package/packages/crouter-api/dist/clients/attach/session/document-links.js +1 -1
- package/packages/crouter-api/dist/clients/attach/session/identity.js +1 -0
- package/packages/crouter-api/dist/clients/attach/session/input-wiring.js +4 -3
- package/packages/crouter-api/dist/clients/attach/session/keys.js +11 -5
- package/packages/crouter-api/dist/clients/attach/session/pane-tag.js +7 -1
- package/packages/crouter-api/dist/clients/attach/session/reconnect.js +3 -3
- package/packages/crouter-api/dist/clients/attach/session/surface-host.js +0 -17
- package/packages/crouter-api/dist/clients/attach/session/teardown.js +7 -4
- package/packages/crouter-api/dist/clients/attach/viewer.js +77 -67
- package/packages/crouter-api/dist/clients/{inbox/review/roundtrip.js → editor-roundtrip.js} +1 -1
- package/packages/crouter-api/dist/clients/inbox/controller.js +12 -31
- package/packages/crouter-api/dist/clients/inbox/dto-adapt.js +1 -0
- package/packages/crouter-api/dist/clients/inbox/tui/page-body.js +0 -7
- package/packages/crouter-api/dist/clients/inbox/tui/render.js +0 -7
- package/packages/crouter-api/dist/clients/open-browser.js +6 -0
- package/packages/crouter-api/dist/commands/human/review.js +17 -18
- package/packages/crouter-api/dist/commands/node/wait.js +2 -10
- package/packages/crouter-api/dist/commands/sys/context/admin/shell.js +1 -1
- package/packages/crouter-api/dist/core/broker-client/client.js +20 -10
- package/packages/crouter-api/dist/core/canvas/crons.js +26 -10
- package/packages/crouter-api/dist/core/canvas/executions.js +7 -2
- package/packages/crouter-api/dist/core/canvas/schema-version.js +1 -1
- package/packages/crouter-api/dist/core/command.js +3 -0
- package/packages/crouter-api/dist/core/feed/messages.js +15 -0
- package/packages/crouter-api/dist/core/human/page-markdown.js +2 -6
- package/packages/crouter-api/dist/core/human/tickets.js +2 -11
- package/packages/crouter-api/dist/core/keybindings/attach-control.js +0 -1
- package/packages/crouter-api/dist/core/keybindings/catalog.js +1 -3
- package/packages/crouter-api/dist/core/review/anchors.js +91 -0
- package/packages/crouter-api/dist/core/review/comments.js +27 -46
- package/packages/crouter-api/dist/core/review/companion.js +5 -9
- package/packages/crouter-api/dist/core/review/document.js +17 -89
- package/packages/crouter-api/dist/core/review/project.js +2 -1
- package/packages/crouter-api/dist/core/review/types.js +2 -2
- package/packages/crouter-api/dist/core/runtime/bearings.js +2 -2
- package/packages/crouter-api/dist/core/runtime/lifecycle.js +3 -0
- package/packages/crouter-api/dist/core/runtime/revive.js +5 -25
- package/packages/crouter-api/dist/core/runtime/runner/blaxel/client.js +15 -8
- package/packages/crouter-api/dist/core/runtime/runner/blaxel/runner.js +60 -19
- package/packages/crouter-api/dist/core/runtime/runner/delete-sandboxes.js +18 -2
- package/packages/crouter-api/dist/core/runtime/tmux-bindings.js +0 -5
- package/packages/crouter-api/dist/daemon/api/map.js +2 -6
- package/packages/crouter-api/dist/daemon/api/operations.js +2 -2
- package/packages/crouter-api/dist/daemon/broker-signals/bus.js +1 -1
- package/packages/crouter-api/dist/daemon/cron/ended.js +22 -11
- package/packages/crouter-api/dist/daemon/cron/machine-fire.js +69 -6
- package/packages/crouter-api/dist/daemon/reconcilers/node-lifecycle/remote-wake.js +2 -2
- package/packages/crouter-api/dist/daemon/review/deliver.js +4 -3
- package/packages/crouter-api/dist/daemon/review/finish.js +26 -47
- package/packages/crouter-api/package.json +1 -1
- package/packages/crouter-identity/package.json +1 -1
- package/packages/crouter-plugin/package.json +3 -3
- package/runtime.lock.json +1740 -505
- package/dist/clients/attach/overlays/file-review.d.ts +0 -10
- package/dist/clients/attach/overlays/file-review.js +0 -2
- package/dist/clients/inbox/review/anchors.d.ts +0 -41
- package/dist/clients/inbox/review/anchors.js +0 -1
- package/dist/clients/inbox/review/comments-client.d.ts +0 -74
- package/dist/clients/inbox/review/comments-client.js +0 -1
- package/dist/clients/inbox/review/companion-pane.d.ts +0 -47
- package/dist/clients/inbox/review/companion-pane.js +0 -1
- package/dist/clients/inbox/review/document-surface.d.ts +0 -212
- package/dist/clients/inbox/review/document-surface.js +0 -2
- package/dist/clients/inbox/review/frame.d.ts +0 -57
- package/dist/clients/inbox/review/frame.js +0 -1
- package/dist/clients/inbox/review/keys.d.ts +0 -69
- package/dist/clients/inbox/review/keys.js +0 -1
- package/dist/clients/inbox/review/launch.d.ts +0 -16
- package/dist/clients/inbox/review/launch.js +0 -1
- package/dist/clients/inbox/review/live-source.d.ts +0 -24
- package/dist/clients/inbox/review/live-source.js +0 -1
- package/dist/clients/inbox/review/nvim.d.ts +0 -15
- package/dist/clients/inbox/review/nvim.js +0 -1
- package/dist/clients/inbox/review/remap.d.ts +0 -51
- package/dist/clients/inbox/review/remap.js +0 -1
- package/dist/clients/inbox/review/review-client.d.ts +0 -43
- package/dist/clients/inbox/review/review-client.js +0 -1
- package/dist/clients/inbox/review/roundtrip.js +0 -3
- package/dist/clients/inbox/review/state.d.ts +0 -153
- package/dist/clients/inbox/review/state.js +0 -4
- package/dist/clients/inbox/review-adapter.d.ts +0 -17
- package/dist/clients/inbox/review-adapter.js +0 -1
- package/dist/core/review/remap.d.ts +0 -24
- package/dist/core/review/remap.js +0 -19
- package/dist/core/review/signal.d.ts +0 -5
- package/dist/core/review/signal.js +0 -1
- package/dist/core/runtime/starting-screen.d.ts +0 -12
- package/dist/core/runtime/starting-screen.js +0 -9
- package/packages/crouter-api/dist/clients/attach/overlays/file-review.js +0 -146
- package/packages/crouter-api/dist/clients/inbox/review/anchors.js +0 -89
- package/packages/crouter-api/dist/clients/inbox/review/comments-client.js +0 -103
- package/packages/crouter-api/dist/clients/inbox/review/companion-pane.js +0 -109
- package/packages/crouter-api/dist/clients/inbox/review/document-surface.js +0 -1268
- package/packages/crouter-api/dist/clients/inbox/review/frame.js +0 -309
- package/packages/crouter-api/dist/clients/inbox/review/keys.js +0 -133
- package/packages/crouter-api/dist/clients/inbox/review/launch.js +0 -170
- package/packages/crouter-api/dist/clients/inbox/review/live-source.js +0 -160
- package/packages/crouter-api/dist/clients/inbox/review/nvim.js +0 -43
- package/packages/crouter-api/dist/clients/inbox/review/remap.js +0 -157
- package/packages/crouter-api/dist/clients/inbox/review/review-client.js +0 -125
- package/packages/crouter-api/dist/clients/inbox/review/state.js +0 -315
- package/packages/crouter-api/dist/clients/inbox/review-adapter.js +0 -43
- package/packages/crouter-api/dist/core/review/signal.js +0 -12
- package/packages/crouter-api/dist/core/termrender/code-doc.js +0 -92
- /package/dist/clients/{inbox/review/roundtrip.d.ts → editor-roundtrip.d.ts} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var h=Object.defineProperty;var d=(e,i)=>h(e,"name",{value:i,configurable:!0});import{envNodeId as
|
|
2
|
-
`):[`Reviewed
|
|
3
|
-
`);e.sendMessage({customType:
|
|
1
|
+
var h=Object.defineProperty;var d=(e,i)=>h(e,"name",{value:i,configurable:!0});import{envNodeId as m}from"../shared/env.js";import{bootExtensionState as f}from"../core/runtime/broker/boot-state.js";import{isReviewBoundary as u,REVIEW_BOUNDARY_CUSTOM_TYPE as w}from"../core/runtime/session-visibility.js";import{formatCard as _}from"../shared/generated-context.js";function b(e,i=f){e.on("session_start",async(p,v)=>{const r=m();if(!r||r.trim()==="")return;let n;try{n=(await i(r)).node}catch{return}if(n.review_binding==null||v.sessionManager.getBranch().some(g=>u(g,n.review_binding?.review_id)))return;const t=n.review_binding,{review_id:o,origin_node_id:s,target_file:a}=t,c=t.kind==="page_feedback"?[`This conversation began from feedback on page ${o}.`,`Page source: ${a}`,`Origin node: ${s}`,"","The person's visible transcript starts here. Everything above this marker is the origin node's work \u2014 inherited context they have not seen."].join(`
|
|
2
|
+
`):[`Reviewed document: ${a}`,`Review ID: ${o}`,`Origin node: ${s}`,"","The person's visible transcript starts here. Everything above this marker is inherited context they have not seen."].join(`
|
|
3
|
+
`);e.sendMessage({customType:w,content:_("review-boundary",{},c),display:!0,details:{reviewId:o,originNodeId:s,targetFile:a,kind:t.kind??"review"}})})}d(b,"registerCanvasReviewBoundary");var T=b;export{T as default,b as registerCanvasReviewBoundary};
|
|
@@ -7,6 +7,12 @@ description: Behavior changes in @north-light/sdk that an app must act on, newes
|
|
|
7
7
|
|
|
8
8
|
Changes to `@north-light/sdk` that can change what an existing app sees. Newest first.
|
|
9
9
|
|
|
10
|
+
## 0.3.708
|
|
11
|
+
|
|
12
|
+
### Review comments anchor to quoted text (breaking)
|
|
13
|
+
|
|
14
|
+
Review comments carry `anchor: { quote, prefix?, suffix?, offset? }` instead of line numbers, and the `comment-ranges` route is removed. Reviews opened under the old shape are canceled at cutover. Reviews are read and approved in the browser at `/review/<id>` on the canvas host.
|
|
15
|
+
|
|
10
16
|
## 0.3.694
|
|
11
17
|
|
|
12
18
|
### The owner's daemon routes are no longer wrapped (breaking for code that calls them)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@north-light/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.709",
|
|
4
4
|
"description": "crtr — agent runtime with memory, plugins, and marketplaces",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -144,7 +144,8 @@
|
|
|
144
144
|
"@earendil-works/pi-tui": "1.5.2",
|
|
145
145
|
"@earendil-works/chord": {
|
|
146
146
|
"ws": "$ws",
|
|
147
|
-
"esbuild": "$esbuild"
|
|
147
|
+
"esbuild": "$esbuild",
|
|
148
|
+
"react": "$react"
|
|
148
149
|
}
|
|
149
150
|
},
|
|
150
151
|
"repository": {
|
|
@@ -156,8 +157,8 @@
|
|
|
156
157
|
},
|
|
157
158
|
"license": "UNLICENSED",
|
|
158
159
|
"dependencies": {
|
|
159
|
-
"@north-light/identity": "0.3.
|
|
160
|
-
"@north-light/plugin": "0.3.
|
|
160
|
+
"@north-light/identity": "0.3.709",
|
|
161
|
+
"@north-light/plugin": "0.3.709",
|
|
161
162
|
"@earendil-works/chord": "1.5.2",
|
|
162
163
|
"@earendil-works/pi-agent-core": "1.5.2",
|
|
163
164
|
"@earendil-works/pi-ai": "1.5.2",
|
|
@@ -190,11 +191,19 @@
|
|
|
190
191
|
"zod": "^4.3.6"
|
|
191
192
|
},
|
|
192
193
|
"devDependencies": {
|
|
194
|
+
"@northlight-systems/cloud-ui": "^0.29.0",
|
|
195
|
+
"@tailwindcss/node": "4.3",
|
|
196
|
+
"@tailwindcss/oxide": "4.3",
|
|
193
197
|
"@types/node": "^24.0.0",
|
|
194
198
|
"@types/pg": "^8.23.1",
|
|
195
199
|
"@types/proper-lockfile": "^4.1.4",
|
|
200
|
+
"@types/react": "^19.3.0",
|
|
201
|
+
"@types/react-dom": "^19.3.0",
|
|
196
202
|
"@types/ws": "^8.18.1",
|
|
197
203
|
"mermaid": "11.17.2",
|
|
204
|
+
"react": "19.3",
|
|
205
|
+
"react-dom": "19.3",
|
|
206
|
+
"tailwindcss": "4.3",
|
|
198
207
|
"tsx": "^4.0.0"
|
|
199
208
|
}
|
|
200
209
|
}
|
|
@@ -801,9 +801,6 @@ export class CrtrClient {
|
|
|
801
801
|
readReviewCommentEvents(reviewId, query) {
|
|
802
802
|
return this.request('GET', withQuery(routes.humanReviewCommentEvents(this.reviewPath(reviewId)), query));
|
|
803
803
|
}
|
|
804
|
-
updateReviewCommentRanges(reviewId, req) {
|
|
805
|
-
return this.request('POST', routes.humanReviewCommentRanges(this.reviewPath(reviewId)), req);
|
|
806
|
-
}
|
|
807
804
|
getReviewComment(commentId) {
|
|
808
805
|
return this.request('GET', routes.humanComment(this.commentPath(commentId)));
|
|
809
806
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
//
|
|
13
13
|
// PURITY (spec §3.1): Node built-ins + `src/api/*` only.
|
|
14
14
|
/** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
|
|
15
|
-
export const CONTRACT_LEVEL = '1.
|
|
15
|
+
export const CONTRACT_LEVEL = '1.68';
|
|
16
16
|
/** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
|
|
17
17
|
export const REQUIRED_CONTRACT_HEADER = 'Crouter-Required-Contract';
|
|
18
18
|
/** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
|
|
@@ -154,7 +154,6 @@ export const routes = {
|
|
|
154
154
|
humanReviewDocument: (reviewId) => `${V}/human/reviews/${reviewId}/document`,
|
|
155
155
|
humanReviewComments: (reviewId) => `${V}/human/reviews/${reviewId}/comments`,
|
|
156
156
|
humanReviewCommentEvents: (reviewId) => `${V}/human/reviews/${reviewId}/comment-events`,
|
|
157
|
-
humanReviewCommentRanges: (reviewId) => `${V}/human/reviews/${reviewId}/comment-ranges`,
|
|
158
157
|
humanComment: (commentId) => `${V}/human/comments/${commentId}`,
|
|
159
158
|
humanCommentEdit: (commentId) => `${V}/human/comments/${commentId}/edit`,
|
|
160
159
|
humanCommentResolve: (commentId) => `${V}/human/comments/${commentId}/resolve`,
|
|
@@ -18,7 +18,7 @@ const BASH_ROW_CHROME = 34;
|
|
|
18
18
|
* ` ◇ ` + kind + ` · ` + elapsed + ` · ` + ` · ↵ details`. */
|
|
19
19
|
const OBJECT_WAIT_ROW_CHROME = 30;
|
|
20
20
|
/** Columns the review row spends on everything except the file name:
|
|
21
|
-
* ` ✎ ` + the longest state prefix + ` · ` + ` · ↵
|
|
21
|
+
* ` ✎ ` + the longest state prefix + ` · ` + ` · ↵ open`. */
|
|
22
22
|
const REVIEW_ROW_CHROME = 40;
|
|
23
23
|
import { RemoteCanvasSource } from '../../../core/canvas/remote-canvas-source.js';
|
|
24
24
|
import { cronWaitSummary } from './cron-wait.js';
|
|
@@ -228,8 +228,8 @@ export async function buildCanvasPanelLines(nodeId, asks, palette, source, crons
|
|
|
228
228
|
items.push({
|
|
229
229
|
key: `review:${review.review_id}`,
|
|
230
230
|
kind: 'review',
|
|
231
|
-
|
|
232
|
-
line: ` ${pen} ${muted(`${summary} · ↵
|
|
231
|
+
reviewId: review.review_id,
|
|
232
|
+
line: ` ${pen} ${muted(`${summary} · ↵ open`)}${RESET}`,
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
235
|
// Bash wait row: attention (human) -> active-now (running background work) ->
|
|
@@ -36,7 +36,7 @@ function ageLabel(iso) {
|
|
|
36
36
|
return `${Math.floor(hours / 24)}d`;
|
|
37
37
|
}
|
|
38
38
|
export function createInboxStrip(s, hooks) {
|
|
39
|
-
const {
|
|
39
|
+
const { remote, canvasSource, tui, pal } = s;
|
|
40
40
|
const component = new Container();
|
|
41
41
|
let tickets = [];
|
|
42
42
|
let nodes = new Map();
|
|
@@ -44,7 +44,7 @@ export function createInboxStrip(s, hooks) {
|
|
|
44
44
|
let top = 0; // first visible ticket row
|
|
45
45
|
const rowLine = (t) => {
|
|
46
46
|
const origin = t.source.nodeId;
|
|
47
|
-
const from = origin !== undefined && origin !== nodeId
|
|
47
|
+
const from = origin !== undefined && origin !== s.nodeId
|
|
48
48
|
? ` · ${navLabel(nodes.get(origin) ?? null, origin)}`
|
|
49
49
|
: '';
|
|
50
50
|
return truncate(` ${YELLOW}⚑${RESET} ${t.title}${pal.faint(` · ${ageLabel(ticketTime(t))}${from}`)}`);
|
|
@@ -74,7 +74,7 @@ export function createInboxStrip(s, hooks) {
|
|
|
74
74
|
* same pass already fetched carries every field read here, so the full node
|
|
75
75
|
* list is read only by a source without one. */
|
|
76
76
|
const subtreeNodes = async (view) => {
|
|
77
|
-
const roster = view ?? await canvasSource.panelView?.(nodeId);
|
|
77
|
+
const roster = view ?? await canvasSource.panelView?.(s.nodeId);
|
|
78
78
|
const list = roster === undefined
|
|
79
79
|
? await canvasSource.listNodes()
|
|
80
80
|
: roster.nodes.map((n) => ({ node_id: n.node_id, name: n.name, kind: n.kind, status: n.status, ...(n.description ? { description: n.description } : {}) }));
|
|
@@ -84,7 +84,7 @@ export function createInboxStrip(s, hooks) {
|
|
|
84
84
|
if (out.has(id))
|
|
85
85
|
return;
|
|
86
86
|
const row = rows.get(id) ?? null;
|
|
87
|
-
if (id !== nodeId && row?.kind === 'human')
|
|
87
|
+
if (id !== s.nodeId && row?.kind === 'human')
|
|
88
88
|
return;
|
|
89
89
|
out.set(id, row);
|
|
90
90
|
const below = roster === undefined
|
|
@@ -93,7 +93,7 @@ export function createInboxStrip(s, hooks) {
|
|
|
93
93
|
for (const childId of below)
|
|
94
94
|
await visit(childId);
|
|
95
95
|
};
|
|
96
|
-
await visit(nodeId);
|
|
96
|
+
await visit(s.nodeId);
|
|
97
97
|
return out;
|
|
98
98
|
};
|
|
99
99
|
const refresh = async (view) => {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// Enter opens the row (SWAPS this pane in place onto a node, or opens the wait
|
|
7
7
|
// detail surface for a cron/bash/review/object row: a cron row the Inspector's
|
|
8
8
|
// schedule section, a bash row the Inspector's jobs section, a review row the
|
|
9
|
-
// review's
|
|
9
|
+
// review's browser page, an object-wait row the watched object's
|
|
10
10
|
// `crtr canvas read` in a popup),
|
|
11
11
|
// Esc / any typed key returns to the editor. Disabled entirely for a REMOTE
|
|
12
12
|
// attach: a remote graph id has no local pane to swap into and no local
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
import { execFile } from 'node:child_process';
|
|
27
27
|
import { Text, decodeKittyPrintable, matchesKey } from '@earendil-works/pi-tui';
|
|
28
28
|
import { cliClient } from '../../../commands/api-client.js';
|
|
29
|
-
import { focusNode } from '../../../core/runtime/focus-viewer.js';
|
|
30
29
|
import { daemonErrorMessage } from '../../inbox/resolve.js';
|
|
30
|
+
import { openBrowser } from '../../open-browser.js';
|
|
31
31
|
import { toBashJobStatus } from './bash-jobs.js';
|
|
32
32
|
import { fillBar, fillWidth, stripSgr, REVERSE } from '../../../core/canvas/nav-render.js';
|
|
33
33
|
import { buildCanvasPanelLines } from './canvas-panels.js';
|
|
34
34
|
/** How long an armed `x` waits for its `y`. */
|
|
35
35
|
const ARM_TIMEOUT_MS = 15_000;
|
|
36
36
|
export function createRoster(s, hooks) {
|
|
37
|
-
const { editor, tui, pal,
|
|
37
|
+
const { editor, tui, pal, remote, role, canvasSource } = s;
|
|
38
38
|
// The node's app comes from the node row the viewer already holds; resolving it from canvas.db would open the db in this process.
|
|
39
39
|
const reports = s.containers.reports;
|
|
40
40
|
let items = [];
|
|
@@ -62,19 +62,19 @@ export function createRoster(s, hooks) {
|
|
|
62
62
|
}
|
|
63
63
|
tui.requestRender();
|
|
64
64
|
};
|
|
65
|
-
const listJobs = async () => (await cliClient().listBashJobs(nodeId)).map(toBashJobStatus);
|
|
65
|
+
const listJobs = async () => (await cliClient().listBashJobs(s.nodeId)).map(toBashJobStatus);
|
|
66
66
|
const refresh = async (view) => {
|
|
67
67
|
const crons = remote ? [] : await cliClient().listCrons();
|
|
68
|
-
const ownedCrons = crons.filter((cron) => cron.created_by === nodeId);
|
|
69
|
-
// Local-only, same gate as ownedCrons: a local nodeId collision must never leak background jobs.
|
|
68
|
+
const ownedCrons = crons.filter((cron) => cron.created_by === s.nodeId);
|
|
69
|
+
// Local-only, same gate as ownedCrons: a local s.nodeId collision must never leak background jobs.
|
|
70
70
|
const bashJobs = remote ? [] : await listJobs();
|
|
71
71
|
// Reviews this node is the origin of: the person still holds an open one, or
|
|
72
72
|
// the daemon is finishing a submitted one behind its companion. Local-only,
|
|
73
73
|
// like the crons above — a remote graph id has no local review surface.
|
|
74
74
|
const openReviews = remote ? [] : (await cliClient().listReviews({ state: 'open' })).reviews;
|
|
75
|
-
const reviews = openReviews.filter((review) => review.origin_node_id === nodeId);
|
|
75
|
+
const reviews = openReviews.filter((review) => review.origin_node_id === s.nodeId);
|
|
76
76
|
const others = remote ? undefined : { crons, reviews: openReviews, jobsOf: async (id) => (await cliClient().listBashJobs(id)).map(toBashJobStatus) };
|
|
77
|
-
const built = await buildCanvasPanelLines(nodeId, hooks.asks(), pal, canvasSource, ownedCrons, bashJobs, reviews, others, view ?? await canvasSource.panelView?.(nodeId));
|
|
77
|
+
const built = await buildCanvasPanelLines(s.nodeId, hooks.asks(), pal, canvasSource, ownedCrons, bashJobs, reviews, others, view ?? await canvasSource.panelView?.(s.nodeId));
|
|
78
78
|
items = built.items;
|
|
79
79
|
// After an in-place swap, land on the previously open node, which has taken
|
|
80
80
|
// the swapped-to node's place in this self-excluding roster.
|
|
@@ -152,7 +152,7 @@ export function createRoster(s, hooks) {
|
|
|
152
152
|
return;
|
|
153
153
|
disarmKill(false);
|
|
154
154
|
hooks.setNotice(`Stopping “${target.label}”…`);
|
|
155
|
-
execFile('crtr', ['node', 'bash', 'kill', target.jobId, '--node', nodeId], (err) => {
|
|
155
|
+
execFile('crtr', ['node', 'bash', 'kill', target.jobId, '--node', s.nodeId], (err) => {
|
|
156
156
|
hooks.setNotice(err === null ? `Stopped “${target.label}”.` : `Could not stop the job: ${err.message.split('\n')[0]}`);
|
|
157
157
|
hooks.requestChromeRefresh();
|
|
158
158
|
});
|
|
@@ -173,26 +173,15 @@ export function createRoster(s, hooks) {
|
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
if (item.kind === 'review') {
|
|
176
|
-
if (role !== 'controller') {
|
|
177
|
-
hooks.setNotice('Read-only observer attach — cannot open the review companion');
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
176
|
exit();
|
|
181
|
-
// Beside this pane, never in place: the person is asking to watch the
|
|
182
|
-
// companion, not to give up the view they are asking from.
|
|
183
|
-
// Runs the shared focus decision in-process (no cold `crtr` boot).
|
|
184
|
-
const companionPane = process.env['TMUX_PANE'];
|
|
185
|
-
if (companionPane === undefined || companionPane === '') {
|
|
186
|
-
hooks.setNotice('Could not open the companion: no tmux pane');
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
177
|
void (async () => {
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
178
|
+
const ticket = (await cliClient().listHumanInbox()).tickets.find((t) => t.kind === 'review' && t.request_id === item.reviewId);
|
|
179
|
+
if (ticket?.kind !== 'review' || ticket.url === undefined) {
|
|
180
|
+
hooks.setNotice('Reviews open on canvas.northlight.ai; this runtime has no canvas host');
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
openBrowser(ticket.url);
|
|
184
|
+
})().catch((err) => hooks.setNotice(`Could not open the review: ${daemonErrorMessage(err).split('\n')[0]}`));
|
|
196
185
|
return;
|
|
197
186
|
}
|
|
198
187
|
if (item.kind === 'bash') {
|
|
@@ -213,7 +202,7 @@ export function createRoster(s, hooks) {
|
|
|
213
202
|
return;
|
|
214
203
|
}
|
|
215
204
|
const id = item.nodeId;
|
|
216
|
-
if (id === nodeId) {
|
|
205
|
+
if (id === s.nodeId) {
|
|
217
206
|
exit();
|
|
218
207
|
return;
|
|
219
208
|
} // already viewing this one
|
|
@@ -19,13 +19,12 @@
|
|
|
19
19
|
// That timer is why this module has a `dispose`.
|
|
20
20
|
import { Text, truncateToWidth } from '@earendil-works/pi-tui';
|
|
21
21
|
import { visibleWidth } from '../../../core/canvas/nav-render.js';
|
|
22
|
-
import {
|
|
23
|
-
import { formatBinding, inboxOpenHint } from '../../../core/keybindings/index.js';
|
|
22
|
+
import { inboxOpenHint } from '../../../core/keybindings/index.js';
|
|
24
23
|
import { viewerKeyHint } from './key-hint.js';
|
|
25
24
|
const NOTICE_CLEAR_MS = 3_000;
|
|
26
25
|
const formatTokens = (n) => n >= 1000 ? `${(n / 1000).toFixed(n >= 10000 ? 0 : 1)}k` : `${n}`;
|
|
27
26
|
export function createStatusLine(s, hooks) {
|
|
28
|
-
const { pal, tui,
|
|
27
|
+
const { pal, tui, remote } = s;
|
|
29
28
|
const footer = s.containers.footer;
|
|
30
29
|
let notice = '';
|
|
31
30
|
let noticeTimer;
|
|
@@ -79,10 +78,6 @@ export function createStatusLine(s, hooks) {
|
|
|
79
78
|
if (!hooks.mouseEnabled()) {
|
|
80
79
|
segs.push(pal.muted('mouse off'));
|
|
81
80
|
}
|
|
82
|
-
// The file-review affordance, tmux-only like the surface it opens.
|
|
83
|
-
if (inTmux() && bindings.gestures('crtr.attach.file-review').length > 0) {
|
|
84
|
-
segs.push(pal.muted(`${formatBinding(bindings, 'crtr.attach.file-review')} review file`));
|
|
85
|
-
}
|
|
86
81
|
// Persistent, dim, lowest priority (appended last, so a narrow pane drops it
|
|
87
82
|
// first): how to reach the action menu and inbox. The menu is a tmux menu, so
|
|
88
83
|
// the hint only appears for a local in-tmux attach. When the pending-inbox
|
|
@@ -29,7 +29,7 @@ import { pageViewFromDTO, settledStatusOf } from '../../inbox/dto-adapt.js';
|
|
|
29
29
|
import { PageAdapter } from '../../inbox/page-adapter.js';
|
|
30
30
|
import { decodeInboxKey } from '../../inbox/tui/keys.js';
|
|
31
31
|
import { daemonErrorMessage, resolveFailureKind, resolveTicketPage } from '../../inbox/resolve.js';
|
|
32
|
-
import { editBufferInEditor } from '../../
|
|
32
|
+
import { editBufferInEditor } from '../../editor-roundtrip.js';
|
|
33
33
|
export function createTicketPanel(s, hooks) {
|
|
34
34
|
const { tui, pal } = s;
|
|
35
35
|
let session;
|
|
@@ -25,7 +25,8 @@ export function createViewerCapabilities(input) {
|
|
|
25
25
|
return {
|
|
26
26
|
role,
|
|
27
27
|
remote,
|
|
28
|
-
|
|
28
|
+
// Lazy: a viewer whose node is still being created has no id yet, and reading one then is a bug the source must throw on.
|
|
29
|
+
get nodeId() { return input.nodeId; },
|
|
29
30
|
profileId: input.profileId,
|
|
30
31
|
permittedOperations,
|
|
31
32
|
permits: (operation) => permittedOperations.has(operation),
|
|
@@ -66,9 +66,6 @@ export class InputController {
|
|
|
66
66
|
setState(state) {
|
|
67
67
|
this.state = state;
|
|
68
68
|
}
|
|
69
|
-
openFileReviewPicker(candidates, cwd, onChoose) {
|
|
70
|
-
this.overlays.openFileReviewPicker(candidates, cwd, onChoose);
|
|
71
|
-
}
|
|
72
69
|
/** Retained as a narrow delegate for auth affordances wired by the session. */
|
|
73
70
|
openAuthPicker(prepare) {
|
|
74
71
|
return this.overlays.openAuthPicker(prepare);
|
|
@@ -76,7 +73,18 @@ export class InputController {
|
|
|
76
73
|
send = (frame) => {
|
|
77
74
|
this.emitCommand(frame);
|
|
78
75
|
};
|
|
76
|
+
/** While the node is being created only these frames are accepted (prompts are held until the welcome; a `!` command is refused like a slash command); everything else needs the node. */
|
|
77
|
+
refuseStarting(frame) {
|
|
78
|
+
if (this.hooks.isStarting?.() !== true)
|
|
79
|
+
return false;
|
|
80
|
+
if (frame !== undefined && (frame.type === 'prompt' || frame.type === 'follow_up'))
|
|
81
|
+
return false;
|
|
82
|
+
this.notify('The node is starting — try again in a moment');
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
79
85
|
emitCommand(frame) {
|
|
86
|
+
if (this.refuseStarting(frame))
|
|
87
|
+
return false;
|
|
80
88
|
const operation = viewerOperationForFrame(frame);
|
|
81
89
|
const refusal = operation === undefined ? undefined : this.capabilities.refusal(operation);
|
|
82
90
|
if (refusal === undefined) {
|
|
@@ -87,6 +95,8 @@ export class InputController {
|
|
|
87
95
|
return false;
|
|
88
96
|
}
|
|
89
97
|
openBrokerPicker(open) {
|
|
98
|
+
if (this.refuseStarting())
|
|
99
|
+
return;
|
|
90
100
|
const refusal = this.capabilities.refusal('engine-drive');
|
|
91
101
|
if (refusal !== undefined) {
|
|
92
102
|
this.notify(refusal);
|
|
@@ -198,6 +208,8 @@ export class InputController {
|
|
|
198
208
|
const trimmed = text.trim();
|
|
199
209
|
if (!trimmed)
|
|
200
210
|
return;
|
|
211
|
+
if (isSlashCommand(trimmed) && this.refuseStarting())
|
|
212
|
+
return;
|
|
201
213
|
if (isSlashCommand(trimmed) && dispatchSlashCommand(trimmed, this.slashContext())) {
|
|
202
214
|
this.recordCommandUse(trimmed);
|
|
203
215
|
this.editor.setText('');
|
|
@@ -267,6 +279,8 @@ export class InputController {
|
|
|
267
279
|
this.clearPastedImages();
|
|
268
280
|
}
|
|
269
281
|
async handleDequeue() {
|
|
282
|
+
if (this.refuseStarting())
|
|
283
|
+
return;
|
|
270
284
|
const refusal = this.capabilities.refusal('dequeue');
|
|
271
285
|
if (refusal !== undefined) {
|
|
272
286
|
this.notify(refusal);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { isBlockingDialog, renderDialog } from '../overlays/dialogs.js';
|
|
2
2
|
import { buildForkPicker, buildModelPicker, buildScopedModelsPicker, buildSessionPicker, buildSettingsPicker, buildTreePicker, } from '../overlays/pickers.js';
|
|
3
3
|
import { buildMcpPicker, readMcpServers, startMcpServerAction, MCP_EMPTY_STATE_HINT } from '../overlays/mcp.js';
|
|
4
|
-
import { buildFileReviewPicker } from '../overlays/file-review.js';
|
|
5
4
|
const PICKER_OVERLAY_OPTIONS = { anchor: 'center', width: '80%', maxHeight: '85%' };
|
|
6
5
|
/** Owns transient dialog and picker lifetime. Editor submission remains with
|
|
7
6
|
* InputController; this collaborator owns mount, replacement, dismissal, and
|
|
@@ -89,12 +88,6 @@ export class InputOverlayOwner {
|
|
|
89
88
|
}
|
|
90
89
|
this.showPicker((controls) => buildMcpPicker(rows, this.hooks.send, controls.close, this.hooks.notify));
|
|
91
90
|
}
|
|
92
|
-
openFileReviewPicker(candidates, cwd, onChoose) {
|
|
93
|
-
this.showPicker((controls) => buildFileReviewPicker(candidates, cwd, (file) => {
|
|
94
|
-
controls.close();
|
|
95
|
-
onChoose(file);
|
|
96
|
-
}, controls.close, this.hooks.notify));
|
|
97
|
-
}
|
|
98
91
|
async openAuthPicker(prepare) {
|
|
99
92
|
const seq = ++this.openSeq;
|
|
100
93
|
let build;
|
|
@@ -102,7 +102,7 @@ function graphRow(dto) {
|
|
|
102
102
|
}
|
|
103
103
|
export class GraphOverlay {
|
|
104
104
|
tui;
|
|
105
|
-
|
|
105
|
+
selfId;
|
|
106
106
|
getAsks;
|
|
107
107
|
palette;
|
|
108
108
|
bindings;
|
|
@@ -129,9 +129,9 @@ export class GraphOverlay {
|
|
|
129
129
|
* default and makes Enter/r/m/x no-op instead of shelling local lifecycle
|
|
130
130
|
* commands against a remote graph row. See the file header. */
|
|
131
131
|
remote;
|
|
132
|
-
constructor(tui,
|
|
132
|
+
constructor(tui, selfId, getAsks, palette, bindings, source, role = 'controller', onRefreshFailure = () => { }, onNotice = () => { }) {
|
|
133
133
|
this.tui = tui;
|
|
134
|
-
this.
|
|
134
|
+
this.selfId = selfId;
|
|
135
135
|
this.getAsks = getAsks;
|
|
136
136
|
this.palette = palette;
|
|
137
137
|
this.bindings = bindings;
|
|
@@ -141,6 +141,7 @@ export class GraphOverlay {
|
|
|
141
141
|
this.onNotice = onNotice;
|
|
142
142
|
this.remote = source instanceof RemoteCanvasSource;
|
|
143
143
|
}
|
|
144
|
+
get self() { return this.selfId(); }
|
|
144
145
|
setBindings(bindings) {
|
|
145
146
|
this.bindings = bindings;
|
|
146
147
|
if (this.handle !== undefined)
|
|
@@ -255,6 +255,15 @@ export class ChatView {
|
|
|
255
255
|
pendingSends = [];
|
|
256
256
|
/** Optional banner, above history and status in the viewport's flat source. */
|
|
257
257
|
bannerContainer;
|
|
258
|
+
/** Add one line to the banner after construction: a new root learns its id only when its create returns. */
|
|
259
|
+
setBannerHint(line) {
|
|
260
|
+
const banner = this.bannerContainer;
|
|
261
|
+
if (banner === undefined)
|
|
262
|
+
return;
|
|
263
|
+
banner.removeChild(banner.children[banner.children.length - 1]);
|
|
264
|
+
banner.addChild(new Text(line, 1, 0));
|
|
265
|
+
banner.addChild(new Spacer(1));
|
|
266
|
+
}
|
|
258
267
|
transcript;
|
|
259
268
|
/** Inline page blocks placed in this transcript, by page id — one block per
|
|
260
269
|
* page, so a `--replace` revision refreshes the block already on screen. */
|
|
@@ -17,7 +17,7 @@ export function isTransientDaemonFailure(error) {
|
|
|
17
17
|
return isDaemonTransportApiError(error) || (error instanceof APIError && error.status >= 500);
|
|
18
18
|
}
|
|
19
19
|
export function createChromeRefresh(ctx, hooks) {
|
|
20
|
-
const {
|
|
20
|
+
const { canvasSource } = ctx;
|
|
21
21
|
let asksMap = {};
|
|
22
22
|
let asksTimer;
|
|
23
23
|
let stopped = false;
|
|
@@ -63,6 +63,9 @@ export function createChromeRefresh(ctx, hooks) {
|
|
|
63
63
|
let chromeRefreshInFlight = false;
|
|
64
64
|
let chromeRefreshQueued = false;
|
|
65
65
|
const refresh = () => {
|
|
66
|
+
// A root still being created has no canvas tree to read; binding the node starts the first refresh.
|
|
67
|
+
if (ctx.nodeId === '')
|
|
68
|
+
return;
|
|
66
69
|
chromeRefreshQueued = true;
|
|
67
70
|
if (chromeRefreshInFlight)
|
|
68
71
|
return;
|
|
@@ -74,7 +77,7 @@ export function createChromeRefresh(ctx, hooks) {
|
|
|
74
77
|
const seqBefore = failureSeq;
|
|
75
78
|
try {
|
|
76
79
|
// One read of this node's tree feeds the panels, the inbox strip and the ask counts.
|
|
77
|
-
const view = await canvasSource.panelView?.(nodeId);
|
|
80
|
+
const view = await canvasSource.panelView?.(ctx.nodeId);
|
|
78
81
|
if (view !== undefined)
|
|
79
82
|
setAsks(view.counts);
|
|
80
83
|
await hooks.refreshRoster(view);
|
|
@@ -120,7 +123,7 @@ export function createChromeRefresh(ctx, hooks) {
|
|
|
120
123
|
// A remote canvas has no tree read: it climbs and counts node by node.
|
|
121
124
|
if (canvasSource.panelView === undefined)
|
|
122
125
|
void (async () => {
|
|
123
|
-
const root = await climbRootFromSource(nodeId);
|
|
126
|
+
const root = await climbRootFromSource(ctx.nodeId);
|
|
124
127
|
const counts = await canvasSource.ticketCountsForView(root);
|
|
125
128
|
if (JSON.stringify(counts) !== JSON.stringify(asksMap)) {
|
|
126
129
|
asksMap = counts;
|