Add configurable widget display settings#22
Merged
Conversation
jvortmann
force-pushed
the
tasks-list-improvements
branch
from
May 13, 2026 19:47
b2aa594 to
d67d0e1
Compare
pe200012
added a commit
to pe200012/pi-tasks
that referenced
this pull request
May 16, 2026
# Conflicts: # src/ui/task-widget.ts
The widget hardcodes a 10-task cap which hides newer tasks. A new showAll boolean in TasksConfig lets users display every task when set to true. Default remains false to preserve existing behavior. Change-type: feature
The widget needs the live config object to honor settings like showAll. Inject it at construction time instead of using a setter since cfg is available when the widget is created. Change-type: refactor
Change-type: feature
Change-type: refactor
Replaces the hardcoded task limit with a user-configurable maxVisible setting. Defaults to 10 to preserve existing behavior. Ignored when showAll is true. Change-type: feature
Cycles through 5, 10, 15, 20, 30, 50, 100. Only applies when showAll is off. Change-type: feature
When set to "status", tasks are grouped as completed, in-progress, then pending — each sub-group ordered by ID. Defaults to "id" to preserve existing behaviour. Change-type: feature
The store is the natural place for sort order. Extract sortById and sortByStatus functions and let list() accept a sortOrder parameter. The widget delegates sorting to the store instead of sorting after the fact. Change-type: refactor
Change-type: feature
Sort tasks by updatedAt timestamp: "recent" shows most recently updated first, "oldest" shows least recently updated first. Available in the settings menu alongside the existing "id" and "status" options. Change-type: feature
When the task list exceeds maxVisible, "bottom" hides tasks from the end (default, existing behaviour) while "top" hides from the start — useful with status sort to collapse completed tasks while keeping active work visible. Change-type: feature
tintinweb
force-pushed
the
tasks-list-improvements
branch
from
May 30, 2026 20:21
d67d0e1 to
8acfe4b
Compare
Owner
|
thx 🙏 |
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.
Summary
The widget hardcodes a 10-task cap and always sorts by ID, which hides newer tasks and offers no way to customize the display. This PR adds five new settings to control how tasks are shown in the widget, all accessible from the
/tasks→ Settings menu.This is based on top of #21 .
New Settings
showAll(default:false)When
true, every task is shown regardless of the visible limit.{ "showAll": true }maxVisible(default:10)Caps how many task lines the widget shows. Only applies when
showAllisfalse. Configurable via menu: 5, 10, 15, 20, 30, 50, 100.{ "showAll": false, "maxVisible": 20 }sortOrder(default:"id")Controls task sort order in the widget:
"id"— creation order (existing behaviour)"status"— groups by completed → in-progress → pending"recent"— most recently updated first"oldest"— least recently updated first{ "sortOrder": "status" }hiddenAt(default:"bottom")When tasks exceed
maxVisible, controls where hidden tasks collapse:"bottom"— hides from the end of the list (existing behaviour)"top"— hides from the start (useful with"status"sort to collapse completed tasks while keeping active work visible){ "sortOrder": "status", "hiddenAt": "top", "maxVisible": 10 }Combined example
Show up to 15 tasks, sorted by status, with completed tasks collapsing at the top:
{ "sortOrder": "status", "hiddenAt": "top", "maxVisible": 15 }Details
TaskStore.list(sortOrder)with extracted comparator functions, keeping the widget thin.pi/tasks-config.jsonalongside existing settings