Skip to content

Local Tugboat 0.2.0: any file type, drag onto the PC window, no expiry hold - #3

Merged
Page011 merged 8 commits into
mainfrom
v0.2.0
Nov 18, 2026
Merged

Page011 merged 8 commits into
mainfrom
v0.2.0

Conversation

@Page011

@Page011 Page011 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Local Tugboat 0.2.0 (desktop 0.2.0, Android 0.2.0 / version code 5).

What changes

  • Any file type, both ways. Photos and videos keep the content check; everything else syncs as a File item (type icon, name, size, Open). Shortcut and folder-setting files (.lnk, .url, .scf, .library-ms, .searchConnector-ms, desktop.ini, autorun.inf) never sync and are listed as REFUSED.
  • Downloaded-from-elsewhere mark. Every file the PC receives gets Zone.Identifier (zone 3) before it appears in the library, so Windows warns when it is opened. If the mark cannot be written (FAT/exFAT, removable storage), the file waits and a banner says to move the Tugboat folder to a permanent location.
  • Drag files onto the PC window to copy them into the folder being viewed (Inbox by default), with progress and a result banner. A dropped folder is zipped into one .zip that syncs.
  • No expiry hold. Items expire on time even when no device confirmed them; the "waiting" state is gone.
  • Phone storage guard. Downloads stop below the reserve; the phone shows PHONE STORAGE LOW and waiting files say "Waiting - phone storage low".
  • Android: share any file into Tugboat; files open in the default app through a content URI with their real name; rotating mid-video no longer ends the recording; an unpair done on the PC returns the phone to the pairing screen at once.
  • Fixes: expired QR says PAIRING CODE EXPIRED; last seen refreshes; file times survive a restart.
  • Protocol 2: a 0.1.x device shows "Update Tugboat on the " instead of syncing wrongly.
  • Schema v2 (backed up first). Carries the four small review notes left from Local Tugboat 0.1.1: first version (desktop + Android) #1 and the README note from Build the Windows installer on GitHub for releases #2.

Tested

  • cargo test --workspace: 555 passed, 0 failed. cargo clippy --workspace --all-targets -D warnings: clean.
  • Desktop bun run check: svelte-check 0/0, 221 TS tests. bun run tauri build: installer builds.
  • Android: 201 unit tests, lint clean, release bundle builds.
  • Emulator + desktop QA app: pair, photo phone to PC, PDF and zip PC to phone (SHA-256 equal), share into Tugboat from Files, .lnk refused, mark present on received files, on-time expiry with the PC unreachable, storage guard banner, unpair on the PC then re-pair.

Not tested yet (needs a person)

  • A real mouse drag onto the PC window (USB stick, folder, .lnk, an Outlook attachment, unplugging mid-copy).
  • Installing over 0.1.x on Windows; the Samsung checks (share a PDF and a Word file, video playback, force-stop then open, rotate mid-recording, low storage).
  • A 0.1.1 phone against the 0.2.0 PC.

Known, not fixed here

  • The PC's Pair tab keeps showing the old "Paired with" panel after an unpair until Done is clicked.
  • The storage guard can raise PHONE STORAGE LOW for one moment when a download finishes (clears on the next check).
  • A pairing save slower than 10 s still closes normally (needs a pairing acknowledgement message, a later protocol change).

…y hold

- Any file type syncs both ways. Photos and videos keep the content
  check; everything else is a File item (type icon, name, size, Open).
  Shortcut and folder-setting files (.lnk, .url, .scf, .library-ms,
  .searchConnector-ms, desktop.ini, autorun.inf) never sync and are
  listed as REFUSED.
- Files the PC receives carry the Windows "downloaded from elsewhere"
  mark (Zone.Identifier, zone 3), written before the file appears in
  the library; if the mark cannot be written the file waits with an
  error instead of arriving unmarked.
- Drag files onto the PC window to copy them into the folder being
  viewed (Inbox by default), with progress and a result banner.
  Folders are not copied.
