Skip to content

Feat/retire ccsync#650

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

Feat/retire ccsync#650
BrawlerXull wants to merge 4 commits into
CCExtractor:mainfrom
BrawlerXull:feat/retire-ccsync

Conversation

@BrawlerXull

@BrawlerXull BrawlerXull commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

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

Summary by CodeRabbit

  • New Features
    • Updated sync setup/onboarding copy across languages to use consistent “sync server” wording.
    • Champion sync now reloads tasks from local storage during sync-on-start.
  • Bug Fixes
    • Credential form now validates sync settings via Rust before saving.
    • Task completion and deletion no longer trigger extra remote side effects; updates stay in the local task flow.
    • Removed outdated remote refresh paths that could cause inconsistencies.
  • Tests
    • Updated localization and sync credential tests to match the new terminology and behavior.

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).
@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 84b39bc3-633e-4d99-b170-d25d9676baf8

📥 Commits

Reviewing files that changed from the base of the PR and between bdab680 and 8aac26e.

⛔ Files ignored due to path filters (1)
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • lib/app/modules/profile/views/profile_view.dart
  • pubspec.yaml

📝 Walkthrough

Walkthrough

This PR removes CCSync HTTP-based task synchronization, switches task refresh and mutation paths to local TaskDatabase operations, replaces credential validation with Rust FFI, renames sync localization keys to syncServer*, and updates profile labels and tests.

Changes

CCSync removal and TaskChampion local sync migration

