feat: the native Quartz app (Rust, Rune), at parity with the web app #1

Merged
marti merged 134 commits from feature/native-app into develop 2026-11-16 22:05:32 +01:00
Owner

Summary

The native Quartz app: a Rust/Rune replica of the web app (../quartz/apps/web), a second client of the same server (ADR 0041 there). docs/parity.md: 316 of the web's 326 capabilities match, 10 differ on purpose (reasons in docs/architecture.md, "Differences from the web app"), 0 open.

crates/
├── quartz-api       # wire types generated from @quartz/shared's Zod schemas; REST client, OAuth (quartz-app client), profiles
├── quartz-shared    # ports of packages/shared logic (paths, markdown, format note, links, presence)
├── quartz-collab    # ports of packages/collab on yrs + the Hocuspocus 4.8 wire protocol (byte-identical to the JS)
├── quartz-store     # offline cache per server: SQLite (trees, Yjs states, pending updates, kv, blobs)
├── quartz-sync      # tokio engine: events feed, collab socket, documents, queries, drawing-window relay
├── quartz-theme     # rune-kit kit coloured by the desktop (GTK css + portal on Linux)
├── quartz-icons     # the web's Tabler icons
├── quartz-preview   # Markdown rendering (GFM, callouts, RaTeX math, mermaid, embeds)
├── quartz-editor    # Raw + Styled block editor, vim, slash menu, find/replace, tables
├── quartz-app       # shell, routes, one module per web feature directory
└── quartz-draw      # helper: a webview window running the server's draw app
flowchart LR
  UI[Rune UI thread: App + editor] -- Command --> ENG[tokio engine]
  ENG -- EngineEvent + waker --> UI
  UI <-- shared yrs Doc --> ENG
  ENG --> SRV[(Quartz server: /api, /api/events, /collab)]
  ENG --> DB[(SQLite cache)]
  DRAW[quartz-draw window] -- Yjs over IPC --> ENG