- Items expire on time even when no device has confirmed them (the
  expiry hold and the "waiting" state are gone).
- Phone storage guard: downloads stop below the reserve and the phone
  shows PHONE STORAGE LOW.
- Android: share any file into Tugboat, open files with the default
  app through a content URI, real file names shown to other apps,
  rotation no longer cuts a video recording.
- Fixes: expired QR shows PAIRING CODE EXPIRED, last seen refreshes
  on every sync change, file times kept across restarts.
- Protocol version 2: a 0.1.x device sees "Update Tugboat on the
  <device>" instead of syncing silently wrong.
- Versions 0.2.0 (Android version code 4); schema v2 with backup.
Resolved 16 conflicted files keeping both sides: PR 1's safety fixes (create_new reservation, rename_no_replace, claimed-hash downloads, keyset paging, pair_with_cancel, generation counters) on top of 0.2.0's rules (any file type, no Waiting state, storage guard, Mark-of-the-Web, PROTO 2). The phone storage guard now runs inside PR 1's paged picker, decided before the hash claim, with a cap on how far it scans. Fixed a launch crash the merge made on Android (a dispatcher field initialised after the init block used it) and two timing-dependent tests.
…e races

- Android: an unpair done on the PC now returns the phone to the first
  pairing screen at once (it stayed on "Paired with" until a restart);
  CameraX temp files left by a killed save are deleted after 60 s; a
  test guards the view model against fields used before they exist
  (the launch crash the merge caused).
- Sync core: the phone storage guard counts bytes still to come from
  downloads started in an earlier session; fake_pc lists refused items.
- Desktop: only the newest reload decides "ready" and the load error;
  Bin days saves the last value typed even when saves overlap; a
  cross-drive move's temp file is never imported and is cleaned at
  start; a failed save of the pre-0.2.0 file list is retried, not
  believed; unused move_no_replace removed; test that a received
  file keeps its downloaded-from-elsewhere mark through Choose and
  Locate.
- README: the Android build also needs the Visual Studio C++ tools.
- Tests: n11 resume test sender outlives its readiness wait.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 171 files, which is 21 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to Team to raise the limit.

This review is too large to run within your organization's remaining usage spending cap. Raise or remove your spending cap in the billing tab, then retry.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: d660188c-55df-49e3-96ad-6ed9239d02de
Commits

Reviewing files that changed from the base of the PR and between 806b908 and 018329a.

