Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions packages/artifacts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,36 @@ the typed placeholder card. Stacking is CSS `z-index` from the index `order`;
an iframe is never moved or remounted, because that reloads it. The outline
route stays the keyboard and screen-reader path.

**Shell.** The canvas and the focused view are full-bleed: the console-ui shell bar
and the page header are one floating pill at the top left (`shell/floating-nav.tsx`:
the workspace switcher and Inbox the bar had, then the page's title and actions;
a phone keeps the mark, the title and an overflow menu). The inbox and the outline
keep the normal bar. The comments are a floating card on the right
(`shell/comments-panel.tsx`; a bottom sheet on a phone) that collapses to a pill
with the `MessageCircle` icon, the open count and a dot while an agent waits.
Shift+C toggles it, the choice is remembered per viewer in `localStorage`, and a
pin click, J/K or a new comment opens it on the thread. While it is open the
canvas fits and reveals into what it leaves, and the viewer narrows (the
`--ar-inset-right` variable). The comment cursor and the pins are lucide's
`MessageCircle` glyph, read from its icon data (`lib/pin-shape.ts`), with the tail
tip as the hotspot and the anchor.

**Arranging** (`src/client/canvas/arrange/`). Click selects, Shift-click adds,
a drag on empty canvas draws a marquee, a drag on a frame moves the selection
(4 px threshold, pointer capture, edge auto-pan, 8 px grid, Alt for free
movement, Esc cancels), eight handles resize one frame (a fixed-viewport frame
keeps its aspect), arrows nudge by 1 px (Shift 10), `[` `]` step z-order, Delete
removes from the board after a confirm (never the artifact), Mod+Z and
Shift+Mod+Z undo and redo. The arrangement is a replicated document:
`useBoardLayout` keeps the server's index plus an outbox of
`boards.applyOps` ops (`moveFrames` with optional `w` and `h`, `reorder`,
`removeFrame`), saved 400 ms after the last edit and on `pagehide` (a
`keepalive` request). What is drawn is the index with the outbox applied on
top, and the ops are absolute, so another actor's change (an agent publishing a
frame) merges by id without moving the camera or losing a drag in progress;
a toast names the new frame with a jump-to. Undo entries record before and
after per touched frame and replay as ops against the current board.

Browser support is Baseline Widely Available. `bun run dev:client` serves the
UI with Vite against a service on `:7440`.

Expand Down
Loading