Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
b2cd1f4
feat(canvas): action registry with ⌘K palette, main menu and editor s…
kgoedecke Nov 8, 2026
4a66ddc
fix(canvas): address review on arrange, grouping, replace and find
kgoedecke Nov 8, 2026
bc2b821
fix(canvas): make paste to replace undo-safe and guard grouping again…
kgoedecke Nov 8, 2026
561aa33
fix(canvas): keep paste-to-replace undo retryable across several frames
kgoedecke Nov 8, 2026
7988f6a
Merge main into feat-cmd-k-action
kgoedecke Nov 8, 2026
8fd1f30
fix(canvas): keep outer margins, link images, match Unicode, drop sta…
kgoedecke Nov 8, 2026
188dbc9
fix(canvas): read Meta as the mod key off a Mac; link several images …
kgoedecke Nov 8, 2026
9fbe2c7
fix(canvas): never nest links when a picked parent and child are linked
kgoedecke Nov 8, 2026
a4f322d
fix(canvas): keep inner links' class, style and id when their box is …
kgoedecke Nov 8, 2026
1bccf9c
fix(canvas): keep SVG links as groups when their box is linked
kgoedecke Nov 8, 2026
d3d7396
fix(ui): draw shortcut symbols in Inter and even out menu separators
kgoedecke Nov 9, 2026
05aeb14
feat(desktop): build the macOS menu bar from the action registry
kgoedecke Nov 9, 2026
b496d2b
Merge remote-tracking branch 'origin/main' into kgoedecke/feat-cmd-k-…
kgoedecke Nov 9, 2026
502c006
fix(canvas): find a layer's parent on the tree, keep teammates' edits…
kgoedecke Nov 9, 2026
23f49d5
fix(canvas): group root layers against the body; keep failed replace …
kgoedecke Nov 9, 2026
57d73ef
fix(ui): inline the key-symbol font
kgoedecke Nov 9, 2026
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
6 changes: 5 additions & 1 deletion .context/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ White system (Doop UI v2, canvas guideline `doop-ui-system`): neutral greys, no
aliases). `--font-mono`: `'Geist Mono', ui-monospace, monospace` - values only (ids, sizes,
numbers, key caps, code); the mono-uppercase caption voice is retired, captions and field labels
are `text-caption` / `text-label` in sentence case. `--font-hero`: `'Hanken Grotesk'` Light - the
home greeting, and nothing else (loaded in `index.html`). There is no
home greeting, and nothing else (loaded in `index.html`). Every font stack lists `'Doop Keys'`
after its face: a 5 KB cut of the full Inter (`src/assets/fonts/inter-keys.woff2`) carrying only
the key symbols (⌘ ⌥ ⇧ ⌃ ⌫ ↩ ⇥ ⎋, arrows) the Google Fonts builds of Inter and Geist Mono drop, so
shortcut hints never fall back to the OS font's undersized glyphs. A new symbol in a hint goes
into its `unicode-range` and the subset (rebuild steps in `src/styles.css`). There is no
serif: Instrument Serif was retired, and page-level headings outside the dashboard (sign-in,
not-found, the desktop handoff) use `DashTitle` like every other page title.
- **The scale** is named by role, as `--text-*` tokens in `src/styles.css` (each carries its line
Expand Down
14 changes: 9 additions & 5 deletions .context/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,15 @@ in `.github/actions/setup-desktop`:
provider in the system browser and returns over a `doop://integration/<id>` link; the app
finishes it under its own session (`shared/desktopConnect.ts`). This is web-only: shells from
0.2.1 already deliver any `doop://` link, and older shells open Integrations in the browser.
- The macOS View menu (`desktop/src-tauri/src/view_menu.rs`) holds the canvas toggles (Rulers,
Show/Hide UI, Layers and Agents panels) and zoom. Items reach the page as `view-command`
events; the page mirrors its state back through `view_menu_state` (`src/lib/viewMenu.ts`,
gated on `window.__DOOP_VIEW_MENU__`), so checkmarks follow it and canvas items are disabled
off a canvas. Only ⌘ shortcuts are bound in the menu; ⇧R / ⇧1 / ⇧2 stay with the page.
- The macOS menu bar is the page's (`desktop/src-tauri/src/app_menu.rs`, `src/lib/appMenu.ts`, gated
on `window.__DOOP_APP_MENU__`, macOS only): the page sends File, Edit, View, Object, Text, Arrange
and Help from the action registry (`app_menu_set`, labels in its language, each chord as the key
equivalent) and then only changed enabled/checked state (`app_menu_state`); the shell keeps the
app menu, Close Tab, the system Undo/Cut/Copy/Paste/Select All that text fields need, Full Screen
and Window. A pick returns as `app-menu` `{ id, key }`; the webview sees a key before the menu, and
a key the menu does get keeps the canvas keyboard's rules (nothing while typing or presenting).
Until a page sets it the bar is the old fixed one, whose View menu (`view_menu.rs`,
`src/lib/viewMenu.ts`, `__DOOP_VIEW_MENU__`) an older page still drives. Needs a desktop release.
- Server choice (`desktop/src-tauri/src/server.rs`, `src/components/ServerSettings.tsx`): the
sign-in screen's cog (shells advertising `__DOOP_SERVER_CHOOSE__`) points an official build at a
self-hosted server. `server_choose` normalizes the address to an origin (https, or http on loopback only),
Expand Down
34 changes: 32 additions & 2 deletions .context/TECHSTACK.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ data-doop-webfonts>` for the roster families the frame names and does not load i
- View options (`src/lib/viewOptions.ts`, per browser under `doop:view-options`): the zoom pill's
menu opens on a field for a typed level (`150`, `150%`; `parseZoomPercent`) and switches the
pixel grid (⇧'), other people's cursors (⌘⌥\ / Ctrl+Alt+\) and the comment pins (⇧C), each read
by `code` (`viewOptionForKey`). Hidden pins still show under the Comment tool and for a thread
that is open. Tests: `viewOptions.test.ts`, `zoomMenu.test.tsx`.
by `code` (registry actions `pixel-grid`, `comments`, `cursors`). Hidden pins still show under
the Comment tool and for a thread that is open. Tests: `viewOptions.test.ts`, `zoomMenu.test.tsx`.
- Canvas panel layout (Settings → Appearance → Canvas panels, `src/lib/panelLayout.ts`, per
browser under `doop:panel-layout`): `floating` (the default) keeps the islands over a
full-window stage; `docked` makes Layers, the tool rail, the icon islands, the Inspector /
Expand Down Expand Up @@ -359,6 +359,36 @@ data-doop-webfonts>` for the roster families the frame names and does not load i
the brackets treat it as a frame, and ⌘A skips stack-locked shapes (`isStackLocked`). ↩ and Tab act only when no control has the keyboard (`isControlTarget`) and
something is selected, so buttons, menus and the Layers tree keep theirs. The bracket chords are
read by `code` too, since ⌥ changes the typed character on macOS. Tests: `selectionKeys.test.ts`.
- Canvas commands (`src/lib/actions/`): every editor command is one entry in `registry.ts` (id,
label key in the `actions` catalog, menu and section, chords, `edit`, `enabled`, `checked`,
`run`), and the keyboard (`dispatchActionKey`, called first by `CanvasPage`'s keydown), the ⌘K
palette (`CommandPalette.tsx`, cmdk through `ui/command.tsx`; text that names no command goes to
the agent's composer as a prompt), the main menu off the bar's Doop mark (`MainMenu.tsx`: File,
Edit, View, Object, Text, Arrange, Help) and the ⌃⇧? sheet (`ShortcutsSheet.tsx`) all read it.
`CanvasPage` lends the registry its modals and panels as the `ActionHost`. Chords (`chords.ts`)
are `mod` (⌘ on a Mac, Ctrl elsewhere), ⌥ chords by `code`, `macOnly` / `notMac` per platform (⌘Y
is outlines on a Mac, redo elsewhere), `global` for the two that act from fields (⌘K palette, ⌘/
agent; a bare `/` opens the agent outside fields). A chord whose command is disabled or finds
nothing falls through to the browser. ⌫, Esc, ↩/Tab and the arrows stay in `CanvasPage`'s own
handler (their rules are shown, `hintOnly`). What the commands do lives in `edits.ts`: align /
distribute / tidy / pack (`arrange.ts`, pure geometry) move frames as one undo step
(`patchFrames`) and layers through the runtime's `move` geometry edit; ⌘G / ⌥⌘G wrap sibling
layers in a `div` (carrying a flex parent's flow; grid children are refused; a frame edited while
its layout is read is left alone) and ⇧⌘G / ⌘⌫ unwrap (`groupElements` / `ungroupElements` in
`layers.ts`); ⇧A makes a box a flex container, or wraps the pick in one, turning the space between
the layers into `gap` and dropping their flow margins so nothing moves; ⌥⌘C / ⌥⌘V copy and paste
computed looks (`doop:computed`), text styles only between text layers; ⇧⌘V / ⇧⌘R paste over or
replace the selection from the canvas clip (a frame goes only once all its replacements land; one
undo step, a single `transfer` (`replaceFramesTracked`), so undo never removes a replacement
before its original is back; tests in `replaceFrames.test.ts`); ⇧⌘U links (`setElementLink`: an
image or SVG is wrapped in the link, other layers' content is); ⌃C is the EyeDropper. ⌘F / ⌥⌘F is
the find bar (`FindBar.tsx`, `findText.ts`: text nodes only, locked layers found but never
replaced, replace-all is one undo step across frames). View toggles: ⇧' / ⇧C / ⌥⌘\ switch the view
options (pixel grid, comment pins, cursors), ⌘Y outline mode (an adopted sheet in each frame's
runtime, never saved or exported), ⌥L collapses the Layers tree. N / ⇧N zoom to the next frame in
reading order, Home / End bring it into view, PgUp / PgDn change page. Tests:
`actionRegistry.test.ts` (no chord bound twice per platform, nor over a tool key),
`actionChords.test.ts`, `arrange.test.ts`, `groupLayers.test.ts`, `findText.test.ts`.
- `src/lib/tools.ts` defines bottom-toolbar tools and shortcuts. `Stage.tsx` delegates drawing
gestures and world-space previews to `CanvasDrawing.tsx`; Space/middle-button panning takes
precedence over drawing.
Expand Down
7 changes: 7 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions desktop/src-tauri-chromium/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion desktop/src-tauri-chromium/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ tauri-plugin-opener = "=3.0.0-alpha.3"
tauri-plugin-deep-link = "=3.0.0-alpha.3"
tauri-plugin-single-instance = { version = "=3.0.0-alpha.3", features = ["deep-link"] }
tauri-plugin-updater = "=3.0.0-alpha.3"
# the page's menu bar arrives typed (src/app_menu.rs)
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml_edit = "0.25"
tempfile = "3"
Expand All @@ -44,7 +46,7 @@ reqwest = { version = "0.13", default-features = false, features = ["json", "rus
rustls = { version = "0.23", default-features = false, features = ["ring"] }

[target.'cfg(target_os = "macos")'.dependencies]
objc2-app-kit = { version = "0.3", features = ["NSButton", "NSControl", "NSResponder", "NSView", "NSWindow"] }
objc2-app-kit = { version = "0.3", features = ["NSApplication", "NSButton", "NSControl", "NSEvent", "NSResponder", "NSView", "NSWindow"] }
# reading the WebKit app's cookies and localStorage on the first launch (src/webkit_migration.rs)
objc2 = "0.6"
block2 = "0.6"
Expand Down
2 changes: 2 additions & 0 deletions desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ tauri-plugin-opener = "2"
tauri-plugin-deep-link = "2"
tauri-plugin-single-instance = { version = "2", features = ["deep-link"] }
# generate_context! embeds the `plugins` section of tauri.conf.json through it
# the page's menu bar arrives typed (src/app_menu.rs)
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml_edit = "0.25"
tempfile = "3"
Expand All @@ -35,7 +37,9 @@ rustls = { version = "0.23", default-features = false, features = ["ring"] }
# Repositioning the traffic lights over the web app's tab strip (main.rs);
# AppKit resets them on window events, so the shell moves them itself.
[target.'cfg(target_os = "macos")'.dependencies]
objc2-app-kit = { version = "0.3", features = ["NSButton", "NSControl", "NSResponder", "NSView", "NSWindow"] }
# MainThreadMarker, to read the event behind a menu pick (src/app_menu.rs)
objc2 = "0.6"
objc2-app-kit = { version = "0.3", features = ["NSApplication", "NSButton", "NSControl", "NSEvent", "NSResponder", "NSView", "NSWindow"] }

[profile.release]
strip = true
Expand Down
2 changes: 2 additions & 0 deletions desktop/src-tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ fn main() {
"server_status",
"server_choose",
"view_menu_state",
"app_menu_set",
"app_menu_state",
"update_card_ready",
"update_restart",
]));
Expand Down
2 changes: 2 additions & 0 deletions desktop/src-tauri/capabilities/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"allow-server-status",
"allow-server-choose",
"allow-view-menu-state",
"allow-app-menu-set",
"allow-app-menu-state",
"allow-update-card-ready",
"allow-update-restart"
]
Expand Down
11 changes: 11 additions & 0 deletions desktop/src-tauri/permissions/autogenerated/app_menu_set.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-app-menu-set"
description = "Enables the app_menu_set command without any pre-configured scope."
commands.allow = ["app_menu_set"]

[[permission]]
identifier = "deny-app-menu-set"
description = "Denies the app_menu_set command without any pre-configured scope."
commands.deny = ["app_menu_set"]
11 changes: 11 additions & 0 deletions desktop/src-tauri/permissions/autogenerated/app_menu_state.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Automatically generated - DO NOT EDIT!

[[permission]]
identifier = "allow-app-menu-state"
description = "Enables the app_menu_state command without any pre-configured scope."
commands.allow = ["app_menu_state"]

[[permission]]
identifier = "deny-app-menu-state"
description = "Denies the app_menu_state command without any pre-configured scope."
commands.deny = ["app_menu_state"]
Loading
Loading