Files ignored due to path filters: 1

  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 171

  • Cargo.toml
  • README.md
  • apps/android/FFI.md
  • apps/android/app/build.gradle.kts
  • apps/android/app/src/main/AndroidManifest.xml
  • apps/android/app/src/main/java/app/localtugboat/Background.kt
  • apps/android/app/src/main/java/app/localtugboat/CameraScreen.kt
  • apps/android/app/src/main/java/app/localtugboat/Components.kt
  • apps/android/app/src/main/java/app/localtugboat/Core.kt
  • apps/android/app/src/main/java/app/localtugboat/Export.kt
  • apps/android/app/src/main/java/app/localtugboat/Files.kt
  • apps/android/app/src/main/java/app/localtugboat/Gallery.kt
  • apps/android/app/src/main/java/app/localtugboat/Import.kt
  • apps/android/app/src/main/java/app/localtugboat/MainActivity.kt
  • apps/android/app/src/main/java/app/localtugboat/Mark.kt
  • apps/android/app/src/main/java/app/localtugboat/PairingText.kt
  • apps/android/app/src/main/java/app/localtugboat/ShareActivity.kt
  • apps/android/app/src/main/java/app/localtugboat/SnapService.kt
  • apps/android/app/src/main/java/app/localtugboat/SnapViewModel.kt
  • apps/android/app/src/main/java/app/localtugboat/Texts.kt
  • apps/android/app/src/main/java/app/localtugboat/UiLogic.kt
  • apps/android/app/src/main/java/app/localtugboat/Viewer.kt
  • apps/android/app/src/main/res/drawable/ic_file.xml
  • apps/android/app/src/main/res/drawable/ic_file_archive.xml
  • apps/android/app/src/main/res/drawable/ic_file_audio.xml
  • apps/android/app/src/main/res/drawable/ic_file_doc.xml
  • apps/android/app/src/test/java/app/localtugboat/AdversarialTest.kt
  • apps/android/app/src/test/java/app/localtugboat/AnyFileTest.kt
  • apps/android/app/src/test/java/app/localtugboat/FixesTest.kt
  • apps/android/app/src/test/java/app/localtugboat/InitOrderTest.kt
  • apps/android/app/src/test/java/app/localtugboat/PairingTextTest.kt
  • apps/android/app/src/test/java/app/localtugboat/ReviewFixesTest.kt
  • apps/android/app/src/test/java/app/localtugboat/ShareNameSniffTest.kt
  • apps/android/app/src/test/java/app/localtugboat/ShareSecurityTest.kt
  • apps/android/app/src/test/java/app/localtugboat/TextsTest.kt
  • apps/android/app/src/test/java/app/localtugboat/UiLogicTest.kt
  • apps/android/app/src/test/java/app/localtugboat/adversarial_logo_migration.kt
  • apps/android/build.gradle.kts
  • apps/android/gradle.properties
  • apps/desktop/package.json
  • apps/desktop/scripts/icons.ts
  • apps/desktop/scripts/qa.mjs
  • apps/desktop/src-tauri/Cargo.toml
  • apps/desktop/src-tauri/build.rs
  • apps/desktop/src-tauri/src/applog.rs
  • apps/desktop/src-tauri/src/backend.rs
  • apps/desktop/src-tauri/src/bindings.rs
  • apps/desktop/src-tauri/src/commands.rs
  • apps/desktop/src-tauri/src/drop.rs
  • apps/desktop/src-tauri/src/firewall.rs
  • apps/desktop/src-tauri/src/lib.rs
  • apps/desktop/src-tauri/src/library/config.rs
  • apps/desktop/src-tauri/src/library/mod.rs
  • apps/desktop/src-tauri/src/library/placement.rs
  • apps/desktop/src-tauri/src/library/reconcile.rs
  • apps/desktop/src-tauri/src/library/tests.rs
  • apps/desktop/src-tauri/src/qr.rs
  • apps/desktop/src-tauri/src/shell.rs
  • apps/desktop/src-tauri/src/tray.rs
  • apps/desktop/src-tauri/src/winfs.rs
  • apps/desktop/src-tauri/src/zipdrop.rs
  • apps/desktop/src-tauri/tauri.conf.json
  • apps/desktop/src-tauri/tests/adversarial_020_library.rs
  • apps/desktop/src-tauri/tests/adversarial_020_security.rs
  • apps/desktop/src-tauri/tests/adversarial_firewall.rs
  • apps/desktop/src-tauri/tests/adversarial_firewall_scope.rs
  • apps/desktop/src-tauri/tests/adversarial_library.rs
  • apps/desktop/src-tauri/tests/backend_e2e.rs
  • apps/desktop/src-tauri/tests/versions.rs
  • apps/desktop/src/App.svelte
  • apps/desktop/src/lib/Banners.svelte
  • apps/desktop/src/lib/Bin.svelte
  • apps/desktop/src/lib/DropOverlay.svelte
  • apps/desktop/src/lib/Gallery.svelte
  • apps/desktop/src/lib/ItemTile.svelte
  • apps/desktop/src/lib/Mark.svelte
  • apps/desktop/src/lib/Pair.svelte
  • apps/desktop/src/lib/Settings.svelte
  • apps/desktop/src/lib/StatusBar.svelte
  • apps/desktop/src/lib/adversarial_logo_grid.test.ts
  • apps/desktop/src/lib/api.ts
  • apps/desktop/src/lib/app.svelte.ts
  • apps/desktop/src/lib/banners.test.ts
  • apps/desktop/src/lib/banners.ts
  • apps/desktop/src/lib/bindings/DropLine.ts
  • apps/desktop/src/lib/bindings/DropProgress.ts
  • apps/desktop/src/lib/bindings/DropReport.ts
  • apps/desktop/src/lib/bindings/DropState.ts
  • apps/desktop/src/lib/bindings/ItemState.ts
  • apps/desktop/src/lib/bindings/ItemView.ts
  • apps/desktop/src/lib/bindings/LibraryStatus.ts
  • apps/desktop/src/lib/bindings/MediaKind.ts
  • apps/desktop/src/lib/bindings/NotSyncedFile.ts
  • apps/desktop/src/lib/bindings/Settings.ts
  • apps/desktop/src/lib/bindings/SyncStatus.ts
  • apps/desktop/src/lib/drop.test.ts
  • apps/desktop/src/lib/drop.ts
  • apps/desktop/src/lib/format.test.ts
  • apps/desktop/src/lib/format.ts
  • apps/desktop/src/lib/generation.test.ts
  • apps/desktop/src/lib/generation.ts
  • apps/desktop/src/lib/icons.ts
  • apps/desktop/src/lib/mark.test.ts
  • apps/desktop/src/lib/theme.test.ts
  • apps/desktop/src/lib/virtual.test.ts
  • assets/brand/README.md
  • assets/brand/tools/compare.py
  • assets/brand/tools/fit.py
  • assets/brand/tools/lib.py
  • assets/brand/tools/make_all.py
  • assets/brand/tools/make_ico.py
  • assets/brand/tools/render.py
  • assets/brand/tools/shoot.cjs
  • crates/core/bindings/ItemState.ts
  • crates/core/bindings/ItemView.ts
  • crates/core/bindings/MediaKind.ts
  • crates/core/bindings/Settings.ts
  • crates/core/bindings/SyncStatus.ts
  • crates/core/examples/fake_pc.rs
  • crates/core/examples/fake_phone.rs
  • crates/core/src/activity.rs
  • crates/core/src/bin.rs
  • crates/core/src/clock.rs
  • crates/core/src/db.rs
  • crates/core/src/error.rs
  • crates/core/src/events.rs
  • crates/core/src/expiry.rs
  • crates/core/src/facade.rs
  • crates/core/src/folders.rs
  • crates/core/src/lib.rs
  • crates/core/src/merge.rs
  • crates/core/src/model.rs
  • crates/core/src/names.rs
  • crates/core/src/ops.rs
  • crates/core/src/placement.rs
  • crates/core/src/places.rs
  • crates/core/src/schema/v2.sql
  • crates/core/src/store.rs
  • crates/core/src/sync/digest.rs
  • crates/core/src/sync/engine.rs
  • crates/core/src/sync/net.rs
  • crates/core/src/sync/pair.rs
  • crates/core/src/sync/wire.rs
  • crates/core/tests/adversarial.rs
  • crates/core/tests/adversarial_020_core.rs
  • crates/core/tests/adversarial_020_security.rs
  • crates/core/tests/any_file.rs
  • crates/core/tests/common/mod.rs
  • crates/core/tests/engine.rs
  • crates/core/tests/pairing_flow.rs
  • crates/core/tests/review_fixes.rs
  • crates/core/tests/robust.rs
  • crates/core/tests/two_cores.rs
  • crates/ffi/Cargo.toml
  • crates/ffi/src/error.rs
  • crates/ffi/src/lib.rs
  • crates/ffi/src/logging.rs
  • crates/ffi/tests/adversarial.rs
  • crates/ffi/tests/phone_flow.rs
  • crates/net/src/blob.rs
  • crates/net/src/frame.rs
  • crates/net/src/guard.rs
  • crates/net/src/lib.rs
  • crates/net/src/local.rs
  • crates/net/src/node.rs
  • crates/net/src/pairing.rs
  • crates/net/src/tests/blob.rs
  • crates/net/src/tests/local.rs
  • crates/net/src/tests/mod.rs
  • crates/net/src/tests/node.rs
  • crates/net/src/tests/pairing.rs

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

- Comments, doc comments and docs describe the code and its rules
  directly instead of pointing at design notes that are not in the
  repository. Test fixtures use neutral names (OFFICE-PC, C:\Users\alex,
  made-up SIDs), and test names no longer carry scenario numbers.
- Logo tools: TUG_SOURCE must be set; Electron comes from TUG_ELECTRON
  or PATH.
- Android: while downloads are held for low storage, a waiting file
  says "Waiting - phone storage low" instead of "Downloading from PC".
- Android version code 5 (0.2.0).
@Page011

Page011 commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Action not completed

Review skipped: 168 files exceed the limit of 100.

- A folder dropped on the window is zipped into one "<folder>.zip" in
  the folder being viewed and added like a dropped file. Store method,
  UTF-8 names, empty subfolders kept, Zip64 when needed, file times in
  the local time of each file's own date. Links and junctions are never
  followed; desktop.ini, Thumbs.db and Tugboat's own .tugboat folder are
  left out. A name clash gives "<name> (2).zip"; an empty folder, a
  drive root, a folder link or not enough space is refused with one
  line; a read error fails that folder only and leaves nothing behind.
- When the library drive cannot hold the downloaded-from-elsewhere
  mark, the banner now says to move the Tugboat folder to a permanent
  location on this PC, not removable storage.
