a71e294566
- specs: mobile-and-sync, collaboration, vault-launcher, e2ee, attachments-and-history, capture-and-publish, agents (brief and orchestrator notes for MiniMax and GLM agents) - research: sync landscape, security and server, mobile platform (browsed, cited) - design/mobile: 24 PaperCraft exports (dark and light) of the phone, desktop, sharing and launcher screens - .claude: project skills and path rules so delegated agents follow the repo rules; CLAUDE.md imports AGENTS.md - ARCHITECTURE and ROADMAP updated; AGENTS.md lists the approved sync dependencies Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
4.9 KiB
4.9 KiB
Vault launcher (main menu)
Problem
Today the app opens the newest recent vault or throws up a folder dialog; recents live only in the File menu (5 entries, no metadata). With many local vaults, shared folders and server vaults there is no place to see them all, pick one, or manage the list. A vault is bound to one Session for the life of the process, so switching relaunches the app.
Goal
A launcher screen: on start (when no vault is forced), from File > Vaults, and when a vault is closed, it lists every vault the user can open, with status, and offers Open folder, Create, Connect to server and Join with a code.
Non-Goals
- Opening two vaults in one window (the session stays one vault per window; "open in new window" is allowed).
- Cloud vault browsing without a connected server; templates gallery (rail entry is a placeholder in v1).
Behaviour
- Launcher shows when: no recent vault exists or none is found on disk; the user passes
--launcher; the user chooses File > Vaults... or closes the vault; the user holds Shift at start (desktop). A plain launch with a valid recent still reopens it directly (setting "Reopen last vault", default on). - Recent list (design
design/mobile/14-home-vaults-desktop.png): per vault name, path, last opened, sync pill (Synced, N changes waiting, Not synced, Offline, Error), role badge and avatars when shared, pinned first, then newest first; filter field; missing folders shown with "folder not found" and Remove from list; row menu: Open, Open in new window, Reveal in file manager, Rename, Pin/Unpin, Copy path, Remove from list (never deletes files). - Actions: Open folder as vault (native dialog; Obsidian vaults open as they are), Create new vault (name + folder, optional "also create on server"), Connect to server (lists
GET /v1/vaultsentries not yet bound, then a folder to sync into), Join with a code (shared folder invite, see collaboration spec). - Left rail: Vaults, Shared with me (vaults where I am not owner), Servers (accounts and servers I paired, with sign out), Templates (placeholder), Settings, Help.
- Phone (design
15-vaults-phone.png): one column "On this phone" and "On your server" (tap Connect), buttons New vault and Join. - Data:
AppSettings.recent_vaultsstays (compat); newvault_catalog: BTreeMap<path, VaultMeta{name, pinned, last_opened_ms}>with the existing repair rules (cap 200 entries, hostile data repaired not trusted). Sync status is read cheaply from<vault>/.notescraft/sync/binding.jsonandstate.json(no network at launch); live status arrives after a vault opens or a background refresh runs. - Cap and safety: the launcher never opens a folder at list time (no indexing); reading metadata of 200 vaults takes under 100 ms; a vault on a missing volume must not block the UI (stat on a worker thread with a 500 ms budget).
Acceptance Criteria
- Given 12 recent vaults (2 pinned, 1 missing), the launcher lists pinned first, then newest first, marks the missing one, and Remove from list drops it without touching disk.
- Given a vault bound to a server, its row shows the sync pill derived from local files only, with no network call at launch.
- Given Open in new window, a second process opens that vault while the launcher stays open.
- Given Create new vault with a name that exists as a folder, the app refuses with a message and creates nothing.
- Given keyboard only, Up/Down moves the selection, Enter opens, Cmd/Ctrl+F focuses the filter, Delete asks before removing from the list.
- Given a 390 pt window, the launcher uses the phone layout with 44 pt targets.
Tasks
- Engine catalog (
vault_catalog, repair, commandsvaults.list/pin/rename/remove), briefscripts/mm/vault-catalog.md. Done 2026-10-20 by GLM 5.3 Flash through Pi: 19 tests, clippy clean, verified by the orchestrator. Launcherview inui-egui(desktop and phone layout), 11 driven tests,examples/launcher.rs. Started by GLM 5.3 Flash via Pi until its quota ended; finished by the orchestrator (fixedformat_agomixing days and milliseconds, Cmd/Ctrl+F focus, optimistic rename, 7 clippy lints). Polish left: pin star spacing, avatar initials, filter field box, wrapped card descriptions.- Host wiring in
apps/notescraft(launcher_window.rs): the launcher shows when no recent vault exists or with--launcher; Open and Open-in-new-window start the vault as its own process; Pin, Rename, Remove go through the new pure catalog functionsset_pinned,set_name,forget(shared with thevaults.*commands); every opened vault is recorded withtouch. Not checked in a live window (this session cannot paint one). The File > Vaults... menu entry (commandui.open_launcher, requestVaultRequest::Launcher) is done. Still open: Connect to server and Join with a code actions (need the sync UI). - Server vaults in the launcher (needs accounts task of
specs/collaboration).