Skip to content

feat(sync): store profile links, kept batches and profile names - #372

Merged
A-EDev merged 3 commits into
mainfrom
feat/sync2-link-storage
Nov 1, 2026
Merged

A-EDev merged 3 commits into
mainfrom
feat/sync2-link-storage

Conversation

@A-EDev

@A-EDev A-EDev commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Migration 0036_sync2_profiles.sql (additive) adds the tables profiles need (spec/protocol.md, Profiles):
    • sync2_profile_links: local profile to link.
    • sync2_sent_links: the upload ledger per link, with the existing sync2_sent rows copied under the group's link.
    • sync2_kept: batches for a linked profile that isn't running.
    • sync2_profiles: the profiles collection.
    • sync2_floors and sync2_reading: reading a link from its snapshot.
  • Batches now record what was sent per link, so two profiles never share an upload ledger.
  • Forgetting a group clears the new tables.

Related issue

Part of FLOW-SYNC/2 Phase 6 (Flow-Tube/Flow#1039).

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Documentation
  • Build, packaging, or CI

Validation

  • pnpm test: 188 files, 1099 tests passed
  • pnpm build: passed
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: clean
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: no warnings in the changed code
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: 1106 passed, 0 failed, 9 ignored
  • I smoke-tested the affected desktop behavior.

New test: tests/sync2_link_storage.rs (migrating a linked group keeps what it sent under its link; a restored group without a link carries nothing over).

Screenshots or recordings

Risk and compatibility

  • Database: migration 0036, additive only. Every profile database gets the tables; only Default's holds rows.

  • sync2_sent is no longer read (listed as DEAD in the store inventory) but is still cleared when a group is forgotten, for builds before this one.

  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.

  • User-facing documentation was updated where needed.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Breaking changes and upgrade steps are clearly documented.

@A-EDev
A-EDev changed the base branch from refactor/sync2-device-state to main November 1, 2026 20:43
@A-EDev
A-EDev merged commit b654b09 into main Nov 1, 2026
7 checks passed
@A-EDev
A-EDev deleted the feat/sync2-link-storage branch November 1, 2026 22:39
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