Repository navigation
refactor(detail): modularize the task detail page and fix its save flow - #4
Closed
BrawlerXull wants to merge 4 commits into
Closed
BrawlerXull wants to merge 4 commits into
BrawlerXull wants to merge 4 commits into
Conversation
Split DetailRouteView into page components (app bar, body, save button, dialogs) matching the settings/about modules, and moved the page logic into DetailRouteController. All widgets in the module are now stateless; the tag editor's state lives in the controller. Bug fixes: - The save button now appears as soon as an edit is made (it was only evaluated on a full page rebuild). - Submit in the review dialog now saves and closes the page. Get.back() after Get.snackbar only dismissed the snackbar, leaving the dialog open. - Save/"task not found" messages use ScaffoldMessenger: Get.snackbar throws "No Overlay widget found" on current Flutter versions. - Editing an existing due/wait/until date works again; the picker parsed the display string with a mismatched format and threw FormatException. - Opening the page with bad arguments or an unknown task closes it with a message instead of crashing. - Saving is wrapped in error handling and reports failures. Cleanup: - Shared AttributeCard replaces the per-widget card boilerplate; each editor has its own file (dateTimePicker.dart -> date_time_widget.dart, start/project/tags route split out). Dead code and StatusWidgetData removed. - TaskAttribute enum replaces raw attribute-name strings. - WillPopScope -> PopScope; the tour starts once instead of every build. - New AppLogger (tagged, levelled, persisted via debugPrint) replaces the mix of print/debugPrint/loggy on this page. - Hardcoded strings localized; adds taskUpdateFailed, taskNotFound and pleaseEnterATag in all 8 languages. - Text controllers for project/tag editing are owned and disposed by the controller. Adds 26 controller and widget tests under test/modules/detail_route. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nto refactor/detail-route-modular
Found while testing the refactored detail page on a device:
- The review dialog's Submit button was drawn in primaryBackgroundColor
(carried over from the old view), making it nearly invisible on the
dialog. It now uses primaryTextColor, and the dialog uses
dialogBackgroundColor like the unsaved-changes dialog.
- The tags card used a different card/tile colour from every other card,
showing square corners and a mismatched background. All cards now
share the same style.
- The review dialog printed raw values ("null", "2026-10-20
21:14:00.000"). Values are now formatted exactly like the cards via a
shared formatAttributeValue helper.
Adds regression tests for dialog button colours, card styling and the
summary formatting.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nto refactor/detail-route-modular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Split DetailRouteView into page components (app bar, body, save button, dialogs) matching the settings/about modules, and moved the page logic into DetailRouteController. All widgets in the module are now stateless; the tag editor's state lives in the controller.
Bug fixes:
Cleanup:
Adds 26 controller and widget tests under test/modules/detail_route.
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_nowith the issue number which is fixed in this PRScreenshots
Checklist