Following the web: every ported module names its source (//! Mirrors: apps/web/src/...), scripts/web-drift.sh lists web files changed since WEB_REV with the modules that mirror them, scripts/sync-web.sh regenerates the wire types.

Evidence

  • Before: no native client (ADR 0020 dropped the Electron one).
    After:
    • cargo clippy --workspace --all-targets -- -D warnings: clean. cargo test --workspace: every suite passes (quartz-app 348, quartz-collab 129, quartz-shared 103 + fixture suites against the TS implementation, ...).
    • Live, against a fresh scripts/dev-server.sh server (+ scripts/mock-openai.mjs for the assistant):
      quartz-sync live  6/6   edit reaches server and 2nd client; offline edits merge; unsent edits sent on next start;
                              tree via events feed; query refetch on cursor; device-flow sign-in
      quartz-sync relay 2/2   drawing window <-> replica <-> server
      quartz-app live   7/7   assistant answer + undo; board co-edit converges; two accounts co-edit a note;
                              files create/rename/move/upload/trash; tags/broken links; settings/spaces/admin; model settings
      quartz-api live   3/3
      
    • nix build .#quartz-app installs quartz-app, quartz-draw and the desktop entry.
    • Not verified: Windows and macOS builds; sound output and microphone.

Merge Danger

Door: two-way

A new repo with nothing deployed; reverting is dropping the merge.

Blast Radius: none

Sign-in against a real server needs the Quartz branch feature/native-app-oauth-client (the built-in quartz-app OAuth client); until it is deployed, sign-in fails with an unknown client error. The schema export it also adds is what scripts/sync-web.sh runs.

Generated with Claude Code

## Summary The native Quartz app: a Rust/Rune replica of the web app (`../quartz/apps/web`), a second client of the same server (ADR 0041 there). `docs/parity.md`: 316 of the web's 326 capabilities match, 10 differ on purpose (reasons in `docs/architecture.md`, "Differences from the web app"), 0 open. ```text crates/ ├── quartz-api # wire types generated from @quartz/shared's Zod schemas; REST client, OAuth (quartz-app client), profiles ├── quartz-shared # ports of packages/shared logic (paths, markdown, format note, links, presence) ├── quartz-collab # ports of packages/collab on yrs + the Hocuspocus 4.8 wire protocol (byte-identical to the JS) ├── quartz-store # offline cache per server: SQLite (trees, Yjs states, pending updates, kv, blobs) ├── quartz-sync # tokio engine: events feed, collab socket, documents, queries, drawing-window relay ├── quartz-theme # rune-kit kit coloured by the desktop (GTK css + portal on Linux) ├── quartz-icons # the web's Tabler icons ├── quartz-preview # Markdown rendering (GFM, callouts, RaTeX math, mermaid, embeds) ├── quartz-editor # Raw + Styled block editor, vim, slash menu, find/replace, tables ├── quartz-app # shell, routes, one module per web feature directory └── quartz-draw # helper: a webview window running the server's draw app ``` ```mermaid flowchart LR UI[Rune UI thread: App + editor] -- Command --> ENG[tokio engine] ENG -- EngineEvent + waker --> UI UI <-- shared yrs Doc --> ENG ENG --> SRV[(Quartz server: /api, /api/events, /collab)] ENG --> DB[(SQLite cache)] DRAW[quartz-draw window] -- Yjs over IPC --> ENG ``` Following the web: every ported module names its source (`//! Mirrors: apps/web/src/...`), `scripts/web-drift.sh` lists web files changed since `WEB_REV` with the modules that mirror them, `scripts/sync-web.sh` regenerates the wire types. ## Evidence - **Before:** no native client (ADR 0020 dropped the Electron one). **After:** - `cargo clippy --workspace --all-targets -- -D warnings`: clean. `cargo test --workspace`: every suite passes (quartz-app 348, quartz-collab 129, quartz-shared 103 + fixture suites against the TS implementation, ...). - Live, against a fresh `scripts/dev-server.sh` server (+ `scripts/mock-openai.mjs` for the assistant): ```text quartz-sync live 6/6 edit reaches server and 2nd client; offline edits merge; unsent edits sent on next start; tree via events feed; query refetch on cursor; device-flow sign-in quartz-sync relay 2/2 drawing window <-> replica <-> server quartz-app live 7/7 assistant answer + undo; board co-edit converges; two accounts co-edit a note; files create/rename/move/upload/trash; tags/broken links; settings/spaces/admin; model settings quartz-api live 3/3 ``` - `nix build .#quartz-app` installs `quartz-app`, `quartz-draw` and the desktop entry. - Not verified: Windows and macOS builds; sound output and microphone. ## Merge Danger **Door:** two-way A new repo with nothing deployed; reverting is dropping the merge. **Blast Radius:** none Sign-in against a real server needs the Quartz branch `feature/native-app-oauth-client` (the built-in `quartz-app` OAuth client); until it is deployed, sign-in fails with an unknown client error. The schema export it also adds is what `scripts/sync-web.sh` runs. Generated with [Claude Code](https://claude.com/claude-code)
marti added 134 commits 2026-11-16 22:03:21 +01:00
Reads @define-color and --custom-property colours from the user's and
the named theme's GTK stylesheets, and color-scheme and accent-color
from the appearance portal, then seeds Kit::from_palette with them. The
user's light/dark choice overrides the desktop; a desktop palette of
the other appearance keeps only its accent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
crates/quartz-api/schema/shared.json is the Zod export of the Quartz repo
(npm run schema -w packages/shared); build.rs turns it into one Rust type
per export with typify. scripts/sync-web.sh refreshes it and records the
Quartz commit in WEB_REV; scripts/web-drift.sh lists the web files that
changed since, with the native modules that mirror each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
architecture.md fixes the thread model (Rune UI thread, one tokio engine
per server profile, shared yrs documents), sign-in, transports, the
offline cache and the differences from the web app. parity.md is the
web app's 320 capabilities plus the native-only ones. research/ holds the
Rune, protocol and web inventory notes they came from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Local settings (the web's local storage keys), query snapshots keyed by
cursor, file trees merged by seq as the web merges changesSince, Yjs
document states with their unacknowledged updates, and blobs bounded in
bytes with LRU eviction. Every call runs on tokio's blocking pool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Client mirrors @quartz/client in bearer mode: one method per client
method, grouped like the web client (client.spaces().list()), URL
builders for raw files, pictures and the events/collab websockets.
TokenSource supplies the bearer token and runs one refresh at a time;
concurrent 401s share it, the request is retried once, and a refused
refresh reports SignedOut. ApiError keeps the server's ApiError body
and separates 401 and 403 insufficient_scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Discovery (cached; 404 is NoPublicUrl, "This server has no public URL
set, so apps cannot sign in"), the loopback PKCE flow with a mandatory
iss check and the host name as device_name, the device flow with
slow_down handling, refresh and revoke. Ported from quartz-cli's
oauth.rs onto tokio; the caller opens the browser through a callback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
servers.json (id, url normalised like quartz-cli's ServerUrl, label,
cached user, lastSpaceId, active profile) under <config dir>/quartz-app,
written atomically on the blocking pool. Tokens go to the OS keychain
(keyring 3: Secret Service, Keychain, Credential Manager) or to
credentials.json at 0600 when none answers, every read-modify-write
under credentials.lock. ProfileRefresher re-reads the stored pair under
the lock, adopts a pair another process rotated, and saves a new pair
before handing it out; a refused refresh deletes the stored sign-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ignored unless QUARTZ_TEST_URL and QUARTZ_TEST_TOKEN are set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Zod export marks objects additionalProperties: false, which typify
made deny_unknown_fields, so any field a newer server adds would fail
the call until the schema is re-synced. Drop the flag before generating.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 159 outline and 3 filled Tabler v3.51 SVGs the web app imports
(React components and the slash menu's raw SVGs) are vendored under
svg/ with Tabler's MIT licence and compiled by build.rs into one
rune::Icon static each, named like the React component (IconFolder ->
FOLDER), with the web's 1.6 stroke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
App holds the route history, shell state, the engine's answers and the
local-storage keys; setup takes Rune's waker and reads the desktop's
colours on a thread of their own; poll drains Update messages from a
std channel. Command and Update are placeholders quartz-sync will own.

Route mirrors every web route and its search params (settings,
attachment, card), parses web paths and URLs (old settings links
included) and formats them back; links.ts and a per-window history
with back, forward and replace are ported. lib/ holds shortcut labels,
natural sort, byte sizes, initials, timeAgo, path rules and storage.
components/ ports Kbd, Dialog/ConfirmDialog, ErrorState, StatusBar and
PageHeader. Sample spaces and files are built from the wire types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports features/shell on rune-kit's SplitView: the sidebar (space menu,
nav rows, file tree stand-in, Changes/Attachments/Trash, account menu)
or its rail, the routed page with back/forward/up and breadcrumbs in
its header and a status bar, and the side panel and assistant laid out
by layoutPanels (ported with its tests): docked when they fit,
overlaying the page from their edge when not, drawers below 768 points.
Mod-K, Mod-P, Mod-\, Mod-Shift-B, Mod-O and Alt-Left/Right/Up work as
on the web. Palette, quick switcher, side panel, assistant, space,
settings and attachment dialogs are stubs with the web's words.
Scenes render every state headlessly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
Notes, text diff (a diff-match-patch 1.0.5 port on UTF-16 code units),
fork_edit, drawings with keep_newest_elements, boards, documents and
fractional-indexing ranks checked against the JS library's own keys.
Documents use OffsetKind::Utf16 so offsets match Yjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Node scripts under tests/fixtures/gen dump what @quartz/collab and Yjs
produce (diffText edits, note, drawing and board states and updates);
the Rust ports match them edit for edit and byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports packages/shared/src/paths.ts: validation and normalization, keys,
names, README folders and relative links, with JavaScript's whitespace,
UTF-16 lengths and NFC in a small js module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isServerPath, presence colours (FNV-1a over UTF-16 units), picture sniffing
and cursor colours, folderNameFor and uniqueName, device user codes, the
lenient readUserSettings with its defaults, and the plain constants of the
schema modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
attachmentPath, renamedAttachmentPath, the attachments folder checks and
attachmentLabel, with v4 ids from the uuid crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The link helpers of markdown.ts, and extractNoteRefs, findSections,
findLinkDestinations and relinkNote on a mdast-shaped tree built from
pulldown-cmark, which adds micromark's frontmatter rules, GFM autolink
literals (tokenizer and findAndReplace pass), link reference definitions
and destination ranges. Positions come in UTF-8 bytes and UTF-16 units.
Also headings, frontmatter and task items for the editor, and TagName.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
speakableText and speechChunks; embedTargetFor, and the embed messages as
serde enums tagged on type, with parsers that apply the Zod rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The line-based note tidier, character for character: bullets and
numbering, nested indentation, blank lines, aligned tables, hard breaks and
the final newline, leaving inline text, frontmatter, code, math and HTML.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gen.mts runs packages/shared/src over a corpus (Quartz's README and docs,
hand-written edge notes, string tables, 1000 random notes) and writes the
answers; fixtures.rs checks every one, pinning the random notes where
pulldown-cmark and micromark differ. robustness.rs checks no input panics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maps each TypeScript module to its Rust module, lists the public API,
the position units, the fixtures and where the port differs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Awareness on yrs encoded as y-protocols 1.0.7 encodes it, the note
editor's user and y-codemirror cursor shapes (Yjs relative-position
JSON), the web's collaborator list, and an I/O-free port of
connectPort for the drawing window's channel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
Encode and decode every /collab frame (sync, awareness, auth with
scopes, query awareness, stateless, close, sync status, ping) and an
I/O-free Session state machine for one document's handshake, acks,
read-only scope, presence renewal and expiry, and leave. Golden tests
replay a real @hocuspocus/provider transcript byte for byte.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
The helper relays the embed protocol's port (Yjs sync and awareness) to
the engine instead of scenes, since that is what the draw app speaks.
bridge.js gives the top-level page a parent stand-in; Bridge answers
quartz:ready with the init and numbers the sessions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Starts Postgres and a Quartz server from a checkout, creates two accounts
and signs each in through the device flow as quartz-app without a human.
docs/development.md: prerequisites per OS, run paths, the script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The helper opens a tao window with a wry webview on the draw app,
answers its handshake through the bridge, relays the port over stdio,
follows the theme, keeps to the draw app's origin and remembers its
size and place. The client spawns it, maps sessions per process,
restarts it after a crash and kills it on drop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quartz-preview crate's foundation: pulldown-cmark with quartz-shared's
options plus math, raw HTML merged into one hast-shaped tree, the web's
sanitizer allowlist, callouts, GitHub slugs, autolink literals, frontmatter
properties, task toggle edits, the block splitter with byte and UTF-16
ranges, and math typeset by RaTeX into pixels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Serves a build of apps/draw at /draw/ and stands in for the engine,
keeping the draw app's updates and replaying them to each session.
Also names the X11 class quartz-app, as the desktop entry does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Nix package builds both binaries and wraps quartz-draw with
WebKitGTK and glib-networking; the dev shell gets glib-networking's
GIO module for https. README covers hosting, auth, the protocol, the
client and per-platform requirements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
Blocks and runs drawn in prose.css's spacing and the kit's colours:
headings with anchors, lists and task boxes that report their position,
tables, quotes, callouts that fold, raw details, code coloured by rune-kit,
mermaid by rune-mermaid, KaTeX-style math by RaTeX, footnotes, frontmatter
properties, and the embed registry through the PreviewHost. Each unit is
memoised by a hash of what it draws and falls back to its source when it
fails. The gallery example renders a fixture note on the sample host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine hands the profile's local-storage keys to the UI at start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EngineRuntime runs a tokio runtime on its own thread with a supervisor for
server profiles and sign-in, and the active profile's Engine: the events
feed with the web's backoff and resync, the collab socket multiplexing
Hocuspocus sessions, reference-counted DocumentHandles over the shared yrs
Doc (UTF-16 edits, undo scoped to local edits, awareness cursors),
cursor-keyed cached queries, and the offline cache (start from the store,
pending updates until acknowledged, reopened at the next start).

Unit tests for the state machines and the handle, an offline engine test,
and live tests against scripts/dev-server.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
importCargoLock collided on the two tiny-skia-path 0.11.4 sources (Rune's
patched copy in git and crates.io); fetchCargoVendor keeps them apart.
The Nix build environment makes aws-lc-sys and libsqlite3-sys link
system libraries, so the package provides aws-lc and sqlite, and cacert
for the tests that build a reqwest client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also draws <kbd> as a ringed chip and <mark> in an opaque tint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The note editor crate: a NoteBuffer trait over the shared text (UTF-16,
local undo, remote cursors) with an in-memory implementation; the note
parsed into line-run blocks with stable ids, one field per block, edits
diffed into buffer changes and remote changes mapped through the caret;
the Styled view hides markers at a hair's size, draws bullets, task
checkboxes, quote bars and code grounds, renders widgets through a
BlockRenderer, and edits tables as grids; the Raw view colours the
Markdown. Slash menu, emoji picker, link completion, block menu, format
note, vim, presence and line numbers come with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes from the tests: vim's . repeats typed text, visual put leaves the
cursor on the paste's end, emoji ties sort by name; element keys use ':'
so Cx::caret and focus requests find them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EngineConfig::seed_profile and the seed_profile example sign a profile in
with a bare token for dev servers; QUARTZ_APP_CREDENTIALS=file keeps tokens
out of the keychain. The first feed open no longer refetches what the start
is still loading, and a document's status changes before its unsent count
is reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The placeholder bridge gives way to quartz-sync: App holds the engine's
handle and drains Update::Engine and Update::Apply in poll; App::run and
run_online mirror useMutation with the web's error toast. The sign-in
screen adds, renames, removes and switches servers and signs in through the
browser or a device code; the status bar shows the connection and unsent
changes; closing with unsent changes asks first. Notes open from their live
document. Fixture scenes for every card and live-* scenes against the dev
server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QueryCache stands in for TanStack Query's useQuery: features declare the
queries the current state needs in QUERY_WANTS, poll asks the engine for
new keys, and views read answers decoded once per version, stale data
shown while a fresh answer loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each web feature directory now has its module, its state on App and an
entry in QUERY_WANTS, so a feature's port only fills its own directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A note of more than 160 blocks mounts only the rows near the viewport, and
an edit reparses only the blocks between the blank lines around it (the
whole note when a fence or HTML block is near, checked against a full
parse on random edits). The latency example times a keystroke headless:
Styled 2.6 ms and Raw 2.8 ms median at 200 KB, from 77 ms before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mod-click is read from the modifier's press and release around a click,
since Rune's fields report no clicks; the caret goes back after. Line
numbers sit beside a heading's text, and the Raw view dims inline tags
without styling them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README states the buffer contract the engine implements over yrs,
the editor's API, where the Styled view differs from the web's and why,
vim coverage and keystroke latency. parity.md ticks what the editor does
in full; architecture.md lists the block editor among the differences.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Link, many-body (Barnes-Hut), collide and centering forces with d3's
start spiral, LCG jiggles and alpha schedule; 60 ticks match
d3-force-3d 3.0.6's positions in 2D and 3D.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
#	docs/architecture.md
SSE of AG-UI chunks as TanStack AI 1.4's fetchServerSentEvents uses it:
run, join, transcript and cancel; the UI messages, uiMessagesToWire and
the chunk processor. Tests against a mock SSE server, and a live test
against a dev server whose assistant is scripts/mock-openai.mjs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DocumentHandle keeps a log of its text batches (from the Y.Text's deltas,
in the editor's batch coordinates) and moves a note's version with it;
DocBuffer implements quartz_editor::NoteBuffer over it, with undo through
the Yjs undo manager. DocumentHandle::detached serves scenes and tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Mod-K palette searches GET /api/search 180 ms after the last key, in
this space or all, with fuzzy file names, the command registry, #tag
filters and highlighted snippets; a hit opens with its reveal target on
the route (Overlay::reveal). Mod-P lists files across spaces and creates
a note with Mod-Enter. The side panel ports backlinks, links out,
related files, the outline and the history with the revision dialog
(line diff with similar, compare with now, restore).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sidebar's file tree (sorting, icons, muted READMEs and dotfiles, tag
dots, broken-link marks, open folders per space, keyboard, context menu,
inline rename and new folder, drag to move, desktop drops to upload) and
the tag navigator behind its switch; the file, folder and space home
pages with the files table, README slot and "Add a description"; file
actions with the web's toasts; the trash confirmation, move to another
space and name prompt; tag chips with the add field, colour popover,
menu and rename dialog; the tag pages; broken links. Scenes for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The feed is one cursor-keyed query per page, walked from the first page;
actor filters fill up to 25 rows (8 pages). The Display menu sets Kind
and Who on the route; the file chip clears the file filter. The change
dialog previews per kind (line diff, create content, move paths, tags,
board outline, drawing shapes) and reverts, asking "Revert anyway?" on
changed_since, including a 409 race. Pages can mount overlays through
PageView::layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lists the space's trash (attachments by label, folder item counts,
deleted by and when, size), restores with the renamed-path notice,
deletes one item or all after the web's confirmations, and shows the
count, retention and total size in the status bar. Viewers only read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of apps/web/src/features/boards and the board embed provider:
columns (add, rename, reorder, delete with confirmation), cards (add one
after another, drag within and across columns with a live drop place,
keyboard carry with Space and the arrows, status mark, right-click
menu), the Display filters remembered per board, the card drawer
(column, status, priority, due date picker, assignees, created, notes
bound to the card body Y.Text through a replaceable editor), the inline
board for the preview host, the full-screen board for the attachment
modal and "Assigned to you" for the space home. Every edit goes through
quartz_collab's board functions on the shared document.

Shared wiring kept small: app.rs holds the boards' documents and runs
the feature's per-frame work, the attachment modal and space home stubs
call the board and the tasks list, scenes.rs registers the scenes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Against scripts/dev-server.sh: a board made over REST opens as the
attachment modal opens it, the app edits it through the board's
handlers (new cards, a keyboard carry, priority, due date, assignee,
notes) while a colleague's engine adds a card and finishes another;
both replicas end equal and GET /api/me/tasks lists the assigned card.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Alert, CopyField, Field, PasswordInput, Slider and SwitchRow components;
App::later, App::debounced and App::spawn_work timers and work on the
engine's runtime; useUserSettings (optimistic, serialized, rolled back).
quartz-api gains publicLinks remove_password, which PutPublicLinkBody
cannot say. Rune's native file dialogs and the image codecs are enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ports color.ts (pictureColor, cursorColorFrom, cropRect) number for number
with its tests, render.ts on the engine's runtime (image crate, WebP or
JPEG under 512 KiB), CropDialog (drag, arrow keys, zoom 1-4, round mask),
ProfilePicture and SpacePicture; avatars fetch pictures as queries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MembersDialog with RoleMenu and UserCombobox (debounced search, chips,
Escape closes only the list), leave and remove confirmations and the
web's refusals; NewSpaceDialog; SpaceSettingsDialog (picture, rename,
delete after typing the name); ShareButton in file headers; the public
link dialog (create with optional password, copy the web URL, change or
remove the password, revoke). The menus show picture avatars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Account (profile with picture and cursor colour, password in the
browser, data export through the Save dialog), Appearance (theme, the
desktop-colours switch, editor settings saved to the account),
Connections (MCP URL, agent commands, devices and agents with sign
out) and the native Servers section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
UsersTab (search, sort, create, edit, disable, reset password, delete
with the web's refusals), PublicLinksTab (open in the browser, revoke),
AssistantAdminTab (model status, shared connection, access for everyone
or per user, embeddings) and EmbeddingReindex with progress polling.
Scenes for every dialog and section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The page lists the attachments folder by label with size, age and use
count, filters All / Unused and moves the unused to the trash through
the checkbox dialog, which closes once nothing unused remains. The
modal (?attachment=) previews images natively and other uploads as a
card, with Open in the system's app and Download through a save
dialog; a drawing is drawn natively from its elements with "Edit
drawing", which queues it for the drawing window (request_drawing_editor);
boards fill board_slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	crates/quartz-app/Cargo.toml
#	docs/architecture.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of features/graph: the orbit camera (quaternion trackball, zoom,
pan, frame), the model (degrees, filters, colour groups, search), the
layout on the d3-force-3d port in 3D or 2D, display settings under
quartz:graph-display, the canvas life (eased drag, flick coasting, idle
drift and breath, dot dragging, click, double click, hover), pulses and
sparks, the Display menu and legend, zoom buttons and Reset view, the
screen-reader list, the side panel preview and View in graph button.

