Skip to content

V0.1.1#8

Merged
arumes31 merged 2 commits into
mainfrom
v0.1.1
Jun 17, 2026
Merged

V0.1.1#8
arumes31 merged 2 commits into
mainfrom
v0.1.1

Conversation

@arumes31

@arumes31 arumes31 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features

    • Added configurable upload_workers setting to control concurrent uploads per sync pair
    • Automatic cleanup of empty encrypted parent folders on deletion
    • Enhanced status display showing active upload/download activity
  • Improvements

    • Improved sync diagnostics logging capture
    • Added network timeouts for better reliability
    • Optimized concurrent folder operations to reduce redundant requests
    • Enhanced error reporting during sync operations

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e8bb691b-f5c8-4898-aa4e-af802c3b01ed

📥 Commits

Reviewing files that changed from the base of the PR and between 3bb03e8 and dc0390d.

📒 Files selected for processing (6)
  • README.md
  • cmd/gcrypt/main.go
  • internal/config/config.go
  • internal/drive/client.go
  • internal/service/fyneui.go
  • internal/sync/engine.go

📝 Walkthrough

Walkthrough

Adds a configurable upload_workers field to AppConfig, removes the sync.Mutex from the Drive Client (replacing it with a properly configured HTTP transport and documented concurrent-safety), and updates the sync engine to use singleflight for folder resolution, derive worker count and rate-limit from config, prune empty encrypted parent folders after deletion, and emit structured warnings on retry. The UI status label now distinguishes Uploading/Downloading during transfers, and slog output is redirected to the app logger.

Changes

Concurrent Uploads and Drive Sync Improvements

Layer / File(s) Summary
Config contract and Drive client concurrent-safety
internal/config/config.go, internal/drive/client.go
AppConfig gains UploadWorkers int; Client removes mu sync.Mutex, documents concurrent safety, and NewClient builds a custom http.Transport with bounded timeouts and a background-context OAuth refresh. All Drive operation methods drop mutex lock/unlock calls.
Engine: configurable workers, rate limiting, and singleflight field
internal/sync/engine.go
Engine gains a folderGroup singleflight.Group field. NewEngine reads UploadWorkers from config with a default fallback, derives reqPerSec capped by maxRequestsPerSec, initialises the rate-limiter ticker from that value, and emits slog.Warn on operation failures before retry.
Engine: singleflight folder resolution and empty-folder pruning
internal/sync/engine.go
resolveRemoteDir fast-paths via cache and wraps resolve/create in folderGroup.Do; deleteRemote prunes empty encrypted parent directories; lookupRemoteDirID uses a paginated findChildFolderID helper; cache access is narrowed to brief lock windows.
UI transfer-direction label and slog routing
internal/service/fyneui.go, cmd/gcrypt/main.go
refreshSummary accepts appstate.State and sets the status label to "Downloading…" or "Uploading…" based on active/pending transfers and smoothed rates. main.go routes the slog default logger to the application logger's writer at Info level.
README: upload_workers and encrypted folder cleanup docs
README.md
V2 config example adds upload_workers with rate-limit/retry context; Remote Layout section updated to state gcrypt automatically removes empty encrypted parent folders after deletions.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

🐇 Hop hop, the mutex is gone!
Concurrent uploads carry on,
Singleflight deduplicates the trail,
Empty folders? They no longer prevail.
The slog now writes where it should be—
Rate-limited hops, fast and free! 🌿

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch v0.1.1

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.

@arumes31
arumes31 merged commit 4d2b39f into main Jun 17, 2026
1 check was pending
@arumes31
arumes31 deleted the v0.1.1 branch June 17, 2026 13:32
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