Skip to content

feat: introducing task_info and improving task_edit#608

Open
Prashik-Sasane wants to merge 2 commits intoCCExtractor:mainfrom
Prashik-Sasane:feat/task-info-feat
Open

feat: introducing task_info and improving task_edit#608
Prashik-Sasane wants to merge 2 commits intoCCExtractor:mainfrom
Prashik-Sasane:feat/task-info-feat

Conversation

@Prashik-Sasane
Copy link
Contributor

@Prashik-Sasane Prashik-Sasane commented Feb 28, 2026

Description

This PR introduces the task_info page and improves task_edit and issue #382 & #385

  • Tap on the task then the task info will open. You can see task information in detail.
  • Click on the new annotation, you can create a remainder, description, and new things in the task info.
  • after clicking on the Add icon then task editor will open, then you can edit your changes.
  • Changes in the task editor is instantly shows in task_info page.

Fixes #385 & #382

Task info page for taskserver

taskinfo.mp4

Task info page for taskc(v3)

taskc.v3.mp4

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
    • Introduced a new Task Info screen displaying comprehensive task details including status, urgency, dates, project, priority, and tags.
    • Added annotation management functionality within the task detail view, allowing users to view and manage task annotations.
    • Updated task navigation throughout the app to route to the new unified task detail view.

@Prashik-Sasane
Copy link
Contributor Author

Prashik-Sasane commented Feb 28, 2026

Hey @SGI-CAPP-AT2 , @linuxcaffe & @Pavel401 I have fix this issue #382 & #385 and you can check the code.

@linuxcaffe
Copy link

linuxcaffe commented Feb 28, 2026 via email

@SGI-CAPP-AT2
Copy link
Collaborator

@Prashik-Sasane , does it work for tc v3?

@Prashik-Sasane
Copy link
Contributor Author

@SGI-CAPP-AT2 till now no, but if it is require so i can implement it?

@SGI-CAPP-AT2
Copy link
Collaborator

@SGI-CAPP-AT2 till now no, but if it is require so i can implement it?

Every change must be compatible with both mode

@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

📝 Walkthrough

Walkthrough

This pull request introduces support for task annotations as a complete feature. It adds a new Task Info Route module with binding, controller, and view components; includes bidirectional data conversion utilities for Task-Replica and Task-Champion formats in HomeController; updates navigation routes and view references to use the new route; and extends the TaskForC model with annotation copying.

Changes

Cohort / File(s) Summary
New Task Info Route Module
lib/app/modules/infoRoute/bindings/task_info_binding.dart, lib/app/modules/infoRoute/controllers/tasks_info_route_controller.dart, lib/app/modules/infoRoute/views/task_info_view.dart
New GetX route module for task details display with annotation management, including bindings, controller for task loading/conversion, and comprehensive UI for annotations with edit dialog support.
HomeController Data Conversion Utilities
lib/app/modules/home/controllers/home_controller.dart
Added six methods for bidirectional Task conversions: mergeReplica/convertTaskToReplica/convertReplicaToTask for replica sync, and mergeTaskChampion/convertTaskToTaskForC/convertTaskForCToTask for champion data with annotation handling.
Navigation Route Definitions
lib/app/routes/app_routes.dart, lib/app/routes/app_pages.dart
Added new TASK_INFO_ROUTE constant and corresponding GetPage entry with TasksInfoView and TasksInfoRouteBinding.
Navigation Updates in Views
lib/app/modules/home/views/show_tasks.dart, lib/app/modules/home/views/show_tasks_replica.dart, lib/app/modules/home/views/tasks_builder.dart
Updated navigation targets from TASKC_DETAILS/DETAIL_ROUTE to the new TASK_INFO_ROUTE while preserving task UUID arguments.
Model Enhancement
lib/app/v3/models/task.dart
Updated TaskForC.fromJson to parse annotations array via Annotation.fromJson and added copyWith method for annotation field overrides.
Test Coverage
test/routes/app_routes_test.dart
Added test assertion verifying TASK_INFO_ROUTE constant equals '/task-info-route'.

Sequence Diagram

