Skip to content

Add Schist Cloud integration for desktop and WASM - #115

Open
IAmJSD wants to merge 26 commits into
mainfrom
feat/schist-cloud
Open

Add Schist Cloud integration for desktop and WASM#115
IAmJSD wants to merge 26 commits into
mainfrom
feat/schist-cloud

Conversation

@IAmJSD

@IAmJSD IAmJSD commented Sep 4, 2026

Copy link
Copy Markdown
Member

Adds Schist Cloud to the desktop app and hosted WASM editor: live folders and buckets, scoped searches and filters, uploads/downloads, and collaborative image editing. Workspace operations and Yjs-compatible binary updates share one authenticated MessagePack WebSocket. The existing generation API retains its separate per-job stream.

Desktop sign-in prompts for a provider domain with schist.app prefilled, registers the native callback on Linux/macOS/Windows, and stores credentials in the OS credential store. Browser sign-in is restricted to https://try.schist.app connecting to schist.app. A popup returns a state-bound, verifier-bound authorization code without replacing the editor page; the client checks its origin, popup identity and state. Browser credentials remain in tab memory.

The new schist-document library and standalone MessagePack worker share the image model and built-in codec registry between the editor and provider. PSD registration is shared with the desktop app, and the model retains WASM-compatible undo timing.

Documents bind to asset IDs and preserve their folder association. Collaborative property/tile updates support reconnect synchronization, local undo and native crash recovery. Capability discovery controls supported models, export choices, negotiated frame limits and merged-document limits. Revision-conflicted downloads fetch fresh tickets, retaining HTTP metadata and revisions. Terminal document errors preserve local edits and require explicit reopening before sync resumes.

Local files/folders upload through signed HTTPS tickets; remote folder drops add bucket references. WASM file/folder pickers retain relative paths, and downloads use the browser download flow. Native filesystem dragging and recovery across page reloads remain desktop features. Backend downloads now serve through the provider, including S3-backed files, without requiring storage bucket CORS.

Coordinated backend changes are pushed to schist-cloud. Both the Markdown protocol and TypeScript reference include the browser extension. No TypeScript implementation or tests are added to this Schist PR.

Validation:

  • 14 native cloud tests, 11 shared-document/codec tests, and the editor binding-lifecycle regression pass.
  • 13 WASM tests pass in Chromium, including the browser WebSocket adapter, binary messages, provider rejection, concurrent document edits and undo.
  • Desktop and WASM app checks, formatting, and Clippy with warnings denied pass through Make.
  • Backend: 30 tests, TypeScript checking, lint, and production build pass.
  • make check-cloud-wasm adds a repeatable browser test target.

Live WorkOS sign-in and account persistence have not been exercised against a real provider account. Browser adapter tests use a mock WebSocket peer in Chromium; they do not replace a deployed-provider smoke test. Browser edits survive socket reconnects in the current tab, but there is no filesystem crash recovery across page reloads.

@IAmJSD IAmJSD changed the title feat: add native Schist Cloud integration Add Schist Cloud integration for desktop and WASM Sep 4, 2026
IAmJSD and others added 15 commits September 6, 2026 21:54
… search

The cloud view was a bolt-on: bare buttons, no grouping, search in a
dialog, and thumbnails that never loaded. The shared chrome (palette,
top strip, tray, sidebar rows, grid frame and scrollbar, cell, drag
ghost, menu frame, GroupBy) now lives in gallery_chrome.rs, so the
local and cloud galleries are the same room. The cloud sidebar lists
the library, a folder tree and buckets with right-click menus; the
grid groups the page by month or folder; the search box sits in the
strip and queries the provider as you type; filters have a button and
a chip. Both search boxes share ui::LineEdit. The browser build
composes its gallery from the same parts.

Thumbnails: the provider's socket snapshots sent thumbnail_url: null
(fixed in schist-cloud 9b042b7 with signed thumbnail tickets); the
client now records failed fetches and shows 'no preview' for them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cloud folders now hang under a ☁ Schist Cloud root inside FOLDERS and cloud
buckets sit in BUCKETS with the same badge, instead of a separate section.
With a cloud signed in, + Add folder… and + New bucket ask whether you mean
this computer or Schist Cloud. Connecting (including a stored login at
launch) no longer opens the cloud gallery over whatever was on screen.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The Filters… form (MIME types, tags, edited, content, rating, dates, bounds
as free text) is gone from the strip, the sidebar and the browser gallery.
Search stays in the strip and the map filter keeps its chip; smart-bucket
rules still carry their own fields.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The local-or-cloud menus behind + Add folder… and + New bucket sit on the
library's context, which the cloud room never rendered, so clicking either
with a cloud item selected did nothing.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
New and Edit for a Schist Cloud bucket now open the same New Bucket dialog
as a local one — name, search, an area drawn on the map with the presets —
and send the result to the provider as the bucket's rule. The free-text
field form is gone from desktop; the browser keeps a name-and-search form
since it has no map.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Right-clicking a cloud bucket now offers Edit bucket…, Select all (N), Save
all as ZIP… (N), Process all… (N), Move all to folder…, Clear added photos /
Clear bucket and Delete bucket. ZIP and batch walk the bucket through the
provider's assets.query request and download each photo; Process all stages
the originals in a scratch folder and the batch dialog saves to a chosen
folder. Move and Clear use the provider's asset.move and bucket.clear.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
IAmJSD and others added 11 commits September 6, 2026 23:04
Right-click menus for cloud rows now open in the local room and vice
versa, and the cloud menu uses the same list rows as the local one. VIEW
stays in both rooms; World Map plots the cloud page by each asset's new
location field, with markers, strip and marker menu shared with local
photos. PEOPLE lists local people in both rooms and the cloud's people
beneath them, styled alike, with rename/merge/forget on right-click.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…TTPS agent

Cloud folder rows and the Schist Cloud root offer Upload files here…, Upload
folder here… and Download folder… (Download everything… at the root), which
recreates the cloud's sub-folders on disk. A watched local folder's row gets
Upload to Schist Cloud…, asking for the destination folder.

Every thumbnail fetch and download used to build a fresh ureq agent, paying
a TLS handshake and root-store load each time; one shared agent now pools
connections. Thumbnails fetch eight at a time and stay decoded for a few
pages, so paging back is instant.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The cloud world map drew only the 200 assets of the page on show, so a
library sorted by name put almost nothing on the map. It now fetches every
located photo in the scope (the provider's bounds filter doubles as a
has-a-fix test) once per change, up to 5000, and loads thumbnails for the
markers in view alongside the page's.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Dropping local photos on a cloud folder or bucket uploaded them one by one
and said nothing until the end. Files now go up in gzip batches of up to
48 MiB or 250 files — several payloads for a big drop — through the
provider's asset.prepare_batch/commit_batch, falling back to single
uploads on a provider without them. The tray in either room shows a bar
with the running count; sub-folders in the drop become cloud folders.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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