| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
📝 Walkthrough
WalkthroughThis PR addresses the inability to reset project filters and view tasks without assigned projects. It introduces a special "no project" filter option alongside the existing "all projects" option, adds localized translations across nine languages, and updates the project filtering logic to distinguish between unfiltered and explicitly filtered states. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches 🧪 Generate unit tests (beta)
Comment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)lib/app/modules/home/views/project_column_home_page.dart (1)lib/app/modules/home/views/project_column_taskc.dart (1)52-53: ⚠️ Potential issue | 🟡 Minor
Display will show sentinel value with extra spaces when "No Project" is selected.
When projectFilter equals HomeController.noProjectValue (i.e., " (No Project) "), line 53 displays it directly, including the leading/trailing spaces. Consider using the localized noProject string instead.
🔧 Suggested fix to display localized string🤖 Prompt for AI AgentsText( - projectFilter == "" ? SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.notSelected : projectFilter, + projectFilter == "" + ? SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.notSelected + : projectFilter == HomeController.noProjectValue + ? SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.noProject + : projectFilter, style: TextStyle(Verify each finding against the current code and only fix it if needed. In `@lib/app/modules/home/views/project_column_home_page.dart` around lines 52 - 53, The current Text uses projectFilter directly and will display the sentinel HomeController.noProjectValue (which contains surrounding spaces) verbatim; update the conditional in the widget that builds the label (where projectFilter is used) to check if projectFilter == HomeController.noProjectValue and, if so, use SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.noProject (localized string) instead of projectFilter, otherwise keep the existing projectFilter or the existing notSelected fallback; this ensures the "No Project" display is localized and does not include extra spaces.51-56: ⚠️ Potential issue | 🟡 Minor
Display will show sentinel value with extra spaces when "No Project" is selected.
Similar to project_column_home_page.dart, when projectFilter equals HomeController.noProjectValue, the header displays the raw sentinel value including spaces. Consider mapping to the localized string.
🔧 Suggested fix to display localized string🤖 Prompt for AI Agentschild: Text( projectFilter.isEmpty ? SentenceManager( currentLanguage: AppSettings.selectedLanguage) .sentences .notSelected + : projectFilter == HomeController.noProjectValue + ? SentenceManager( + currentLanguage: AppSettings.selectedLanguage) + .sentences + .noProject : projectFilter,Verify each finding against the current code and only fix it if needed. In `@lib/app/modules/home/views/project_column_taskc.dart` around lines 51 - 56, The header currently shows the raw sentinel "No Project" string with extra spaces because it only checks projectFilter.isEmpty; update the conditional to also detect when projectFilter == HomeController.noProjectValue and, in that case, return the localized sentinel via SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.noProject (or the equivalent localized property) instead of the raw projectFilter; modify the expression around projectFilter in project_column_taskc.dart to map HomeController.noProjectValue to the localized string while keeping the existing empty-string fallback to notSelected.
lib/app/modules/home/views/project_column_taskc.dart (1)🤖 Prompt for all review comments with AI agentslib/app/modules/home/controllers/home_controller.dart (1)75-81: Redundant lambda wrapper.
The callback: (val) => callback(val) is equivalent to callback: callback. This is a minor inconsistency since line 71 uses callback directly.
✨ Simplify callback🤖 Prompt for AI AgentsProjectTileTaskc( project: HomeController.noProjectValue, projectFilter: projectFilter, - callback: (val) => callback(val), + callback: callback, displayName: SentenceManager( currentLanguage: AppSettings.selectedLanguage, ).sentences.noProject),Verify each finding against the current code and only fix it if needed. In `@lib/app/modules/home/views/project_column_taskc.dart` around lines 75 - 81, The ProjectTileTaskc instantiation uses a redundant lambda for the callback prop; replace the wrapped form callback: (val) => callback(val) with the direct reference callback: callback to match the other usages (e.g., the earlier ProjectTileTaskc call) — update the ProjectTileTaskc call where project: HomeController.noProjectValue and projectFilter: projectFilter to pass callback directly.44-44: Consider using a more robust sentinel value.
The constant " (No Project) " with leading/trailing spaces works as a sentinel, but spaces can cause subtle issues:
- If accidentally displayed directly, the spaces would be visible
- Trimming operations elsewhere could break the sentinel check
A cleaner approach would use a value that's clearly invalid as a project name (e.g., a symbol prefix).
💡 Suggested alternative sentinel value- static const String noProjectValue = " (No Project) "; + static const String noProjectValue = "\u0000NO_PROJECT";Or simply document the intentional spaces:
🤖 Prompt for AI Agents+ /// Sentinel value for filtering tasks without a project. + /// Uses leading/trailing spaces to avoid collision with real project names. static const String noProjectValue = " (No Project) ";Verify each finding against the current code and only fix it if needed. In `@lib/app/modules/home/controllers/home_controller.dart` at line 44, Replace the fragile sentinel string used by the home controller: update the static const String noProjectValue to a clearly invalid, trim-safe sentinel (e.g., a symbol-prefixed token like "__NO_PROJECT__" or similar) and update any comparisons or UI uses of noProjectValue accordingly so they rely on the new token rather than whitespace; ensure the change is applied wherever noProjectValue is referenced (e.g., in HomeController and any view or comparison logic) and add a short comment documenting that the value is an internal sentinel that must not be displayed or trimmed.
Verify each finding against the current code and only fix it if needed. Outside diff comments: In `@lib/app/modules/home/views/project_column_home_page.dart`: - Around line 52-53: The current Text uses projectFilter directly and will display the sentinel HomeController.noProjectValue (which contains surrounding spaces) verbatim; update the conditional in the widget that builds the label (where projectFilter is used) to check if projectFilter == HomeController.noProjectValue and, if so, use SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.noProject (localized string) instead of projectFilter, otherwise keep the existing projectFilter or the existing notSelected fallback; this ensures the "No Project" display is localized and does not include extra spaces. In `@lib/app/modules/home/views/project_column_taskc.dart`: - Around line 51-56: The header currently shows the raw sentinel "No Project" string with extra spaces because it only checks projectFilter.isEmpty; update the conditional to also detect when projectFilter == HomeController.noProjectValue and, in that case, return the localized sentinel via SentenceManager(currentLanguage: AppSettings.selectedLanguage).sentences.noProject (or the equivalent localized property) instead of the raw projectFilter; modify the expression around projectFilter in project_column_taskc.dart to map HomeController.noProjectValue to the localized string while keeping the existing empty-string fallback to notSelected. --- Nitpick comments: In `@lib/app/modules/home/controllers/home_controller.dart`: - Line 44: Replace the fragile sentinel string used by the home controller: update the static const String noProjectValue to a clearly invalid, trim-safe sentinel (e.g., a symbol-prefixed token like "__NO_PROJECT__" or similar) and update any comparisons or UI uses of noProjectValue accordingly so they rely on the new token rather than whitespace; ensure the change is applied wherever noProjectValue is referenced (e.g., in HomeController and any view or comparison logic) and add a short comment documenting that the value is an internal sentinel that must not be displayed or trimmed. In `@lib/app/modules/home/views/project_column_taskc.dart`: - Around line 75-81: The ProjectTileTaskc instantiation uses a redundant lambda for the callback prop; replace the wrapped form callback: (val) => callback(val) with the direct reference callback: callback to match the other usages (e.g., the earlier ProjectTileTaskc call) — update the ProjectTileTaskc call where project: HomeController.noProjectValue and projectFilter: projectFilter to pass callback directly.
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: abbd71f6-37e6-4aae-ae91-ff90b024fb89
📥 CommitsReviewing files that changed from the base of the PR and between f058b4a and 8b277e6.
📒 Files selected for processing (12)
Sorry, something went wrong.
|
I did try your changes and the select options "No project" and "all projects" show no tasks at all although i have several without a project, and many with projects assigned. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
This PR fixes an issue where selecting "No Project" incorrectly displayed all tasks instead of only tasks without a project.
The root cause was that an empty string ("") was used to represent both:
All Projects (no filter applied)
No Project (tasks without a project name)
This overlap caused the filter to reset instead of isolating tasks with no assigned project.
Changes
Logic Separation
Introduced a sentinel constant HomeController.noProjectValue to explicitly represent the "No Project" filter state.
Updated HomeController._refreshTasks() to correctly filter tasks where:
project == null
project == ""
when the "No Project" filter is selected.
Added noProject translation keys to the Sentences localization system for all supported languages:
English
Hindi
Marathi
French
Spanish
Bengali
German
Urdu
UI Improvements
Added a dedicated "No Project" option to project filter views.
Fixed "All Projects" radio buttons to correctly clear the filter.
Removed redundant blank entries from dynamic project lists to prevent UI clutter.
Result
Selecting "No Project" now correctly displays only tasks without an assigned project, instead of resetting the filter and displaying all tasks.
Fixes #610
This PR resolves the bug reported in issue #610, where selecting the "No Project Name" filter failed to isolate tasks without projects.
Screenshots
Selecting "No Project" incorrectly displayed all tasks.
Selecting "No Project" correctly shows only tasks without a project.
Checklist
Summary by CodeRabbit