sequenceDiagram
    participant User
    participant TaskCard as Task Card View
    participant Navigation as Get.toNamed
    participant TaskInfoCtrl as TasksInfoRouteController
    participant HomeCtrl as HomeController
    participant DB as Database/Model
    participant TaskInfoView as Task Info View

    User->>TaskCard: Tap task
    TaskCard->>Navigation: toNamed(TASK_INFO_ROUTE, args: uuid)
    Navigation->>TaskInfoCtrl: Route to controller
    TaskInfoCtrl->>TaskInfoCtrl: onInit() extracts uuid
    TaskInfoCtrl->>TaskInfoCtrl: loadTask()
    
    alt taskchampion flag
        TaskInfoCtrl->>DB: getByUUID(uuid)
        DB-->>TaskInfoCtrl: TaskForC
        TaskInfoCtrl->>HomeCtrl: convertTaskForCToTask(TaskForC)
        HomeCtrl-->>TaskInfoCtrl: Task with annotations
    else taskReplica flag
        TaskInfoCtrl->>HomeCtrl: refreshReplicaTasks()
        HomeCtrl->>DB: Fetch replicas
        DB-->>HomeCtrl: TaskForReplica[]
        TaskInfoCtrl->>HomeCtrl: convertReplicaToTask(TaskForReplica)
        HomeCtrl-->>TaskInfoCtrl: Task
    else default
        TaskInfoCtrl->>HomeCtrl: getTask(uuid)
        HomeCtrl-->>TaskInfoCtrl: Task
    end
    
    TaskInfoCtrl->>TaskInfoView: Update task Rx
    TaskInfoView->>User: Display task details + annotations
    User->>TaskInfoView: Click add/edit annotation
    TaskInfoView->>TaskInfoView: Open annotation dialog
    User->>TaskInfoView: Save annotation
    TaskInfoView->>HomeCtrl: mergeTaskChampion()/mergeReplica()
    HomeCtrl->>DB: Persist task
    HomeCtrl->>TaskInfoCtrl: Trigger loadTask()
    TaskInfoCtrl->>TaskInfoView: Update annotations
    TaskInfoView->>User: Display updated annotations
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A rabbit hops with glee so bright, 🐰
Annotations flutter into sight!
Notes on tasks, both old and new,
Synced across the morning dew,
Taskwarrior dreams now coming true! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive While the PR addresses issue #382 (annotations support), the implementation's compatibility with taskwarrior v3 mode (noted in comments as required) cannot be fully verified from code changes alone. Clarify v3 mode compatibility status or confirm that all annotation and task_info functionality works across both standard and v3 modes as required by maintainers.
Out of Scope Changes check ❓ Inconclusive Most changes align with feature objectives, but the introduction of task conversion utilities (convertTaskToTaskForC, convertTaskForCToTask, mergeTaskChampion) may extend beyond issue #382 scope, particularly given unclear v3 compatibility requirements. Verify that all conversion utilities and Champion-related methods are necessary for the stated objectives or clarify if they address the unspecified issue #385.
Description check ❓ Inconclusive The PR description is missing the required 'Screenshots' section heading and doesn't explicitly list dependencies. The 'Fixes' section is present but format deviates from template. Add a proper 'Screenshots' section with images, ensure consistent formatting for issue references, and explicitly list any dependencies required for this change.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: introducing task_info and improving task_edit' clearly summarizes the main changes: introducing a new task_info page and improving the task_edit functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
lib/app/modules/home/views/show_tasks_replica.dart (1)

125-126: Remove the stale commented navigation line.

