feat(pi): add configuration options for todo widget - #1369
Open
autt-carrum wants to merge 2 commits into
Open
Conversation
Adds two config-only keys in ~/.plannotator/config.json that reshape
the Pi extension's plannotator-progress widget without touching the
underlying checklist:
- widgetStyle: 'default' | 'compact' | positive integer N
* 'default' keeps the current one-line-per-item rendering.
* 'compact' collapses the widget to a single status line
(📋 done/total · next: <first remaining step>, or · all done).
* A positive integer N caps the widget at N item lines, preferring
remaining steps and backfilling with the most recent completed
ones so the widget stays populated. Dropped items are summarized
on a muted overflow line (… +K more todo / +K done, +M todo).
* Invalid values (0, negatives, non-integer numbers, unknown
strings) silently fall back to 'default' so a bad config never
blanks the widget.
- widgetMoveCompletedToEnd: boolean (default false)
* When true, the widget renders completed items after remaining
ones. The underlying checklist order is unchanged, so \${todoList},
[DONE:n] markers, the injected per-turn todo-status message, and
the pi-todos mirror all still see the original order.
* Has no visible effect under widgetStyle: 'compact'.
Both keys are config-file only — no PLANNOTATOR_WIDGET_* env override.
Adds resolver unit tests in packages/shared/config.test.ts covering
defaults, valid values, and invalid-value fallbacks for both keys.
Documents the pair in AGENTS.md and in apps/pi-extension/README.md
with JSON examples per style value.
feat(pi): configurable progress widget style and ordering
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.
Configurable Pi progress widget
The Pi extension's
plannotator-progresswidget renders one line per checklist item during plan execution. Long plans crowd the terminal, and there's no way to shrink it today. This PR adds two config-only keys in~/.plannotator/config.jsonthat reshape the widget without touching the underlying checklist.New settings
widgetStyle—"default"(unchanged behavior) ·"compact"(single📋 done/total · next: <step>line, or· all done) · positive integerN(cap the widget at N item lines, preferring remaining steps and backfilling with the most recent completed ones, with a muted overflow line summarizing what was dropped:… +K more todo,… +K done, or… +K done, +M todo).widgetMoveCompletedToEnd— boolean, defaultfalse. When true, the widget renders completed items after remaining ones.Both keys are config-file only — no
PLANNOTATOR_WIDGET_*env override. InvalidwidgetStylevalues (zero, negatives, non-integer numbers, unknown strings) silently fall back to"default"so a hand-edited config never blanks the widget.Widget-only
The status label, the phase-entry
${todoList}template, the injected per-turn todo-status message, and the pi-todos mirror all keep reading the raw checklist in its original order.widgetMoveCompletedToEndhas no visible effect underwidgetStyle: "compact"(nothing to reorder).Changes
packages/shared/config.tswidgetStyle/widgetMoveCompletedToEndtoPlannotatorConfig; addresolveWidgetStyle()returning aWidgetStyletagged union (default/compact/limit) andresolveWidgetMoveCompletedToEnd()apps/pi-extension/index.tsupdateWidgetto dispatch on style, partition and slice items for the limit path, emit the overflow linepackages/shared/config.test.tsapps/pi-extension/README.mdAGENTS.mdTest plan
bun test packages/shared/config.test.ts— 86 pass, 0 fail.📋 20/20 · all doneat completion) with a 20-step smoke plan.widgetStyle: 4,widgetMoveCompletedToEnd: true) with a 12-step plan — widget capped at 4 lines with backfilled completed items rendered below remaining ones and… +K done, +M more todooverflow.Backwards compatibility
Fully backwards compatible. Both keys are optional; unset config behaves identically to today.