Layer / File(s) Summary
Remove CCSync network layer
lib/app/v3/net/add_task.dart, lib/app/v3/net/complete.dart, lib/app/v3/net/delete.dart, lib/app/v3/net/fetch.dart, lib/app/v3/net/modify.dart, lib/app/v3/db/update.dart, lib/app/v3/net/origin.dart, test/api_service_test.dart, test/api_service_test.mocks.dart, lib/app/v3/models/task.dart
Deletes the CCSync HTTP task helpers, the origin constant, the obsolete fetchTasks test/mocks, and a comment-only task model edit.
Controller local DB fetch replaces remote refresh
lib/app/modules/home/controllers/home_controller.dart, lib/app/modules/home/views/home_page_app_bar.dart, lib/app/modules/home/views/show_tasks.dart, lib/app/modules/taskc_details/controllers/taskc_details_controller.dart
refreshTasks(clientId, encryptionSecret) is replaced by fetchTasksFromDB(), wired into sync-on-start and app bar refresh; task deletion, completion, and modification paths use TaskDatabase directly.
Credential validation via Rust FFI sync
lib/app/modules/manage_task_champion_creds/controllers/manage_task_champion_creds_controller.dart, lib/app/modules/manage_task_champion_creds/views/manage_task_champion_creds_view.dart, test/utils/taskchampion/taskchampion_test.dart, pubspec.yaml
saveCredentials() now validates via replica-path lookup and Rust sync_, persists on success, renames the backend URL controller to syncServerUrlController, and updates the view and tests to use the new field and labels.
Profile mode label update
lib/app/modules/profile/views/profile_view.dart
The profile mode dialog removes the commented CCSync option and changes the displayed mode label mapping for TW3C.
Sentences interface and language implementations
lib/app/utils/language/sentences.dart, lib/app/utils/language/*_sentences.dart
The abstract Sentences contract and all language implementations rename ccsync* getters to syncServer*, update TaskChampion tile copy, and remove taskchampionBackendUrl.
Sync server labels in credentials view
lib/app/modules/manage_task_champion_creds/views/manage_task_champion_creds_view.dart
Text bindings switch from ccsync* to syncServer* sentence keys for the sync onboarding UI text.
Test updates for renamed localization
test/utils/language/*
Language assertions are updated to expect the renamed syncServerCredentials getter and revised TaskChampion copy.

Estimated code review effort: 4 (Complex) | ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is still the template placeholder and lacks the required summary, issue number, dependencies, and checklist details. Replace the template text with a real summary, add the fixed issue number, list any dependencies, and complete the checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the main change: retiring CCSync.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
test/utils/taskchampion/taskchampion_test.dart (1)

40-52: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Mock the Rust bridge in this unit test.
saveCredentials() calls sync_() through RustLib.instance, but this test only sets up SharedPreferences. Without a mock RustLib/sync_ implementation, the sync call throws and the credentials are never persisted, so the prefs.getString(...) assertions fail.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/utils/taskchampion/taskchampion_test.dart` around lines 40 - 52, The
unit test for saving credentials is missing a mock for the Rust bridge, so
`controller.saveCredentials()` ends up calling `RustLib.instance.sync_()` and
fails before persistence completes. Update the test setup to stub the
`RustLib`/`sync_` call used by `saveCredentials()` in `taskchampion_test.dart`,
ensuring the method completes successfully before asserting the
`SharedPreferences` values.
🧹 Nitpick comments (2)
test/utils/language/sentences_test.dart (2)

11-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add GermanSentences and UrduSentences to the shared contract test list.

The PR updates German and Urdu sentence classes with the syncServer* rename, but neither is included in sentenceClasses. While Dart's abstract class enforcement catches missing implementations at compile time, adding them to this runtime contract test ensures they don't throw and return valid String values.

♻️ Proposed addition
     final sentenceClasses = [
       EnglishSentences(),
       HindiSentences(),
       MarathiSentences(),
       FrenchSentences(),
       SpanishSentences(),
       BengaliSentences(),
+      GermanSentences(),
+      UrduSentences(),
     ];
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/utils/language/sentences_test.dart` around lines 11 - 18, Add the
missing GermanSentences and UrduSentences instances to the sentenceClasses list
in the shared contract test so they are exercised alongside the existing
sentence implementations. Update the test setup in sentences_test.dart using the
sentenceClasses collection to include these two classes, ensuring the contract
test covers their syncServer* methods and verifies they return valid String
values without throwing.

20-177: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding expect calls for the remaining new syncServer* getters.

The test verifies syncServerCredentials (line 63) but not syncServerLoginInstruction, syncServerEasySyncTitle, syncServerOpenButton, syncServerIntro, syncServerSelfHosted, syncServerBackendUrl, or syncServerClientId. Since the test is named "should have all required getters," adding these would align the test with its stated purpose and guard against regressions in future language additions.

♻️ Proposed additions
         expect(sentences.navDrawerSettings, isA<String>());
         expect(sentences.syncServerCredentials, isA<String>());
+        expect(sentences.syncServerLoginInstruction, isA<String>());
+        expect(sentences.syncServerEasySyncTitle, isA<String>());
+        expect(sentences.syncServerOpenButton, isA<String>());
+        expect(sentences.syncServerIntro, isA<String>());
+        expect(sentences.syncServerSelfHosted, isA<String>());
+        expect(sentences.syncServerBackendUrl, isA<String>());
+        expect(sentences.syncServerClientId, isA<String>());
         expect(sentences.deleteTaskTitle, isA<String>());
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/utils/language/sentences_test.dart` around lines 20 - 177, The sentence
getter coverage in the test is incomplete: it checks `syncServerCredentials` but
skips the other new `syncServer*` getters. Update the `should have all required
getters` case in `sentences_test.dart` to add `expect` assertions for
`syncServerLoginInstruction`, `syncServerEasySyncTitle`, `syncServerOpenButton`,
`syncServerIntro`, `syncServerSelfHosted`, `syncServerBackendUrl`, and
`syncServerClientId` on each `sentenceClasses` entry so the test matches its
intended coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@lib/app/utils/language/german_sentences.dart`:
- Around line 5-15: The German localization string in german_sentences.dart has
a typo in syncServerIntro: “erhälst” should be corrected to “erhältst”. Update
the String getter syncServerIntro in GermanSentences so the TaskChampion intro
sentence uses the proper second-person singular form of erhalten.

In `@lib/app/utils/language/sentences.dart`:
- Around line 2-9: The TaskChampion test fixture is still using the old
ccsyncBackendUrl field, but ManageTaskChampionCredsController now reads
backend_url_tc through CredentialsStorage. Update taskchampion_test.dart to seed
and assert the backend URL via the same storage path CredentialsStorage uses, or
mock CredentialsStorage so the test exercises the current code path in
ManageTaskChampionCredsController rather than the legacy field.

---

Outside diff comments:
In `@test/utils/taskchampion/taskchampion_test.dart`:
- Around line 40-52: The unit test for saving credentials is missing a mock for
the Rust bridge, so `controller.saveCredentials()` ends up calling
`RustLib.instance.sync_()` and fails before persistence completes. Update the
test setup to stub the `RustLib`/`sync_` call used by `saveCredentials()` in
`taskchampion_test.dart`, ensuring the method completes successfully before
asserting the `SharedPreferences` values.

---

Nitpick comments:
In `@test/utils/language/sentences_test.dart`:
- Around line 11-18: Add the missing GermanSentences and UrduSentences instances
to the sentenceClasses list in the shared contract test so they are exercised
alongside the existing sentence implementations. Update the test setup in
sentences_test.dart using the sentenceClasses collection to include these two
classes, ensuring the contract test covers their syncServer* methods and
verifies they return valid String values without throwing.
- Around line 20-177: The sentence getter coverage in the test is incomplete: it
checks `syncServerCredentials` but skips the other new `syncServer*` getters.
Update the `should have all required getters` case in `sentences_test.dart` to
add `expect` assertions for `syncServerLoginInstruction`,
`syncServerEasySyncTitle`, `syncServerOpenButton`, `syncServerIntro`,
`syncServerSelfHosted`, `syncServerBackendUrl`, and `syncServerClientId` on each
`sentenceClasses` entry so the test matches its intended coverage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0b40e57d-3070-4e16-b684-e7d6b710ad7b

📥 Commits

Reviewing files that changed from the base of the PR and between f058b4a and bdab680.

📒 Files selected for processing (33)
  • lib/app/modules/home/controllers/home_controller.dart
  • lib/app/modules/home/views/home_page_app_bar.dart
  • lib/app/modules/home/views/show_tasks.dart
  • lib/app/modules/manage_task_champion_creds/controllers/manage_task_champion_creds_controller.dart
  • lib/app/modules/manage_task_champion_creds/views/manage_task_champion_creds_view.dart
  • lib/app/modules/taskc_details/controllers/taskc_details_controller.dart
  • lib/app/utils/language/bengali_sentences.dart
  • lib/app/utils/language/english_sentences.dart
  • lib/app/utils/language/french_sentences.dart
  • lib/app/utils/language/german_sentences.dart
  • lib/app/utils/language/hindi_sentences.dart
  • lib/app/utils/language/marathi_sentences.dart
  • lib/app/utils/language/sentences.dart
  • lib/app/utils/language/spanish_sentences.dart
  • lib/app/utils/language/urdu_sentences.dart
  • lib/app/v3/db/update.dart
  • lib/app/v3/models/task.dart
  • lib/app/v3/net/add_task.dart
  • lib/app/v3/net/complete.dart
  • lib/app/v3/net/delete.dart
  • lib/app/v3/net/fetch.dart
  • lib/app/v3/net/modify.dart
  • lib/app/v3/net/origin.dart
  • test/api_service_test.dart
  • test/api_service_test.mocks.dart
  • test/utils/language/bengali_sentences_test.dart
  • test/utils/language/english_sentences_test.dart
  • test/utils/language/french_sentences_test.dart
  • test/utils/language/hindi_sentences_test.dart
  • test/utils/language/marathi_sentences_test.dart
  • test/utils/language/sentences_test.dart
  • test/utils/language/spanish_sentences_test.dart
  • test/utils/taskchampion/taskchampion_test.dart
💤 Files with no reviewable changes (10)
  • lib/app/v3/net/fetch.dart
  • test/api_service_test.mocks.dart
  • lib/app/v3/net/add_task.dart
  • lib/app/v3/net/delete.dart
  • lib/app/v3/net/modify.dart
  • lib/app/v3/net/complete.dart
  • lib/app/modules/taskc_details/controllers/taskc_details_controller.dart
  • lib/app/modules/home/views/show_tasks.dart
  • lib/app/v3/db/update.dart
  • lib/app/v3/net/origin.dart

Comment on lines +5 to +15
String get syncServerLoginInstruction =>
'Melde dich bei TaskChampion an, kopiere deine Anmeldedaten und füge sie oben ein.';
@override
String get ccsyncEasySyncTitle => 'CCSync nutzen für einfachen Sync';
String get syncServerEasySyncTitle => 'TaskChampion nutzen für einfachen Sync';
@override
String get ccsyncOpenButton => 'CCSync öffnen';
String get syncServerOpenButton => 'TaskChampion öffnen';
@override
String get ccsyncIntro =>
'CCSync nutzt TaskChampion, um Aufgaben nahtlos über mehrere Geräte hinweg zu synchronisieren. Außerdem erhälst du ein Web-Dashboard, über das du deine Aufgaben von jedem Browser aus verwalten kannst.';
String get syncServerIntro =>
'TaskChampion synchronisiert deine Aufgaben nahtlos über mehrere Geräte hinweg. Außerdem erhälst du ein Web-Dashboard, über das du deine Aufgaben von jedem Browser aus verwalten kannst.';
@override
String get ccsyncSelfHosted =>
String get syncServerSelfHosted =>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Typo in German syncServerIntro: "erhälst" should be "erhältst".

The 2nd-person singular of erhalten is du erhältst. The current text is missing a 't', producing the invalid form "erhälst".

✏️ Proposed fix
   String get syncServerIntro =>
-      'TaskChampion synchronisiert deine Aufgaben nahtlos über mehrere Geräte hinweg. Außerdem erhälst du ein Web-Dashboard, über das du deine Aufgaben von jedem Browser aus verwalten kannst.';
+      'TaskChampion synchronisiert deine Aufgaben nahtlos über mehrere Geräte hinweg. Außerdem erhältst du ein Web-Dashboard, über das du deine Aufgaben von jedem Browser aus verwalten kannst.';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
String get syncServerLoginInstruction =>
'Melde dich bei TaskChampion an, kopiere deine Anmeldedaten und füge sie oben ein.';
@override
String get ccsyncEasySyncTitle => 'CCSync nutzen für einfachen Sync';
String get syncServerEasySyncTitle => 'TaskChampion nutzen für einfachen Sync';
@override
String get ccsyncOpenButton => 'CCSync öffnen';
String get syncServerOpenButton => 'TaskChampion öffnen';
@override
String get ccsyncIntro =>
'CCSync nutzt TaskChampion, um Aufgaben nahtlos über mehrere Geräte hinweg zu synchronisieren. Außerdem erhälst du ein Web-Dashboard, über das du deine Aufgaben von jedem Browser aus verwalten kannst.';
String get syncServerIntro =>
'TaskChampion synchronisiert deine Aufgaben nahtlos über mehrere Geräte hinweg. Außerdem erhälst du ein Web-Dashboard, über das du deine Aufgaben von jedem Browser aus verwalten kannst.';
@override
String get ccsyncSelfHosted =>
String get syncServerSelfHosted =>
String get syncServerLoginInstruction =>
'Melde dich bei TaskChampion an, kopiere deine Anmeldedaten und füge sie oben ein.';
`@override`
String get syncServerEasySyncTitle => 'TaskChampion nutzen für einfachen Sync';
`@override`
String get syncServerOpenButton => 'TaskChampion öffnen';
`@override`
String get syncServerIntro =>
'TaskChampion synchronisiert deine Aufgaben nahtlos über mehrere Geräte hinweg. Außerdem erhältst du ein Web-Dashboard, über das du deine Aufgaben von jedem Browser aus verwalten kannst.';
`@override`
String get syncServerSelfHosted =>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/app/utils/language/german_sentences.dart` around lines 5 - 15, The German
localization string in german_sentences.dart has a typo in syncServerIntro:
“erhälst” should be corrected to “erhältst”. Update the String getter
syncServerIntro in GermanSentences so the TaskChampion intro sentence uses the
proper second-person singular form of erhalten.

Comment on lines +2 to +9
/// TaskChampion UI additional sentences
String get syncServerLoginInstruction;
String get syncServerEasySyncTitle;
String get syncServerOpenButton;

/// TaskChampion intro and self-hosted sentences
String get syncServerIntro;
String get syncServerSelfHosted;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for any remaining references to the old getter names across the codebase.
rg -n 'ccsyncLoginInstruction|ccsyncEasySyncTitle|ccsyncOpenButton|ccsyncIntro|ccsyncSelfHosted|ccsyncCredentials|ccsyncBackendUrl|ccsyncClientId|taskchampionBackendUrl' --type=dart

Repository: CCExtractor/taskwarrior-flutter

Length of output: 169


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search the entire repository for any remaining old getter names or backend URL references.
rg -n --hidden --glob '!.git' \
  'ccsyncLoginInstruction|ccsyncEasySyncTitle|ccsyncOpenButton|ccsyncIntro|ccsyncSelfHosted|ccsyncCredentials|ccsyncBackendUrl|ccsyncClientId|taskchampionBackendUrl' .

Repository: CCExtractor/taskwarrior-flutter

Length of output: 398


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the test file and the production code that reads these preference keys.
git ls-files 'test/utils/taskchampion/taskchampion_test.dart' 'lib/**/taskchampion*' 'lib/**/sentences.dart' | sed 's#^`#FILE`: #'

