Skip to content

refactor: retire the CCSync HTTP sync layer, unify on TaskChampion FFI - #1

Open
BrawlerXull wants to merge 4 commits into
mainfrom
feat/retire-ccsync
Open

refactor: retire the CCSync HTTP sync layer, unify on TaskChampion FFI#1
BrawlerXull wants to merge 4 commits into
mainfrom
feat/retire-ccsync

Conversation

@BrawlerXull

Copy link
Copy Markdown
Owner

Removes the deprecated HTTP sync path so all synchronization flows through the native TaskChampion Rust FFI bridge, matching the single-path target architecture.

  • Delete lib/app/v3/net/{fetch,add_task,complete,delete,modify,origin}.dart and lib/app/v3/db/update.dart (the HTTP push-sync helper).
  • Rewrite saveCredentials() to validate credentials via the native sync_() FFI call instead of an HTTP GET /tasks probe; drop the taskReplica branch.
  • Remove the taskc-HTTP sync call sites (home_controller.refreshTasks and its callers, show_tasks, taskc_details, home_page_app_bar) while preserving all local SQLite operations.
  • Rebrand the 8 ccsync* localization keys to syncServer* and reword copy from "CCSync" to "TaskChampion sync server" across all 9 language files; collapse the mode-branched sync-URL label to the single path.
  • Drop the obsolete HTTP fetchTasks test group and its generated mocks; realign the localization snapshot tests to the reworded strings.

http stays in pubspec (still used by pushNotification_service.dart). flutter analyze: 0 errors. No test regressions vs main (pre-existing headless plugin/MethodChannel failures unchanged).

Description

Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.

Fixes #(issue_no)

Replace issue_no with the issue number which is fixed in this PR

Screenshots

Checklist

  • Tests have been added or updated to cover the changes
  • Documentation has been updated to reflect the changes
  • Code follows the established coding style guidelines
  • All tests are passing

Removes the deprecated HTTP sync path so all synchronization flows through
the native TaskChampion Rust FFI bridge, matching the single-path target
architecture.

- Delete lib/app/v3/net/{fetch,add_task,complete,delete,modify,origin}.dart
  and lib/app/v3/db/update.dart (the HTTP push-sync helper).
- Rewrite saveCredentials() to validate credentials via the native sync_()
  FFI call instead of an HTTP GET /tasks probe; drop the taskReplica branch.
- Remove the taskc-HTTP sync call sites (home_controller.refreshTasks and its
  callers, show_tasks, taskc_details, home_page_app_bar) while preserving all
  local SQLite operations.
- Rebrand the 8 ccsync* localization keys to syncServer* and reword copy from
  "CCSync" to "TaskChampion sync server" across all 9 language files; collapse
  the mode-branched sync-URL label to the single path.
- Drop the obsolete HTTP fetchTasks test group and its generated mocks; realign
  the localization snapshot tests to the reworded strings.

http stays in pubspec (still used by pushNotification_service.dart).
flutter analyze: 0 errors. No test regressions vs main (pre-existing headless
plugin/MethodChannel failures unchanged).
Follow-up hardening after an adversarial review of the CCSync retirement:

- saveCredentials(): validate the entered credentials with sync_() BEFORE
  persisting them via setTaskcCreds(), so invalid credentials are never
  written to the active profile when validation fails. (The prior order —
  which mirrored the proposal's example — persisted first, leaving bad creds
  on disk while telling the user the check failed.) Validation is a live sync,
  so saving now requires connectivity to the sync server.
- Remove the orphaned taskchampionBackendUrl localization getter from the
  abstract Sentences class and all 8 locale implementations; it became dead
  when the credentials view's mode-branched URL label collapsed to the single
  syncServerBackendUrl path.
- Fix a stray non-Urdu token ("używaj") left in syncServerEasySyncTitle on a
  line the rebrand already touched.

flutter analyze: 0 errors. Full suite unchanged at +317 -18 (no new failures).
@BrawlerXull
BrawlerXull force-pushed the feat/retire-ccsync branch from e55a948 to bdab680 Compare July 8, 2026 04:14
Follow-up to the CCSync retirement: the profile page still surfaced the
"CCSync" brand -- the "changed profile mode to CCSync" snackbar label and a
commented-out "CCSync (v3)" mode radio. Rebrand the label to "Taskchampion"
(matching the retained TW3C mode) and delete the dead commented block.
pubspec used a caret constraint, so `flutter pub get` could resolve the newer
2.12.0 runtime while the committed FFI bindings were generated with codegen
2.11.1. That mismatch crashed the app at RustLib.init() on startup. Pinning the
exact 2.11.1 (matching rust/Cargo.toml's =2.11.1) keeps the Dart package,
generated bindings, and native library in lockstep.
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