rename: the desktop is Inkwell — crates, Tauri identity, data move, packaging

Step 3 of milestone 481 (Scribe note 5071: a full rename).

- crates thoughtsync-{core,desktop,ffi,uniffi-bindgen} → inkwell-*, the
  Cargo.lock entries moved to match (checked with `cargo metadata --locked`)
- Tauri: productName "Inkwell", identifier com.fabledsword.inkwell, binary
  `inkwell`, updater feed on bvandeusen/inkwell, store file inkwell.db
- client agent inkwell-desktop, headers X-Inkwell-Client/-Protocol (the server
  reads neither), capture event inkwell://captured, display-version env
- .deb: conflicts + replaces thought-sync, so the updater's install retires the
  old package instead of colliding on it. kebab-case("Inkwell") is `inkwell`, so
  the package name finally matches the command and verify.sh now asserts it
- pacman: inkwell, conflicting with and replacing thoughtsync and
  thoughtsync-desktop
- AppImage ~/Applications/Inkwell.AppImage, menu entry inkwell.desktop,
  installer, release titles, desktop asset names in fetch-clients.sh

The one shim, chosen by the operator because it is the only copy of a
local-first user's notes: crossover.rs moves the old
com.fabledsword.thoughtsync app-data dir's contents into the new one on startup,
before the store opens, renaming thoughtsync.db and its -wal/-shm with it. It
skips when the new dir already has a store, and anything already in the new dir
wins (the installer writes its channel marker there first). Tested.

Android's Kotlin side (package, applicationId, uniffi class) is step 4. Its
release asset names stay thoughtsync.* until then.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-06 14:27:26 -04:00
co-authored by Claude Opus 5.5
parent a706644455
commit fe6f0746b2
37 changed files with 453 additions and 247 deletions
+8 -8
View File
@@ -1,7 +1,7 @@
//! Linux AppImage desktop integration.
//!
//! A bare AppImage is a portable file with no menu entry — deleting it uninstalls
//! the app. These commands let ThoughtSync install itself into the application menu
//! the app. These commands let Inkwell install itself into the application menu
//! (a `.desktop` launcher + icon) and keep a stable copy in `~/Applications`, so it
//! behaves like an installed app, and remove that again. No external helper
//! (AppImageLauncher / Gear Lever) is required.
@@ -20,9 +20,9 @@ use serde::Serialize;
// internal layout. Written to the user icon dir on integrate.
const APP_ICON: &[u8] = include_bytes!("../app-icon.png");
const DESKTOP_ENTRY_NAME: &str = "thoughtsync.desktop";
const ICON_FILE_NAME: &str = "thoughtsync.png";
const INSTALLED_APPIMAGE_NAME: &str = "ThoughtSync.AppImage";
const DESKTOP_ENTRY_NAME: &str = "inkwell.desktop";
const ICON_FILE_NAME: &str = "inkwell.png";
const INSTALLED_APPIMAGE_NAME: &str = "Inkwell.AppImage";
#[derive(Serialize)]
pub struct IntegrationStatus {
@@ -89,7 +89,7 @@ pub fn integrate_desktop() -> Result<IntegrationStatus, String> {
// StartupWMClass is the exception: it must be the BINARY name, because GTK
// derives the window's WM_CLASS from the executable and the desktop matches the
// two to group the taskbar icon. Not the product name, and not this AppImage's
// filename — AppRun execs `usr/bin/thoughtsync` inside it (issue 2075).
// filename — AppRun execs `usr/bin/inkwell` inside it (issue 2075).
let entry = desktop_entry_path().ok_or("Cannot resolve the applications dir.")?;
if let Some(parent) = entry.parent() {
fs::create_dir_all(parent).map_err(|e| format!("create applications dir: {e}"))?;
@@ -97,13 +97,13 @@ pub fn integrate_desktop() -> Result<IntegrationStatus, String> {
let contents = format!(
"[Desktop Entry]\n\
Type=Application\n\
Name=ThoughtSync\n\
Name=Inkwell\n\
Comment=Capture a fleeting thought in a second\n\
Exec={exec} %U\n\
Icon={icon}\n\
Terminal=false\n\
Categories=Utility;Office;\n\
StartupWMClass=thoughtsync\n",
StartupWMClass=inkwell\n",
exec = installed.to_string_lossy(),
icon = icon.to_string_lossy(),
);
@@ -122,7 +122,7 @@ pub fn unintegrate_desktop() -> Result<IntegrationStatus, String> {
if let Some(icon) = icon_path() {
remove_if_exists(&icon)?;
}
// Intentionally keep ~/Applications/ThoughtSync.AppImage: it may be the running
// Intentionally keep ~/Applications/Inkwell.AppImage: it may be the running
// binary, and removing it would delete the app the user is using. Un-integrate
// only removes the menu entry.
refresh_desktop_database(&home);