Keeping only the active Get.toNamed(Routes.TASK_INFO_ROUTE, ...) line will reduce noise in this tap handler.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/home/views/show_tasks_replica.dart` around lines 125 - 126,
Remove the stale commented navigation line so only the active navigation call
remains: delete the commented Get.toNamed(Routes.TASKC_DETAILS, arguments: task)
and keep Get.toNamed(Routes.TASK_INFO_ROUTE, arguments: task) inside the tap
handler in show_tasks_replica.dart to reduce noise.
lib/app/modules/home/views/show_tasks.dart (1)

181-185: Clean up commented debug/legacy onTap lines.

Consider removing the commented TASKC_DETAILS and debug print lines now that TASK_INFO_ROUTE is the stable target.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/home/views/show_tasks.dart` around lines 181 - 185, Remove
the legacy commented onTap lines and debug print so the widget contains a single
clear navigation handler: delete the commented references to
Routes.TASKC_DETAILS and the print statement and keep only the onTap that calls
Get.toNamed(Routes.TASK_INFO_ROUTE, arguments: task) (locate the onTap block
around Get.toNamed in the same widget to update).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@lib/app/modules/home/controllers/home_controller.dart`:
- Around line 293-300: The task conversion code is currently using
DateTime.parse on persisted strings (fields t.entry, t.due, t.start, t.wait,
t.modified, t.end) which will throw FormatException for empty or malformed
values; update the conversion logic in the method containing those chained
assignments and in the similar convertTaskForReplicaToTask method to use
DateTime.tryParse(...) for each timestamp and fall back to null (or an
appropriate default) when tryParse returns null, ensuring you replace
DateTime.parse(...) calls for t.entry and the other fields with defensive
tryParse usage and explicit null handling.

In `@lib/app/modules/infoRoute/bindings/task_info_binding.dart`:
- Around line 1-4: Remove the unused import 'dart:io' from
task_info_binding.dart (the binding that contains imports including
package:flutter/material.dart, package:flutter_slidable/flutter_slidable.dart,
and package:get/get.dart); locate the top-of-file import list in the TaskInfo
binding and delete the line "import 'dart:io';" so only used packages remain
imported.

In `@lib/app/modules/infoRoute/controllers/tasks_info_route_controller.dart`:
- Around line 15-19: The current assignment of uuid assumes arguments is a List
with at least two items or an object with a .uuid property; add defensive
validation before using arguments: when arguments is List check arguments.length
> 1 and that arguments[1] is a non-null String before assigning uuid, otherwise
handle the error or fallback; when not a List, check that arguments has a uuid
(e.g., arguments != null && arguments.uuid is String) or provide alternative
extraction (e.g., check for Map with 'uuid' key) and handle missing/invalid
values consistently (return error, null, or throw). Update the block around the
if(arguments is List) { ... } else { ... } to perform these guards and clear
fallback/error handling.

In `@lib/app/modules/infoRoute/views/task_info_view.dart`:
- Around line 243-254: The action buttons created by
actionButton("done"/"start"/"wait"/"delete") only call controller.loadTask() and
therefore do nothing to change task state; replace each handler to invoke the
appropriate controller methods (e.g.,
controller.markDone()/controller.startTask()/controller.waitTask()/controller.deleteTask()
or whatever existing mutator methods are defined on the controller) and then
refresh state (call controller.loadTask() or update the task in-place) so the UI
and backend reflect the action; locate the handlers inside actionButton(...)
calls in task_info_view.dart and wire each label to its corresponding controller
method and handle success/error (update/load task) accordingly.
- Around line 107-114: The navigation call using Get.to(() => DetailRouteView(),
binding: DetailRouteBinding(), arguments: ["uuid", controller.uuid]) in the else
branch is not awaited causing controller.loadTask() to run before navigation
completes; update that call to await the Get.to(...) invocation so the method
DetailRouteView navigation completes before calling controller.loadTask(),
preserving the existing pattern used earlier and preventing the race with
controller.loadTask().

---

Nitpick comments:
In `@lib/app/modules/home/views/show_tasks_replica.dart`:
- Around line 125-126: Remove the stale commented navigation line so only the
active navigation call remains: delete the commented
Get.toNamed(Routes.TASKC_DETAILS, arguments: task) and keep
Get.toNamed(Routes.TASK_INFO_ROUTE, arguments: task) inside the tap handler in
show_tasks_replica.dart to reduce noise.

In `@lib/app/modules/home/views/show_tasks.dart`:
- Around line 181-185: Remove the legacy commented onTap lines and debug print
so the widget contains a single clear navigation handler: delete the commented
references to Routes.TASKC_DETAILS and the print statement and keep only the
onTap that calls Get.toNamed(Routes.TASK_INFO_ROUTE, arguments: task) (locate
the onTap block around Get.toNamed in the same widget to update).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1f4c8ab4-cfcf-4696-944d-fd6fd1799292

📥 Commits

Reviewing files that changed from the base of the PR and between 588fc49 and 981f5ba.

📒 Files selected for processing (11)
  • lib/app/modules/home/controllers/home_controller.dart
  • lib/app/modules/home/views/show_tasks.dart
  • lib/app/modules/home/views/show_tasks_replica.dart
  • lib/app/modules/home/views/tasks_builder.dart
  • lib/app/modules/infoRoute/bindings/task_info_binding.dart
  • lib/app/modules/infoRoute/controllers/tasks_info_route_controller.dart
  • lib/app/modules/infoRoute/views/task_info_view.dart
  • lib/app/routes/app_pages.dart
  • lib/app/routes/app_routes.dart
  • lib/app/v3/models/task.dart
  • test/routes/app_routes_test.dart

Comment on lines +293 to +300
..due = t.due != null ? DateTime.parse(t.due!) : null
..start = t.start != null ? DateTime.parse(t.start!) : null
..wait = t.wait != null ? DateTime.parse(t.wait!) : null
..entry = DateTime.parse(t.entry)
..modified = t.modified != null
? DateTime.parse(t.modified!)
: null
..end = t.end != null ? DateTime.parse(t.end!) : null
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, locate and examine the file
find . -name "home_controller.dart" -type f

Repository: CCExtractor/taskwarrior-flutter

Length of output: 130


🏁 Script executed:

# Read the specific file around the mentioned lines
if [ -f "lib/app/modules/home/controllers/home_controller.dart" ]; then
  echo "=== Lines 290-315 ===" 
  sed -n '290,315p' lib/app/modules/home/controllers/home_controller.dart | cat -n
fi

Repository: CCExtractor/taskwarrior-flutter

Length of output: 1195


🏁 Script executed:

# Search for all DateTime.parse and DateTime.tryParse usage in the codebase
rg -n "DateTime\.(parse|tryParse)" --type=dart -B2 -A2

Repository: CCExtractor/taskwarrior-flutter

Length of output: 15552


🏁 Script executed:

# Check specifically in the home_controller.dart file
if [ -f "lib/app/modules/home/controllers/home_controller.dart" ]; then
  echo "=== DateTime parsing in home_controller.dart ===" 
  rg -n "DateTime\.(parse|tryParse)" lib/app/modules/home/controllers/home_controller.dart -B3 -A3
fi

Repository: CCExtractor/taskwarrior-flutter

Length of output: 1416


🏁 Script executed:

# Get context about the convertTaskForCToTask method
if [ -f "lib/app/modules/home/controllers/home_controller.dart" ]; then
  echo "=== Searching for convertTaskForCToTask method ===" 
  rg -n "convertTaskForCToTask" lib/app/modules/home/controllers/home_controller.dart -B5 -A50
fi

Repository: CCExtractor/taskwarrior-flutter

Length of output: 2155


Harden persisted timestamp parsing in task conversions.

Lines 293–300 and 309 use DateTime.parse() on stored values without defensive checks. Line 296 (..entry = DateTime.parse(t.entry)) is particularly risky—any malformed or empty string will throw FormatException and crash task loading. Empty strings pass null-checks but will still cause crashes.

Replace with DateTime.tryParse() and explicit fallback handling. This pattern is already used elsewhere in the codebase (e.g., lines 357, 367 in taskc_details_controller.dart).

Also applies to the similar conversion method at lines 234–242 (convertTaskForReplicaToTask).

Proposed fix example
   Task convertTaskForCToTask(TaskForC t) {
+  DateTime? _safeParse(String? raw) {
+    if (raw == null || raw.isEmpty) return null;
+    return DateTime.tryParse(raw);
+  }
+  final fallbackNow = DateTime.now().toUtc();
+
   return Task((b) => b
     ..id = t.id
     ..uuid = t.uuid
     ..description = t.description
     ..status = t.status
     ..project = t.project
     ..priority = t.priority
-    ..due = t.due != null ? DateTime.parse(t.due!) : null
-    ..start = t.start != null ? DateTime.parse(t.start!) : null
-    ..wait = t.wait != null ? DateTime.parse(t.wait!) : null
-    ..entry = DateTime.parse(t.entry)
-    ..modified = t.modified != null
-        ? DateTime.parse(t.modified!)
-        : null
-    ..end = t.end != null ? DateTime.parse(t.end!) : null
+    ..due = _safeParse(t.due)
+    ..start = _safeParse(t.start)
+    ..wait = _safeParse(t.wait)
+    ..entry = _safeParse(t.entry) ?? fallbackNow
+    ..modified = _safeParse(t.modified)
+    ..end = _safeParse(t.end)
     ..tags = t.tags != null
         ? ListBuilder<String>(t.tags!)
         : null
     ..annotations = t.annotations != null
         ? ListBuilder<Annotation>(
             t.annotations!.map(
               (a) => Annotation((ann) => ann
                 ..description = a.description ?? ''
-                ..entry = DateTime.parse(a.entry ?? DateTime.now().toIso8601String())),
+                ..entry = _safeParse(a.entry) ?? fallbackNow),
             ),
           )
         : null     
   );
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/home/controllers/home_controller.dart` around lines 293 -
300, The task conversion code is currently using DateTime.parse on persisted
strings (fields t.entry, t.due, t.start, t.wait, t.modified, t.end) which will
throw FormatException for empty or malformed values; update the conversion logic
in the method containing those chained assignments and in the similar
convertTaskForReplicaToTask method to use DateTime.tryParse(...) for each
timestamp and fall back to null (or an appropriate default) when tryParse
returns null, ensuring you replace DateTime.parse(...) calls for t.entry and the
other fields with defensive tryParse usage and explicit null handling.

