@devaccel-labs/app-comments-toolbar
The in-app comment toolbar that host apps (Officers Assist, JebelAI) load at runtime from the App comments
worker as /v1/toolbar/1.js. Ported from the comment-service repo (packages/core and packages/react) on
2026-10-12; this is the source of record for the runtime.
src/core: anchor model and resolution (resolveAnchor), DOM-free.src/runtime: the React runtime (runtime.tsxis the bundle entry), element capture and placement, sync, attachments, page screenshots (page-image.ts), styles, and the live update (update.ts,build-id.ts).loader.tsxis the host-side<CommentToolbar>.src/compiler,src/vite,src/server: the Vite plugin that stamps components withdata-cs-cmp/data-cs-file, and the same-origin session route. Entry pointssrc/react.ts,src/vite.ts,src/server.ts.- Tests:
tests/unit/app-comments-toolbar-*.spec.ts.
How the toolbar ships
The toolbar is released by deploying MyStatusFlow, nothing else (ADR-APPC-008):
bun scripts/app-comments/build-toolbar.mjswritesworkers/app-comments/toolbar-dist/v1/toolbar/(checked in; seedocs/policies/generated-files-policy.md) with a build id hashed from the runtime's source, stamped into the bundle and written tobuild.json.bun scripts/dev/dev-app-comments.mjsbuilds it too.bun run deploy:staging(and the CI deploy) rebuilds it as its own phase and deploys the worker; a worker's served assets count toward the deploy's change detection.- A toolbar that is open reads
/v1/toolbar/build.jsonwhen its live socket reconnects (a deploy restarts it), when its tab becomes visible, and every five minutes. A different id makes it import the new bundle and remount itself in place, once nobody is mid-draft, mid-reply, recording or editing.
The npm package
Hosts install the package for the three things that are host-side by nature: the Vite plugin (build time), the
session route (server side) and the <CommentToolbar> loader. The package holds no runtime (since 1.1.0), so it
only changes when the loader contract (runtimeVersion) does. bun run build here writes dist/; publish with
npm publish from this directory. The COMMENT_SERVICE_* env names in hosts are unchanged.
/v1 responses and the runtime's storage keys must stay compatible with whatever package version the hosts have
installed; the runtime itself is always the worker's current build.