desktop M10.5: wire the offline local source; boot to board with no server
CI & Build / Python lint (push) Successful in 4s
CI & Build / TypeScript typecheck (push) Successful in 7s
CI & Build / Python tests (push) Successful in 10s
CI & Build / Build & push image (push) Successful in 34s
Desktop (Tauri) / Tauri desktop (Linux) (push) Failing after 57s

adapters/local.ts implements the repository seam over the M10.4 Tauri commands
via invoke (camelCase args -> the commands' snake_case params); adapters/index.ts
now selects local when running in the desktop shell, rest on web. bridge.ts
exports invoke for it.

This is the commit that resolves the black screen: a fresh desktop launch reads
config + session + notes from the on-device SQLite core, so the router's auth
gate passes with a synthetic local user and the board renders with zero server
and zero account. Account auth, device linking, attachment upload, URL unfurl and
file import reject with a "connect a server" message (no offline meaning yet);
everything else — board, editor, capture, search, filters, labels, checklists,
reminders — works fully offline.

desktop.yml also now rebuilds the app on frontend adapter/bridge changes, since
the desktop bundle embeds the frontend.

Task 1994.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
This commit is contained in:
2026-07-24 23:05:04 -04:00
co-authored by Claude Opus 4.8
parent dbe1425bd2
commit 41cf4b3598
4 changed files with 98 additions and 11 deletions
+7 -10
View File
@@ -1,19 +1,16 @@
// The data source the whole app uses. Import `repo` from here — never reach for
// `api/client` in stores/views.
//
// Today it always resolves to the REST source. M10.5 adds the offline desktop
// source (`local.ts`, over Tauri `invoke`) and flips this to a runtime choice:
//
// import { isDesktop } from "../desktop/bridge";
// import { local } from "./local";
// export const repo: Repo = isDesktop() && !hasConfiguredServer() ? local : rest;
//
// so a fresh desktop launch runs fully offline, and a server-connected one keeps
// using REST. Web is unaffected.
// The desktop shell runs fully offline against the on-device SQLite core
// (`local.ts`, over Tauri `invoke`); the web build uses REST. A server-connected
// desktop (opt-in sync) comes in M10.7 — at which point this becomes
// `isDesktop() && !hasConfiguredServer() ? local : rest`.
import { isDesktop } from "../desktop/bridge";
import { rest } from "./rest";
import { local } from "./local";
import type { Repo } from "./repo";
export const repo: Repo = rest;
export const repo: Repo = isDesktop() ? local : rest;
export type { Repo } from "./repo";