Improve "view-all" page - #2
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the "view-all" page by refactoring the task display mechanism from a layout-based approach to a table-based presentation. The changes improve the visual organization of tasks grouped by status.
Key changes:
- Replaced
LayoutandPanelcomponents with aTablecomponent for displaying tasks - Refactored task grouping to use integer status indices instead of string identifiers
- Added helper methods to build task rows and separator rules for better visual separation
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/tasks/presenters/view_all_presenter.py | Refactored presentation logic to use Rich tables with separate methods for building task rows and rule separators |
| src/tasks/models/task.py | Added iter_status_indices() helper method and changed group_by_status() return type from string-keyed to int-keyed dict |
| tests/tasks/models/test_task.py | Added test coverage for the new iter_status_indices() method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| rows.append(task_row) | ||
| rows.append(rule_row) | ||
|
|
||
| rows.append(tasks_rows[-1]) |
There was a problem hiding this comment.
This code will fail with an IndexError when tasks_rows is empty. Add a guard condition to handle the case when there are no tasks, or ensure tasks_rows has at least one element before accessing tasks_rows[-1].
Suggested change
| rows.append(tasks_rows[-1]) | |
| if tasks_rows: | |
| rows.append(tasks_rows[-1]) |
fillipe-gsm
force-pushed
the
1-improve-view-all-page
branch
2 times, most recently
from
November 1, 2025 00:27
2870c2b to
156a91b
Compare
The previous visualization always used the full terminal, and this is bad: - the new line after printing gets rid of the statuses names - in case the terminal is too short, it clips some tasks This commit replaces it with a table view, which, granted, is not as nice, but should solve the previous issues.
- Make the columns of equal width with ratio=1 - Center only the table headers and keep the content left justified
fillipe-gsm
force-pushed
the
1-improve-view-all-page
branch
from
November 3, 2025 21:52
7fc153a to
0364f17
Compare
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.
Handles #1.
Currently, the "view-all" view used a
Layoutto display the data. However, this always covers the entire terminal, which may be too much sometimes or too little and cut some content.In this pull request, I replaced it with a simple(r)
Tableview as shown below:It is not that nice looking as before but it should fix the previous issues.