DRY pass #2, batch 8: the Rust and ffi docs (#5372)

sync/mod.rs listed 5 of its 9 modules; migrate's doc sat above the v9 SQL;
client.rs had items after its test module; the ffi's sync_now doc had fused
into client_update's; complete_reminder (ffi and EditorAction) still said
recurrence advancement was to come, though the core does it; NoteQuery.view
listed views the core never matched and claimed it validated. Test scratch
dirs drop the old ts-/iw- prefixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 15:05:43 -04:00
co-authored by Claude Opus 5.5
parent 2ce68f578a
commit 63abff8681
9 changed files with 93 additions and 90 deletions
@@ -80,10 +80,9 @@ sealed interface EditorAction {
/**
* Mark the reminder dealt with.
*
* Distinct from [ClearReminder] even though the core does the same thing to
* the column today: this is where recurrence advancement lands when it is
* built, so a recurring reminder finished through the generic clear would
* silently stop recurring.
* Distinct from [ClearReminder]: a recurring reminder moves on to its next
* occurrence here, and only a one-off is cleared, so a recurring reminder
* finished through the generic clear would stop recurring.
*/
data object CompleteReminder : EditorAction
+8 -10
View File
@@ -291,11 +291,9 @@ impl Inkwell {
/// Clear the reminder, marking it dealt with.
///
/// Distinct from `NoteEdit::ClearRemindAt` even though today they do the same
/// thing: the core reserves this one for "the reminder fired and is finished",
/// which is where recurrence advancement lands when it is built. A UI that
/// called the generic clear instead would silently stop recurring reminders
/// from recurring the day that changes.
/// Distinct from `NoteEdit::ClearRemindAt`: a recurring reminder moves on to its
/// next occurrence here, and only a one-off is cleared. A UI that called the
/// generic clear instead would stop a recurring reminder from recurring.
pub fn complete_reminder(&self, id: String) -> Result<Note, CoreError> {
let conn = self.db.conn().map_err(CoreError::store)?;
local::store::complete_reminder(&conn, &id)
@@ -539,11 +537,6 @@ impl Inkwell {
Ok(revoked.into())
}
/// Run one full sync: push local changes, then pull the server's.
///
/// The only sync entry point, on purpose. Push and pull exist separately inside
/// the core, but offering a bare "pull" would let the UI overwrite unsent local
/// edits — the ordering isn't a suggestion, it's what keeps them.
/// The Android client the linked server is offering, if any.
///
/// `None` covers two different-looking situations that are one answer to the
@@ -592,6 +585,11 @@ impl Inkwell {
.map_err(CoreError::network)
}
/// Run one full sync: push local changes, then pull the server's.
///
/// The only sync entry point, on purpose. Push and pull exist separately inside
/// the core, but offering a bare "pull" would let the UI overwrite unsent local
/// edits — the ordering isn't a suggestion, it's what keeps them.
pub async fn sync_now(&self) -> Result<SyncOutcome, CoreError> {
let (base_url, token) = self.credentials()?;
engine::run_cycle(&self.db, &self.blobs, &base_url, &token)
+2 -1
View File
@@ -358,7 +358,8 @@ impl From<core_models::Label> for Label {
/// What the board is asking for. Mirrors the core's `ListQuery`.
#[derive(Debug, Clone, uniffi::Record)]
pub struct NoteQuery {
/// "notes" | "archive" | "trash" | "reminders" | "labels" — the core validates.
/// "trash" | "archived"; anything else is the board. The core doesn't reject an
/// unknown one, so a typo shows the board rather than failing.
pub view: String,
pub label_id: Option<String>,
pub sort: Option<String>,