Comment on lines +1 to +4
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
import 'package:get/get.dart';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Step 1: Verify dart:io import in the specific file
echo "=== Checking the specific file ==="
cat -n lib/app/modules/infoRoute/bindings/task_info_binding.dart | head -20

Repository: CCExtractor/taskwarrior-flutter

Length of output: 719


🏁 Script executed:

#!/bin/bash
# Step 2: Check if dart:io is actually used in the binding file
echo "=== Checking if dart:io is used in the binding ==="
rg "dart:io" lib/app/modules/infoRoute/bindings/task_info_binding.dart -A 5 -B 5

Repository: CCExtractor/taskwarrior-flutter

Length of output: 450


🏁 Script executed:

#!/bin/bash
# Step 3: Search for all dart:io imports in lib/
echo "=== All dart:io imports in lib/ ==="
rg -n "^import 'dart:io';" lib/ -C 1

Repository: CCExtractor/taskwarrior-flutter

Length of output: 5009


🏁 Script executed:

#!/bin/bash
# Step 4: Check if this binding is conditionally imported for web
echo "=== Searching for conditional imports or web guards ==="
rg -n "dart:io|web" lib/app/modules/infoRoute/bindings/ -B 2 -A 2

Repository: CCExtractor/taskwarrior-flutter

Length of output: 425


