Skip to content

feat(plaud): support Plaud 4.0 sync and release 1.7.0 - #11

Merged
JeremyL691 merged 6 commits into
mainfrom
feat/plaud-v4-sync
Nov 21, 2026
Merged

JeremyL691 merged 6 commits into
mainfrom
feat/plaud-v4-sync

Conversation

@JeremyL691

@JeremyL691 JeremyL691 commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adapt Plaud synchronization to Plaud 4.0 (/file-app/v4/) while keeping non-migrated accounts on the existing /file/ routes.
  • Auto-detect migrated accounts on status: -1800907 (or a migrated to 4.0 message) without schema changes or reconnection.
  • Preserve library continuity by mapping pre-migration of_<id> file ids back to stored plaud_file_id rows and tombstones, while importing new f_<id> recordings with lazy detail hydration (serial_number, filesize, IANA timezone_iana offsets, and download size/MD5 fallback).
  • Support Plaud 4.0 audio selection (AUDIO_TRANSCODED, fallback to AUDIO, plus /file-app/v4/files/content/url), mid-sync workspace token re-minting on -419/-420, Plaud-native content import (including gzipped Markdown summaries and migrated task_status: null objects), title push via /file-app/v4/nodes/rename/{node_id} with -1800313 retry and container folder rename, and /device/list -1800907 connect fallback.
  • Avoid duplicating the Sync failed: prefix in the manual sync error toast.
  • Update spec/plaud.md, spec/desktop.md, CHANGELOG.md, fake Plaud server, contract tests, and workspace version files to 1.7.0.

Testing

  • rustup run 1.94.1 cargo fmt --all -- --check
  • rustup run 1.94.1 cargo clippy --workspace --all-targets -- -D warnings
  • rustup run 1.94.1 cargo test -p oah --lib (321 passed)
  • rustup run 1.94.1 cargo test -p oah --tests (358 passed)
  • rustup run 1.94.1 cargo test -p openaudiohub-desktop (34 passed)
  • pnpm --dir web typecheck && pnpm --dir web build
  • pnpm --dir extension typecheck && pnpm --dir extension test
  • bash contract-tests/run.sh server --grep "plaud" --reporter=line (57 passed)
  • bash contract-tests/run.sh server --reporter=line (464 passed, 2 skipped)
  • tools/check/rust-version.sh
  • Verified live sync against a migrated Global Plaud 4.0 account in the Mac app.

Devin Review

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

6 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment on lines +361 to +364
if prev == version_text(&hydrated) {
let imported = import_for(state, ctx, &id, &hydrated.id).await;
return Ok(Outcome::Unchanged { imported });
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Later Plaud edits skipped indefinitely

When Plaud lists a recording without timestamps or a version, process can only detect its edit from detail. The edit cannot move it up in the sync order. If sync_pages stops after two unchanged pages, later edits stay unsynced across runs.

Learn more

Plaud 4.0 sync fetches a list of recordings, then examines it in batches of 50. map_list_item and sort_recordings_desc use list fields for ordering, so a recording without timestamps or a version stays at the end even when its detail version changes. apply_detail recovers that version only after sync reaches the recording. Matching the stored version after hydration makes a page count as idle unless it also imports content. sync_pages stops after two idle pages, so an edited recording beyond that cutoff is never checked as long as the first two pages stay idle.

Example: Sync a library with 99 dated recordings followed by two recordings that have versions only in detail. All 101 import. Rename the last recording in Plaud. Its list position does not change, so the next sync checks only the first 100 and leaves the old title in OpenAudioHub.

Recommended fix: Skip the two-idle-page cutoff when the cached Plaud 4.0 list contains entries whose ordering cannot reflect edits. Use the full cached list to make that decision before processing pages, since the first sparse entry can be beyond the cutoff. Add a multi-page regression test that changes only a detail version and title beyond the first 100 entries.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@JeremyL691
JeremyL691 merged commit c697ccd into main Nov 21, 2026
11 checks passed
@JeremyL691
JeremyL691 deleted the feat/plaud-v4-sync branch November 21, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant