rowboatlabs / rowboatlabs/rowboat
Granola sync fetches entire history on every sync instead of incremental updates
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 17.6k
- Forks
- 1.7k
- Avg merge
- 11h 37m
- Merged PRs (30d)
- 173
Description
### Description
The Granola sync fetches ALL documents from the Granola API on every sync cycle, even when most documents have not changed since the last sync. While the code does track which documents have been synced (via `sync_state.json`), this is only used to skip file writes - all API calls are still made.
### Current Behavior
With N Granola meetings:
- Every sync makes N/10 API calls (paginated with batch size 10)
- 1 second delay between API calls
- ~N/10 seconds minimum for API fetches, even when nothing changed
- Example: 500 meetings = ~50 API calls = ~50+ seconds per sync
### Expected Behavior
Sync should complete quickly when no documents have changed, only fetching:
- Documents updated since the last sync (if API supports filtering), OR
- Stopping early when reaching unchanged documents (if API returns sorted results)
### Impact
- Slow startup when Granola integration is enabled
- Unnecessary API calls and rate limit consumption
- Poor user experience for users with many Granola meetings
### Technical Details
The sync uses `POST /v2/get-documents` with only `limit` and `offset` parameters. The stored `lastSyncDate` is not used to filter the API request.
### Proposed Solution
1. Try passing `updated_since` parameter to the API (may be supported)
2. Add early termination when hitting consecutive unchanged documents (fallback)
### Environment
- Rowboat version: v0.1.60+
- Affects: All platforms with Granola integration enabled
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript Granola sync code that calls POST /v2/get-documents and reads sync_state.json, then check how lastSyncDate is tracked. Verify whether the API accepts updated_since and whether results are sorted; use that to choose incremental filtering or early termination. Done means unchanged documents do not trigger full-history API fetches while changed documents still sync correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100