Remove unused dart:io import from this binding.

Line 1 imports dart:io but it is not used anywhere in the binding file. Bindings should only import dependencies they directly reference. Removing this unused import improves code cleanliness.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/infoRoute/bindings/task_info_binding.dart` around lines 1 -
4, Remove the unused import 'dart:io' from task_info_binding.dart (the binding
that contains imports including package:flutter/material.dart,
package:flutter_slidable/flutter_slidable.dart, and package:get/get.dart);
locate the top-of-file import list in the TaskInfo binding and delete the line
"import 'dart:io';" so only used packages remain imported.

Comment on lines +15 to +19
if(arguments is List){
uuid = arguments[1] as String;
} else{
uuid = arguments.uuid;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n lib/app/modules/infoRoute/controllers/tasks_info_route_controller.dart | head -40

Repository: CCExtractor/taskwarrior-flutter

Length of output: 1622


🏁 Script executed:

rg -nP --type=dart "Routes\.TASK_INFO_ROUTE" -B2 -A2

Repository: CCExtractor/taskwarrior-flutter

Length of output: 2685


🏁 Script executed:

rg -nP --type=dart "Get\.toNamed\(\s*Routes\.TASK_INFO_ROUTE" -C3

Repository: CCExtractor/taskwarrior-flutter

Length of output: 3137


🏁 Script executed:

rg -nP --type=dart "TASK_INFO_ROUTE" -C2

Repository: CCExtractor/taskwarrior-flutter

Length of output: 3944


Validate List bounds and argument shape before assigning uuid.

Lines 15–19 assume List has at least 2 elements and non-list arguments have a .uuid property. Add defensive checks to prevent RangeError and NoSuchMethodError on unexpected argument shapes.

Minimal fix
-    if(arguments is List){
-      uuid = arguments[1] as String;
-    } else{
-      uuid = arguments.uuid;
-    }
+    if (arguments is List && arguments.length > 1) {
+      uuid = arguments[1] as String;
+    } else if (arguments is! List) {
+      uuid = arguments.uuid;
+    } else {
+      throw ArgumentError('Invalid TASK_INFO_ROUTE arguments: $arguments');
+    }
📝 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
if(arguments is List){
uuid = arguments[1] as String;
} else{
uuid = arguments.uuid;
}
if (arguments is List && arguments.length > 1) {
uuid = arguments[1] as String;
} else if (arguments is! List) {
uuid = arguments.uuid;
} else {
throw ArgumentError('Invalid TASK_INFO_ROUTE arguments: $arguments');
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/infoRoute/controllers/tasks_info_route_controller.dart`
around lines 15 - 19, The current assignment of uuid assumes arguments is a List
with at least two items or an object with a .uuid property; add defensive
validation before using arguments: when arguments is List check arguments.length
> 1 and that arguments[1] is a non-null String before assigning uuid, otherwise
handle the error or fallback; when not a List, check that arguments has a uuid
(e.g., arguments != null && arguments.uuid is String) or provide alternative
extraction (e.g., check for Map with 'uuid' key) and handle missing/invalid
values consistently (return error, null, or throw). Update the block around the
if(arguments is List) { ... } else { ... } to perform these guards and clear
fallback/error handling.