printf '\n--- taskchampion_test.dart ---\n'
cat -n test/utils/taskchampion/taskchampion_test.dart

printf '\n--- references to ccsyncBackendUrl / taskchampionBackendUrl in lib and test ---\n'
rg -n --hidden --glob '!.git' 'ccsyncBackendUrl|taskchampionBackendUrl' lib test

Repository: CCExtractor/taskwarrior-flutter

Length of output: 3146


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n--- credentials_storage.dart ---\n'
cat -n lib/app/utils/taskchampion/credentials_storage.dart

printf '\n--- taskchampion_config_file_paths.dart ---\n'
cat -n lib/app/utils/home_path/impl/taskchampion_config_file_paths.dart

printf '\n--- all ccsync references ---\n'
rg -n --hidden --glob '!.git' 'ccsync[A-Za-z0-9_]*' lib test

Repository: CCExtractor/taskwarrior-flutter

Length of output: 3275


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n--- manage_task_champion_creds_controller.dart ---\n'
cat -n lib/app/modules/manage_task_champion_creds/controllers/manage_task_champion_creds_controller.dart

printf '\n--- shared_preferences key usage in taskchampion area ---\n'
rg -n --hidden --glob '!.git' "getString\\(|setString\\(|ccsyncBackendUrl|taskc_client_secret|taskc_client_id|backend_url_tc" lib test

Repository: CCExtractor/taskwarrior-flutter

Length of output: 6953


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the profile persistence method that writes the TaskChampion credentials.
sed -n '130,190p' lib/app/utils/taskfunctions/profiles.dart | cat -n

Repository: CCExtractor/taskwarrior-flutter

Length of output: 2656


Update the TaskChampion test fixture to match CredentialsStorage

test/utils/taskchampion/taskchampion_test.dart still seeds/asserts ccsyncBackendUrl, but ManageTaskChampionCredsController now reads backend_url_tc from the profile files via CredentialsStorage. Update the test to use the current storage path or mock the storage layer so it exercises the live code path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@lib/app/utils/language/sentences.dart` around lines 2 - 9, The TaskChampion
test fixture is still using the old ccsyncBackendUrl field, but
ManageTaskChampionCredsController now reads backend_url_tc through
CredentialsStorage. Update taskchampion_test.dart to seed and assert the backend
URL via the same storage path CredentialsStorage uses, or mock
CredentialsStorage so the test exercises the current code path in
ManageTaskChampionCredsController rather than the legacy field.

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