Add Sync Templates button to Settings page #51

Open
opened 2026-07-24 16:48:21 +02:00 by cloudbot · 0 comments
Collaborator

Goal

Add a "Sync Templates" button to the Settings sheet (SettingsSheet.kt) that triggers an immediate, on-demand fetch/refresh of available templates, with inline feedback while it runs and a result summary afterward.

Motivation

Templates are currently only parsed/stored locally via TemplateRepository/TemplateParser — there's no remote sync path yet, and no way for a user to force a refresh outside of whatever automatic mechanism eventually lands. Users need a way to know when new templates have arrived without waiting.

Acceptance criteria

  • Settings page shows a "Sync Templates" button
  • Tapping it shows a status spinner while the sync runs
  • On completion, shows a delta label describing what changed (e.g. "3 Templates Added", "No Changes", "1 Added, 1 Updated")
  • Button is disabled/debounced while a sync is in progress
  • Sync failure shows an error state distinct from "no changes"

Non-goals / constraints

  • Does not define the background/automatic sync schedule (existing SyncWorker/EntrySyncEngine pattern in data/sync/ is for entries, not templates — this issue is just the manual trigger + UI feedback; a template remote-fetch mechanism may need to be built as part of this or a prerequisite issue)

None — first template-sync-related issue

## Goal Add a "Sync Templates" button to the Settings sheet (`SettingsSheet.kt`) that triggers an immediate, on-demand fetch/refresh of available templates, with inline feedback while it runs and a result summary afterward. ## Motivation Templates are currently only parsed/stored locally via `TemplateRepository`/`TemplateParser` — there's no remote sync path yet, and no way for a user to force a refresh outside of whatever automatic mechanism eventually lands. Users need a way to know when new templates have arrived without waiting. ## Acceptance criteria - [ ] Settings page shows a "Sync Templates" button - [ ] Tapping it shows a status spinner while the sync runs - [ ] On completion, shows a delta label describing what changed (e.g. "3 Templates Added", "No Changes", "1 Added, 1 Updated") - [ ] Button is disabled/debounced while a sync is in progress - [ ] Sync failure shows an error state distinct from "no changes" ## Non-goals / constraints - Does not define the background/automatic sync schedule (existing `SyncWorker`/`EntrySyncEngine` pattern in `data/sync/` is for entries, not templates — this issue is just the manual trigger + UI feedback; a template remote-fetch mechanism may need to be built as part of this or a prerequisite issue) ## Related None — first template-sync-related issue
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
utilities/Logbook#51
No description provided.