Comment on lines +107 to +114
Get.to(
() => DetailRouteView(),
binding: DetailRouteBinding(),
arguments: ["uuid", controller.uuid],
);
}
await controller.loadTask();
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

rg -n -C2 "await Get\.to\(|Get\.to\(" lib/app/modules/infoRoute/views/task_info_view.dart

Repository: CCExtractor/taskwarrior-flutter

Length of output: 1255


🏁 Script executed:

sed -n '100,120p' lib/app/modules/infoRoute/views/task_info_view.dart

Repository: CCExtractor/taskwarrior-flutter

Length of output: 705


Add await to navigation in else branch to prevent race condition.

Line 107 Get.to() is not awaited in the non-taskchampion/non-replica branch, unlike lines 86 and 98. This causes controller.loadTask() on line 113 to execute before navigation completes, potentially reloading the task before edits are made.

Proposed fix
                } 
                else {
-                  Get.to(
+                  await Get.to(
                     () => DetailRouteView(),
                     binding: DetailRouteBinding(),
                     arguments: ["uuid", controller.uuid],
                   );
                 }
                 await controller.loadTask();
📝 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
Get.to(
() => DetailRouteView(),
binding: DetailRouteBinding(),
arguments: ["uuid", controller.uuid],
);
}
await controller.loadTask();
}
await Get.to(
() => DetailRouteView(),
binding: DetailRouteBinding(),
arguments: ["uuid", controller.uuid],
);
}
await controller.loadTask();
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/infoRoute/views/task_info_view.dart` around lines 107 - 114,
The navigation call using Get.to(() => DetailRouteView(), binding:
DetailRouteBinding(), arguments: ["uuid", controller.uuid]) in the else branch
is not awaited causing controller.loadTask() to run before navigation completes;
update that call to await the Get.to(...) invocation so the method
DetailRouteView navigation completes before calling controller.loadTask(),
preserving the existing pattern used earlier and preventing the race with
controller.loadTask().

Comment on lines +243 to +254
actionButton("done", const Color.fromARGB(255, 54, 188, 58), () {
controller.loadTask();
}),
actionButton("start", const Color.fromARGB(255, 206, 190, 47), () {
controller.loadTask();
}),
actionButton("wait", const Color.fromARGB(255, 35, 110, 240), () {
controller.loadTask();
}),
actionButton("delete", const Color.fromARGB(255, 219, 28, 14), () {
controller.loadTask();
}),
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Action buttons are currently no-ops.

Lines 243–254 label buttons as done/start/wait/delete, but each handler only calls controller.loadTask() and does not change task state.

This is a user-facing behavior gap in the task info actions.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@lib/app/modules/infoRoute/views/task_info_view.dart` around lines 243 - 254,
The action buttons created by actionButton("done"/"start"/"wait"/"delete") only
call controller.loadTask() and therefore do nothing to change task state;
replace each handler to invoke the appropriate controller methods (e.g.,
controller.markDone()/controller.startTask()/controller.waitTask()/controller.deleteTask()
or whatever existing mutator methods are defined on the controller) and then
refresh state (call controller.loadTask() or update the task in-place) so the UI
and backend reflect the action; locate the handlers inside actionButton(...)
calls in task_info_view.dart and wire each label to its corresponding controller
method and handle success/error (update/load task) accordingly.

@Prashik-Sasane
Copy link
Contributor Author

Prashik-Sasane commented Mar 4, 2026

Hello @linuxcaffe, @Pavel401, and @SGI-CAPP-AT2. Now, it works for taskc v3 as well, and now our project is doesn't support annotations in Replica mode. If you have permission, then I can try annotations for Taskc v3, but for Taskserver it is working fine.

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.

UI mockups: introducing task_info and improving task_edit

3 participants