Sync V2: design review for syncing settings and category rules across devices
Maintainers usually reply within 4 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Read the sync V2 design in issue #1445 and compare the per-device folder model with a shared replicated settings document. The review should address the six listed questions, including category merge semantics and Rust/Python backend parity. Done means a short design doc recommends an alternative and breaks implementation into server export, reader, web UI, and Android slices.
Written by the indexing model from the issue text.
Description
Part of the sync V2 programme (#1445). This issue covers syncing settings, starting with category rules, alongside events. It is a design review, not an implementation ticket.
Problem
Category rules accumulate on each device independently. A phone, a desktop and a laptop each end up with their own rule set. Today the only ways to share rules are manual export/import or rebuilding them by hand on every device. Of all the settings, category rules are the ones users build up over time, so they gain the most from sync. Saved views and other settings follow after that.
Candidate design (Erik's starting point; alternatives wanted)
This keeps the ownership model V2 already uses for events (devices/{device_id}/):
- Each device owns its folder. A device writes only its own shared settings. Every other device's folder is read-only to it, so writing to or pushing back into another device's files is a protocol violation.
- Sharing is opt-in. The sync setup lets the user choose what a device shares, for example categories but not views.
- Each device reads the others' shared rules and pulls them in explicitly. The UI offers:
- Merge: fold another device's categories into this device's rule set, with conflicts shown and resolved instead of silently overwritten.
- Copy: replace this device's rule set with another device's.
- Inherit: make this device follow another device's rule set, so it tracks future changes from the device with the better rules.
Questions the review should answer
- Single-writer-per-device folders (above) versus a shared, replicated settings document (last-writer-wins, CRDT or versioned). The trade-off is between simplicity plus clear ownership, and a single source of truth that has no "which device is the master" step.
- Merge semantics for the category tree: matching by name path versus a stable ID, how to handle diverging regexes for the same category, and how to handle deletions.
- How "inherit" composes with local edits: does a local edit fork the device off, or is it refused?
- Scope and order: categories first, then views, then other settings. Some settings must never leave the device, such as server port and per-device watcher config.
- Format and versioning: reuse the segment/manifest format (
vfield, hash validation) or keep a separate small JSON document per device. - Backend parity: Rust and Python servers both store categories in the settings store (
classes), and Android runs aw-server-rust. The contract needs to cover both.
Done when
A short design doc compares at least two alternatives against the questions above, makes a recommendation, and splits the implementation into slices: server settings export, reader, webui merge/copy/inherit UI, and Android wiring.
- Dominant language
- Python
- Stars
- 19.7k
- Forks
- 1.1k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
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.
More from ActivityWatch/activitywatch
-
Folder created in home directory (clashes with documented location)Possibly taken A pull request linked to this issue is open or already merged. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ActivityWatch/activitywatch#1418 · 5 comments ·
Maintainers usually reply within 4 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ActivityWatch/activitywatch#1568 · 1 comment ·
Maintainers usually reply within 4 days
-
type: bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ActivityWatch/activitywatch#1564 · 2 comments ·
Maintainers usually reply within 4 days
-
type: bug
Difficulty 3/5 1-2 days Newbie friendliness 54/100
ActivityWatch/activitywatch#1538 · 7 comments ·
Maintainers usually reply within 4 days
-
type: bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ActivityWatch/activitywatch#1537 · 4 comments ·
Maintainers usually reply within 4 days
All issues in ActivityWatch/activitywatch
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
comp/tools P2 tool/skills type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#159541 ·
Maintainers usually reply within 1 day
-
bot-triaged module: correctness (silent) module: cpu module: empty tensor module: loss triage review
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
request-theme
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
LizardByte/ThemerrDB#10167 · 1 comment ·