Skip to content

feat(desktop): add channel-first project Canvas POC - #6974

Draft
matt2e wants to merge 2 commits into
mainfrom
jitter/channel-project-features-on-thomas
Draft

feat(desktop): add channel-first project Canvas POC#6974
matt2e wants to merge 2 commits into
mainfrom
jitter/channel-project-features-on-thomas

Conversation

@matt2e

@matt2e matt2e commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make project channels the primary project workspace and add a project Canvas view
  • move Canvas presentation into a locally editable external package with manifest-declared widgets, styles, data, and assets
  • serve immutable package snapshots through an offline custom protocol and run one opaque-origin allow-scripts iframe behind a bounded MessageChannel data bridge
  • add local-only buzz canvas notify --change data|presentation handoff: data updates keep the iframe and widget root mounted for animation, while presentation updates use the existing validated last-known-good reload gate
  • persist pending update revisions across Desktop and Canvas restarts, preserve newer data across presentation commits, and expose the package directory through a machine-readable index

Validation

  • cargo test -p buzz-cli (416/416)
  • env -u BUZZ_ACP_ALLOWED_RESPOND_TO cargo test -p buzz-acp -- --test-threads=1 (840/840 across unit and integration tests)
  • pnpm -C desktop test (5,783/5,783)
  • cargo test --workspace --manifest-path desktop/src-tauri/Cargo.toml (full Tauri workspace; 3,004 desktop tests plus integration crates)
  • root and Tauri Clippy with warnings denied, Rust formatting, Desktop TypeScript, and Desktop checks
  • external Canvas package contracts (7/7) and isolated Canvas Playwright workflow (7/7)
  • repository pre-push gate, including differential file-size checks and full Desktop/Rust lanes

POC boundary

The native Canvas runtime fails closed outside macOS. A hostile raw-Tauri-IPC probe must still pass in the packaged macOS app before treating this as a production security boundary. Real project/channel/review data remains read-only inside the Canvas; agents mutate the local package through the filesystem and notify the running Desktop. Package storage is not synced.

@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is c3132c3ee982d194cd0198ad07b57ec8bd726e4e...69c03677b6738a5efb112b7219c3a9e7607789dd.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 69c03677b6738a5efb112b7219c3a9e7607789dd to authorize a new review.
Any previous review applies only to its recorded range.

@matt2e
matt2e force-pushed the jitter/channel-project-features-on-thomas branch from 17f8339 to c81760d Compare August 31, 2026 02:02
Move projects onto the channel-first stack: a channel can opt into
project features and surface them as tabs alongside chat, instead of
projects living as a separate top-level surface.

Desktop:
- Channel project features are opt-in per channel, with a feature bar,
  settings pane, and tabs for the canvas, resources, repos, reviews, and
  meetings; project home redirects to its channel
- Sidebar nests project channels under a project disclosure group, adds
  move destinations, and keeps section storage in sync with moves
- Extract the join-channel banner and the channel pane main column, and
  pull sidebar scroll lock and unread DM previews into their own modules
  to stay under the file-size ratchet
- Survive unmounted editor views and listener teardown races via
  mountedEditorView and safeUnlisten

Project Canvas:
- Sandboxed local canvas packages served over a Tauri custom protocol,
  with manifest validation, path security, and snapshot storage that
  supports pending/committed widget updates and revision pruning
- React canvas host and surface plus a shared protocol module
- Bundle a project-canvas-template resource with demo dashboards,
  widgets, and styles

CLI and agent surface:
- Add `buzz canvas notify` to tell the local desktop that a widget's
  presentation or data changed; it runs locally with no relay connection
- Update the ACP base prompt and nest skill docs for canvas authoring

Also promotes Projects out of preview-features.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e force-pushed the jitter/channel-project-features-on-thomas branch from c81760d to 031030f Compare August 31, 2026 05:26
The app aborted on every macOS and Linux launch. `ipc::start` runs
synchronously from Tauri's `setup` hook, on the main thread with no Tokio
runtime in context, and called `tokio::net::UnixListener::from_std` there.
That call registers the socket with the reactor, so it panicked with "there
is no reactor running" — and because `setup` runs inside tao's
`did_finish_launching`, a non-unwinding ObjC callback, the panic escalated to
`panic_cannot_unwind` and killed the process before a window ever appeared.

Bind the socket synchronously as before (so stale-socket and permission
failures still surface as a returned error), then hand the std listener to
`spawn_serving`, which converts it inside the spawned task where the reactor
is live. Socket cleanup on a failed conversion matches the existing accept
error path.

Covered by a unit test that calls `spawn_serving` from a plain sync context,
exactly as `setup` does, and asserts the socket still accepts a connection;
it reproduces the original panic when the conversion moves back to the call
site.

Verified with `just staging`: the app now boots past `did_finish_launching`,
creates `CANVASES/.runtime/agent-updates.sock` with 0600 permissions, and
reaches the frontend. Full Tauri test suite (3031), clippy, fmt, and the
file-size gate pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant