Skip to content

feat: sync hardening — auto-resume, history logging, bandwidth metrics#126

Merged
tomymaritano merged 10 commits into
developfrom
feature/sync-hardening
Mar 12, 2026
Merged

feat: sync hardening — auto-resume, history logging, bandwidth metrics#126
tomymaritano merged 10 commits into
developfrom
feature/sync-hardening

Conversation

@tomymaritano

Copy link
Copy Markdown
Collaborator

Summary

  • Auto-resume sync when network reconnects (online/offline event listeners with 2s debounce)
  • Local sync_history SQLite table records every sync cycle: items pulled/pushed, conflicts, bytes sent/received, status
  • Bandwidth tracking in ApiClient measures request/response body sizes per sync cycle
  • Collapsible "Sync History" section in Settings > Account showing last 10 cycles with color-coded status badges

Changes

Layer File What
Migration storage-sqlite/migrations/017_sync_history.ts New sync_history table
Repository SQLiteNoteRepository.ts CRUD for sync history entries
ApiClient apiClient.ts Bandwidth counters (bytes sent/received)
SyncService syncService.ts Record history per syncNow() cycle
IPC main/index.ts + preload/index.ts sync:history handler + bridge
Store syncStore.ts initNetworkListeners() for auto-resume
UI AccountSection.tsx + CSS Sync history table

Test plan

  • Typecheck passes (main, preload, renderer)
  • No changes to existing sync behavior — purely additive
  • Manual: go offline → come back → verify sync auto-triggers after 2s
  • Manual: run sync → open Settings → expand Sync History → verify entries show

🤖 Generated with Claude Code

tomymaritano and others added 7 commits March 11, 2026 15:35
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Track bytes sent and received across all HTTP requests for sync
history reporting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instrument syncNow() to create a sync_history entry for each cycle,
tracking notes/notebooks/tags pulled and pushed, conflicts, bandwidth,
and final status (success/partial/error).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9af53f4c-23f9-4a2b-811d-af18fb973e64

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/sync-hardening

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tomymaritano

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@tomymaritano

Copy link
Copy Markdown
Collaborator Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Mar 11, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

tomymaritano and others added 3 commits March 11, 2026 20:57
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ning

# Conflicts:
#	apps/desktop/src/renderer/App.tsx
#	apps/desktop/src/renderer/pages/settings/sections/Section.module.css
@tomymaritano tomymaritano merged commit 38b8128 into develop Mar 12, 2026
0 of 3 checks passed
@tomymaritano tomymaritano deleted the feature/sync-hardening branch March 12, 2026 00:35
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