The picture is a list of SDF primitives drawn in one instanced pass by
the app's compositor (gpu.rs) at the canvas's effect slot; labels and
the hover card are elements over it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also a sample README for the folder page scenes and full-width fields in
the rename and name dialogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	crates/quartz-app/src/features/files/space_home.rs
#	crates/quartz-app/src/scenes.rs
#	docs/architecture.md
live-palette, live-panel, live-history, live-changes, live-trash,
live-attachments and live-attachment seed a few files through the REST
client and wait for the real answers. The sidebar's trash and unused
attachment counts now follow the current space's trash and attachment
usage queries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runtime tests for the members, Share, new space and settings controls;
an ignored live test that drives settings, pictures, spaces, public links,
admin users and links, and export through the app's own handlers. The
segmented controls fill their column and the role menu fits its hints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The panel streams answers over the chat SSE client: chats menu, draft
made on first send, steps folds, learning lines, stats, actions taken
with undo, prompt with quote and file chips, @ picker and / commands,
stop, rejoin, context meter and the no-model state. Speech plays MP3
through rodio and records the microphone through rodio's cpal input
(Rune's Player and Recorder do not run on Linux), with one voice for
the app and a player bar in the status bar. Learnings: the list with
its filters and a learning edited in place with debounced, versioned
saves that merge conflicts.

Shared: App gets an assistant field and two poll hooks; PageView gets
overlays; the assistant panel takes the shell's layer; flake adds
alsa-lib.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ticks the lines the port delivers, notes what waits for the graph,
boards and drawing window ports, adds the native differences (attachment
modal, Display menu, reveal on the route) and the new live scenes, and
refreshes the cargoHash for the similar crate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 3D tick of 3000 nodes takes ~17 ms in release, more than a frame:
the simulation now runs on a worker that publishes positions the
canvas copies each frame; pins, the alpha target and the reduced-motion
settle are commands. Adds a 3000-node scene and a benchmark, and ticks
the graph's parity lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
#	crates/quartz-app/Cargo.toml
#	crates/quartz-app/src/features/files/file_view.rs
#	crates/quartz-app/src/scenes.rs
#	docs/architecture.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runtime tests for the panel (send, stop, chats menu, folds, undo, quote,
commands, no model, read aloud) and the learnings pages; an ignored test
and the live-assistant and live-learnings scenes against the dev server
with the mock model. Parity lines 254-288, the differences table, the
development guide for the mock model, and the cargoHash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Laying out 3000 hidden buttons cost ~10 ms a frame while the graph
animates; past 400 files the list is built while an assistive client
reads the window (Tx::assistive_technology).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
#	crates/quartz-app/Cargo.toml
#	crates/quartz-app/src/features/attachments/mod.rs
#	crates/quartz-app/src/features/shell/app_shell.rs
#	crates/quartz-app/src/routes/outlet.rs
#	docs/architecture.md
#	nix/package.nix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
#	crates/quartz-app/Cargo.toml
#	crates/quartz-app/src/app.rs
#	crates/quartz-app/src/features/shell/app_shell.rs
#	crates/quartz-app/src/routes/outlet.rs
#	crates/quartz-app/src/scenes.rs
#	docs/architecture.md
#	docs/development.md
#	nix/package.nix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
#	crates/quartz-app/Cargo.toml
#	crates/quartz-app/src/app.rs
#	crates/quartz-app/src/routes/outlet.rs
#	crates/quartz-app/src/scenes.rs
#	docs/architecture.md
#	docs/parity.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The host's insertions in flight show as chips under their line
(set_placeholders), a paste of files or a lone picture becomes
EditorEvent::PasteFiles, EditorView::inline drops the scroll view for a
README, and BlockRenderer::revision rebuilds rendered blocks when an
image or a live board changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppHost answers quartz-preview for notes and answers (spaces reached,
images fetched and decoded, folds, embedded boards); PreviewState for App
moves here from the assistant; PreviewRenderer draws the Styled editor's
rendered blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The find panel at the top (Mod-f, next, previous, match case, regexp via
the regex crate, by word, replace, replace all) across blocks in both
views, with Go to line (Mod-Alt-g), F3 and Mod-g. CodeMirror's default
keymap past what was there: select line, select next occurrence, indent
with Mod-[ and Mod-], toggle comment, matching bracket, Mod-Home/End.
Right-click on a link anywhere in the Styled view opens the link menu;
Shift, plain text and the selection get a plain Cut/Copy/Paste menu. The
selection bar emits ReadAloud for the host. A caret a click leaves before
a hidden prefix or inside a hidden marker steps out of it. Inline mode
and build_detached for hosts without a Cx.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A board card's notes edit like a note's text: local edits under the local
origin, an undo manager scoped to that text, a change log by version.
DocumentHandle publishes and reads carets relative to a nested text, and
every document kind knows the user so a board can publish them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A NoteEditor per open note over DocBuffer, made when the route's document
arrives and dropped with it; the README edits inline with its tools in the
page header and status bar. Settings come from the account (layout and
line numbers written back), the route's reveal and the broken links button
select, new notes focus the editor, Mod-click opens links as the web does.
Uploads (slash menu, drop, paste) and the slash menu's new note, drawing
and board insert at Yjs relative positions behind Uploading/Creating
chips. Read aloud in the note header. Scenes and Runtime tests; a live
test with two accounts co-editing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The events feed and collab socket reconnect at once when the desktop
portal reports the network back (the web's `online` event); a files
event refetches assigned tasks; the collab silence limit is the
provider's 30 s; release and awareness use the lowercased document id.
Toasts stay 5 s, stack four and wait while hovered; a confirm dialog
focuses Cancel and Return presses it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings > AI assistant ports AssistantTab: the AI features and Learn
about me switches, the shared connection, and the own model rows (Chat,
Speech to text, Text to speech, Chat titles, Compaction) with their
status badges. Each row opens the EndpointForm port: base URL, a model
field offering the endpoint's listed models (asked 400 ms after the URL
and key settle), reasoning effort, context limit, voice and a stored or
replaced API key. Admin > AI assistant sets up and changes the server's
models with the same form instead of sending people to the browser.

