Android / Build, or is the channel already serving this? (push) Successful in 4s
CI & Build / Build now, or wait for Android? (push) Successful in 4s
Android / Kotlin + Rust (APK) (push) Skipped
CI & Build / Python lint (push) Successful in 5s
Desktop (Tauri) / Build, or is the channel already serving this? (push) Successful in 3s
CI & Build / TypeScript typecheck (push) Successful in 8s
CI & Build / Python tests (push) Successful in 13s
CI & Build / integration (push) Successful in 21s
Desktop (Tauri) / Tauri desktop (Linux) (push) Failing after 30s
Desktop (Tauri) / Windows installer (cross-compiled) (push) Failing after 35s
Desktop (Tauri) / Update manifest (push) Skipped
CI & Build / Build & push image (push) Successful in 35s
The other half of #1899. Press the combination anywhere and a 520x220 window arrives over whatever you were doing; type, Ctrl/Cmd+Enter, it is gone. The board never comes forward, which is the whole point — bringing the app up to write one line is the friction this removes. ## There is no default shortcut, deliberately A global shortcut is the one setting here that can collide with software this app knows nothing about. Any default is a key combination taken away from something on somebody's machine, silently, at install time. So the feature is OFF until a combination is chosen, and choosing one is how it turns on. CommandOrControl+Shift+N is offered as a one-click suggestion, never applied on the user's behalf. ## Stored and live are reported separately `CaptureShortcut` carries both `shortcut` and `registered`, because they genuinely disagree: a combination another app grabbed first is saved and does nothing when pressed, and on Wayland a compositor may refuse global grabs outright. Saying only "your shortcut is X" would be a lie with a keystroke attached, so the settings row says "saved but isn't active — something else is holding it". `capture_shortcut_set` registers BEFORE storing, so a combination the system refuses is never written down as though it worked. Registration at startup is best-effort and logged: a shortcut that worked when it was chosen can be taken by something installed later, and the app must still open. ## Two windows, one database, no shared store The capture window runs a second copy of the frontend with its own Pinia stores, so a note saved there is invisible to the board until it is told. It is told — `capture_done(saved)` emits to `main`, and BoardView reloads. The emit failing is cosmetic (the note is already in SQLite) so it is logged, not raised. The window is opened at `index.html?capture=1` rather than at `/capture` because the bundled assets are served as FILES: a path with no file behind it 404s in the production build while routing fine under the dev server. The router turns the query into the route. It is hidden rather than closed on the way out, and it keeps its text. A capture interrupted by something more urgent is still there on the next press, which is what makes Escape safe to press. A failed save also keeps the window open holding the text — hiding it would throw away the only copy of something just written in order to report a problem you could retry your way out of. ## Where the setting lives Rule 25 says a tunable belongs in the UI, and this one has to be. It sits in the desktop's Sync screen beside the update channel, not in admin Settings: that screen is the SERVER's and bounces on desktop anyway, while this is a property of one installation on one machine. Persisted with the same `store::set_pref` the update channel uses. No @tauri-apps/api dependency was added — everything routes through `invoke` and the `withGlobalTauri` global, as the rest of the bridge does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K3MMqUtzX1TJgA1oypvm1c
72 lines
3.4 KiB
TOML
72 lines
3.4 KiB
TOML
[package]
|
|
name = "thoughtsync-desktop"
|
|
# NOT THE SHIPPED VERSION, and bumping it has no effect on anything a user sees.
|
|
#
|
|
# Cargo requires a version here, and Tauri reads one from `tauri.conf.json` — both
|
|
# are overridden per build by `cargo tauri build --config '{"version": ...}'` with
|
|
# the value `packaging/version.sh key desktop` derives. See #3144.
|
|
#
|
|
# It used to matter: the old scheme took its base from this line and appended the CI
|
|
# run number on dev, so `0.2.<run>` on dev sat against a bare `0.2.0` on main and
|
|
# every dev build outranked every stable one. The remedy was "remember to bump the
|
|
# minor before tagging" — documented in a comment, enforced nowhere, and #2183 is
|
|
# what that looked like in the field. A scheme needing a human to remember something
|
|
# before each release has not removed the decision, only hidden it.
|
|
version = "0.2.0"
|
|
description = "ThoughtSync desktop — local-first Keep-style thought capture"
|
|
authors = ["bvandeusen"]
|
|
edition = "2021"
|
|
# The executable is named below, not inferred from this package name. Off so the
|
|
# inferred `thoughtsync-desktop` target and the explicit one can't both claim
|
|
# src/main.rs.
|
|
autobins = false
|
|
|
|
# App logic lives in the library (Tauri v2 pattern: a single `run()` entry point);
|
|
# main.rs is a thin shim.
|
|
#
|
|
# rlib only. The staticlib/cdylib types existed for Tauri mobile, which Android no
|
|
# longer uses — it is a native Kotlin client over `thoughtsync-core` instead
|
|
# (Scribe note 2730), and the .so it loads is built from that crate, not this one.
|
|
[lib]
|
|
name = "thoughtsync_desktop_lib"
|
|
crate-type = ["rlib"]
|
|
|
|
# The shipped command is `thoughtsync` on every install channel, and the binary's
|
|
# own name is what the desktop actually keys on: GTK derives the window's WM_CLASS
|
|
# from it, and Tauri's generated .desktop file sets StartupWMClass to that same
|
|
# name. (Written without braces on purpose: `tauri android init` round-trips this
|
|
# file through a TOML serializer that reformats brace tokens inside comments.)
|
|
# So the canonical name has to be carried by the build target itself, not just by
|
|
# the path it gets installed to (issue 2075). The crate stays `thoughtsync-desktop`
|
|
# — only the executable is renamed. `thoughtsync` is also fixed under kebab-casing,
|
|
# which the AppImage bundler applies to the binary name on its way in.
|
|
[[bin]]
|
|
name = "thoughtsync"
|
|
path = "src/main.rs"
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
# The framework-free client core: local SQLite store + sync engine. Shared with the
|
|
# Android client, which binds the same crate through uniffi (Scribe note 2730).
|
|
thoughtsync-core = { path = "../../core" }
|
|
|
|
tauri = { version = "2", features = [] }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
# Startup + operation logging to stdout AND a persistent file, so portability
|
|
# issues are diagnosable from any environment.
|
|
tauri-plugin-log = "2"
|
|
# In-app updates (M10.9). Signature verification is minisign; the public half lives
|
|
# in tauri.conf.json and the private half only ever as a CI secret. Desktop only —
|
|
# the plugin declares android support level "none", which is why the Android client
|
|
# gets a server-served update path instead (Scribe note 2725).
|
|
tauri-plugin-updater = "2"
|
|
|
|
# The system-wide quick-capture hotkey. Desktop only by nature — Android has no
|
|
# concept of a global shortcut, and its half of this feature is a share-sheet
|
|
# intent filter instead.
|
|
tauri-plugin-global-shortcut = "2"
|