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:
@@ -1,4 +1,4 @@
|
||||
//! uniffi bindings: `thoughtsync-core` as seen from Kotlin.
|
||||
//! uniffi bindings: `inkwell-core` as seen from Kotlin.
|
||||
//!
|
||||
//! This crate is to Android what `desktop/src-tauri/src/commands/` is to the desktop
|
||||
//! — a thin shim over the shared core, holding no logic of its own. If something here
|
||||
@@ -38,9 +38,9 @@ pub mod models;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::Arc;
|
||||
|
||||
use thoughtsync_core::local::{self, Db};
|
||||
use thoughtsync_core::sync::blobs::BlobStore;
|
||||
use thoughtsync_core::sync::{client, compat, engine, push, state};
|
||||
use inkwell_core::local::{self, Db};
|
||||
use inkwell_core::sync::blobs::BlobStore;
|
||||
use inkwell_core::sync::{client, compat, engine, push, state};
|
||||
|
||||
use models::{
|
||||
patch_from, BodyItem, BodyTag, ClientUpdate, Identity, Label, Note, NoteDraft, NoteEdit,
|
||||
@@ -120,14 +120,14 @@ impl ThoughtSync {
|
||||
///
|
||||
/// `data_dir` comes from Kotlin because only Android knows where its app-private
|
||||
/// storage is; the core must not guess at a platform path. The layout inside is
|
||||
/// the core's business and matches the desktop's exactly — `thoughtsync.db` and
|
||||
/// the core's business and matches the desktop's exactly — `inkwell.db` and
|
||||
/// `blobs/` — so a store is readable by any client that opens it.
|
||||
#[uniffi::constructor]
|
||||
pub fn new(data_dir: String) -> Result<Arc<Self>, CoreError> {
|
||||
let dir = PathBuf::from(data_dir);
|
||||
std::fs::create_dir_all(&dir).map_err(CoreError::store)?;
|
||||
|
||||
let db = local::open(&dir.join("thoughtsync.db")).map_err(CoreError::store)?;
|
||||
let db = local::open(&dir.join("inkwell.db")).map_err(CoreError::store)?;
|
||||
log::info!("local store ready — {}", local::summary(&db));
|
||||
|
||||
let blobs = BlobStore::new(dir.join("blobs")).map_err(CoreError::store)?;
|
||||
@@ -583,7 +583,7 @@ pub fn checklist_render(text: String, checked: bool) -> String {
|
||||
///
|
||||
/// Android has to say so because the core cannot: the same crate is compiled into
|
||||
/// the desktop app, and it used to announce every phone in the field as
|
||||
/// `thoughtsync-desktop` carrying the CORE crate's version — a number no build
|
||||
/// `inkwell-desktop` carrying the CORE crate's version — a number no build
|
||||
/// stamps and nobody has seen. The honest value is the installed package's own
|
||||
/// `versionName`, which is what Kotlin passes here.
|
||||
///
|
||||
@@ -680,7 +680,7 @@ mod tests {
|
||||
use std::sync::atomic::{AtomicU32, Ordering};
|
||||
static NEXT: AtomicU32 = AtomicU32::new(0);
|
||||
let dir = std::env::temp_dir().join(format!(
|
||||
"thoughtsync-ffi-{}-{}",
|
||||
"inkwell-ffi-{}-{}",
|
||||
std::process::id(),
|
||||
NEXT.fetch_add(1, Ordering::Relaxed)
|
||||
));
|
||||
|
||||
+17
-17
@@ -1,6 +1,6 @@
|
||||
//! The types that cross into Kotlin.
|
||||
//!
|
||||
//! These MIRROR `thoughtsync_core::local::models` rather than reusing it. The core's
|
||||
//! These MIRROR `inkwell_core::local::models` rather than reusing it. The core's
|
||||
//! shapes are serde structs whose field names and optionality are contracted with the
|
||||
//! shared Vue frontend; hanging uniffi derives on them would couple two very
|
||||
//! different consumers to one definition and put a `serde_json::Value` (which has no
|
||||
@@ -13,13 +13,13 @@
|
||||
//! what to do with it. That is the entire reason for the `let Core { .. } = value`
|
||||
//! style here; please keep it.
|
||||
|
||||
use thoughtsync_core::local::models as core_models;
|
||||
use thoughtsync_core::sync::client as core_client;
|
||||
use thoughtsync_core::sync::compat as core_compat;
|
||||
use thoughtsync_core::sync::engine as core_engine;
|
||||
use thoughtsync_core::sync::pull as core_pull;
|
||||
use thoughtsync_core::sync::push as core_push;
|
||||
use thoughtsync_core::sync::state as core_state;
|
||||
use inkwell_core::local::models as core_models;
|
||||
use inkwell_core::sync::client as core_client;
|
||||
use inkwell_core::sync::compat as core_compat;
|
||||
use inkwell_core::sync::engine as core_engine;
|
||||
use inkwell_core::sync::pull as core_pull;
|
||||
use inkwell_core::sync::push as core_push;
|
||||
use inkwell_core::sync::state as core_state;
|
||||
|
||||
/// A note, with everything needed to render a card or open the editor.
|
||||
///
|
||||
@@ -60,9 +60,9 @@ pub struct BodyItem {
|
||||
pub checked: bool,
|
||||
}
|
||||
|
||||
impl From<thoughtsync_core::local::derive::DerivedItem> for BodyItem {
|
||||
fn from(i: thoughtsync_core::local::derive::DerivedItem) -> Self {
|
||||
let thoughtsync_core::local::derive::DerivedItem {
|
||||
impl From<inkwell_core::local::derive::DerivedItem> for BodyItem {
|
||||
fn from(i: inkwell_core::local::derive::DerivedItem) -> Self {
|
||||
let inkwell_core::local::derive::DerivedItem {
|
||||
text,
|
||||
checked,
|
||||
line,
|
||||
@@ -88,9 +88,9 @@ pub struct BodyTag {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
impl From<thoughtsync_core::local::derive::DerivedTag> for BodyTag {
|
||||
fn from(t: thoughtsync_core::local::derive::DerivedTag) -> Self {
|
||||
let thoughtsync_core::local::derive::DerivedTag {
|
||||
impl From<inkwell_core::local::derive::DerivedTag> for BodyTag {
|
||||
fn from(t: inkwell_core::local::derive::DerivedTag) -> Self {
|
||||
let inkwell_core::local::derive::DerivedTag {
|
||||
line,
|
||||
start,
|
||||
end,
|
||||
@@ -121,12 +121,12 @@ pub struct ClientUpdate {
|
||||
pub size: i64,
|
||||
}
|
||||
|
||||
impl From<thoughtsync_core::sync::client::ClientRelease> for ClientUpdate {
|
||||
fn from(r: thoughtsync_core::sync::client::ClientRelease) -> Self {
|
||||
impl From<inkwell_core::sync::client::ClientRelease> for ClientUpdate {
|
||||
fn from(r: inkwell_core::sync::client::ClientRelease) -> Self {
|
||||
// Destructured exhaustively, like every other conversion in this file: a
|
||||
// field added upstream stops this compiling until Android is told what to
|
||||
// do with it, which turns silent drift into a build error.
|
||||
let thoughtsync_core::sync::client::ClientRelease {
|
||||
let inkwell_core::sync::client::ClientRelease {
|
||||
version,
|
||||
version_code,
|
||||
size,
|
||||
|
||||
Reference in New Issue
Block a user