- Sync core: an edited file over the size limit is refused from its
  size before hashing and judged once per version (it was re-hashed
  under the database lock every few seconds); a refused Explorer
  rename is checked before anything is written, so it is no longer
  undone silently; the storage-low flag no longer flaps and clears
  when the session ends; the blob request log is test-only.
- Desktop: moving the library (Choose), restoring from the Bin and
  zipping a dropped folder keep the downloaded-from-elsewhere mark, and
  fail rather than produce an unmarked copy; the cross-drive move temp
  has a name no user file can have, so start-up clean-up cannot delete
  a real file; a synced file named like a download in progress syncs
  normally; a drop goes to the folder that was showing when it landed;
  drag-enter no longer waits on the core; the drop banner counts files.
- Android: sharing a large file checks room for both copies and the
  size limit before copying; the rotation lock is released after a
  process restart; Open uses the same can-open rule the tests cover.
@Page011

Page011 commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

CodeRabbit skipped this PR (168 files, over its 100-file limit), so the 0.2.0 changes got a full review here instead: data safety, security, desktop and Android. 18 issues confirmed and fixed in 018329a; 3 suspected issues were checked and turned out not to be reachable.

Major:

  • An edited library file over the 16 GB limit was re-hashed under the database lock every few seconds, stalling sync and the UI. It is now refused from its size and judged once per version.
  • Moving the library with Choose onto a FAT/exFAT drive dropped the downloaded-from-elsewhere mark. Choose now fails rather than produce unmarked copies (same for Bin restore and folder zips).
  • Sharing a large file into the phone needed room for two copies but only checked for one. Both are checked now, plus the 16 GB limit, before copying.

Minor: start-up clean-up could delete a user file ending in .tugboat-move; a synced file named like a download in progress (.part, .download) never synced its edits; a refused Explorer rename was silently undone; the storage-low flag could flap; a queued drop could land in the wrong folder; drag-enter waited on the core; the drop banner counted lines, not files; the camera rotation lock survived a process restart; and a few test clean-ups.

Checks on 018329a: cargo test --workspace 555 passed, 0 failed (two runs); clippy -D warnings clean; desktop svelte-check 0/0, 221 TS tests, build ok; Android 201 unit tests, lint clean, release bundle builds.

Not covered by tests (needs a real device or drive): FAT/exFAT behaviour on a real USB stick, a real mouse drag, rotation on a phone.

@Page011
Page011 merged commit 41da845 into main Nov 18, 2026
1 check passed
@Page011
Page011 deleted the v0.2.0 branch November 18, 2026 22:11
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