putAssistant takes JSON with explicit nulls (a removed model, a cleared
key or limit), which the generated body types cannot hold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Event::ForwardAwareness sends awareness states that changed outside the
session (a drawing window's port), as the provider sends any change;
Session::repair_elements settles keep-newest repairs that data applied
outside the session queued.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Command::OpenDrawingWindow opens a quartz-draw window, holding the
drawing's document like any view; a relay task answers each page session
with a PortConnection, forwards the replica's other updates and awareness
to the window and the window's awareness to the server, and reports
Opened, Error, Restarted, OpenLink and Closed. Windows follow the app's
theme and the drawing's renames. Tested offline and live with a fake
helper (tests/draw_relay.rs); examples/draw_window opens a real one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The space picture's colour (`pictureTint`: `picture_color` on the
picture drawn 32 px square) is read once per decoded picture; the space
home hero's radial wash takes it, else the accent. Only the hero's tint
changes in space_home.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drawings are painted from their elements (shapes, fills, arrowheads,
curves, freehand, text, images, Excalidraw's dark filter); the inline
embed fits the note's width with the web's placeholder and cards; a press
or Edit drawing opens the drawing window, which shares the replica.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sidebar and assistant handles are the web's PanelHandle: drag to
resize within the limits and the room left, closer than 120 (assistant
200) to the edge to collapse, out from the rail or the 4 px edge strip
to open; double-click resets; arrows, Shift, Home, End and Enter on the
keyboard. They lie over rune-kit's grip, which collapses below half the
minimum and takes no keys. Shell keys are written only once the stored
ones are read back, so start-up defaults never overwrite them.

A page whose view panics shows "This page hit an error" with Try again
inside the shell; the shell's own panic shows "Quartz hit an error"; a
link to a path with no page shows "Nothing here".

Web and quartz:// links of a known server open the same view in its
profile, from Mod-V on the window, the command line or the desktop
entry's %u (one running app in release builds); packaging/README.md
registers the scheme on each platform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Marks cookie login, media players and the editor playground as
deliberate differences, and lists the new ones (error boundaries,
confirm Return, tooltip glyphs, toast hover, network monitor, model
list, panel handle) in architecture.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lists the mock endpoint's models, saves an own speech-to-text model and a server title model, and removes both with an explicit null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A NoteBody over a MemoryBuffer replica replaces the plain field: inline,
Raw/Styled toggle in the header, vim mode in the status bar, the server's
newer body written in as a non-undoable diff that is not saved back, and
typing seen by the debounced save. Uploads toast "Learnings take no
files" as the web does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CardBuffer is the editor's NoteBuffer over the card's body Y.Text through
quartz_sync::TextBinding (own undo, change log), publishing and reading
carets in the board's awareness. The drawer's notes and a scene with it;
parity and differences updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Against the dev server: an upload, a new board and a new drawing land in
the note (the drawing window is asked for), and an edit typed offline
holds the quit prompt until it is sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	nix/package.nix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	crates/quartz-app/src/app.rs
#	crates/quartz-sync/src/engine/mod.rs
#	crates/quartz-sync/src/lib.rs
#	docs/parity.md
#	nix/package.nix
Also wires what the parallel branches left for each other: the editor's
selection bar reads aloud through the speech feature (under the note's
read-aloud key, so the header stops it too), and notes draw embedded
drawings natively through AppHost::with_drawing. The outline test now
expects the caret after the hidden heading prefix (parity 88).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upload's toast and the model form's closing come with each request's
own answer, which can land after the events feed or the status refetch
the tests already waited for; the moved note gets a name per run so
reruns against one server do not collide. The drawing request may be
taken by the embeds feature before the test reads its queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
marti merged commit 5b8d7c6382 into develop 2026-11-16 22:05:32 +01:00
marti deleted branch feature/native-app 2026-11-16 22:05:54 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
quartz/app!1
No description provided.