Skip to content

Commit 72a8c19

Browse files
committed
Add dashboard progress gauge panel and gadget
1 parent 2a649dc commit 72a8c19

12 files changed

Lines changed: 1388 additions & 1 deletion

File tree

docs/features/dashboard/cockpit/panels/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Expanded feature docs for cockpit panels.
1515
10. `docs/features/dashboard/cockpit/panels/panel_checklist.md`
1616
11. `docs/features/dashboard/cockpit/panels/panel_flashcards.md`
1717
12. `docs/features/dashboard/cockpit/panels/panel_random_picker.md`
18+
13. `docs/features/dashboard/cockpit/panels/panel_progress_gauge.md`
1819

1920
## Full List
2021
- `docs/features/dashboard/cockpit/panels/panel_checklist.md`
@@ -26,6 +27,7 @@ Expanded feature docs for cockpit panels.
2627
- `docs/features/dashboard/cockpit/panels/panel_map_of_happiness.md`
2728
- `docs/features/dashboard/cockpit/panels/panel_matrix.md`
2829
- `docs/features/dashboard/cockpit/panels/panel_matrix_visuals.md`
30+
- `docs/features/dashboard/cockpit/panels/panel_progress_gauge.md`
2931
- `docs/features/dashboard/cockpit/panels/panel_random_picker.md`
3032
- `docs/features/dashboard/cockpit/panels/panel_schedule.md`
3133
- `docs/features/dashboard/cockpit/panels/panel_status_strip.md`
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Progress Gauge Panel
2+
3+
## Overview
4+
Ring-based progress panel for countdowns, numeric goals, and item-backed numeric progress.
5+
Panels are modular cockpit components and should remain composable in multi-panel layouts.
6+
7+
## CLI
8+
- Related command patterns: `list goal; track goal; view milestone; today`.
9+
- CLI remains the deterministic fallback for inspecting source items or updating tracked values.
10+
- Syntax reference: `docs/reference/cli_commands.md`.
11+
12+
## Dashboard
13+
- Runtime source: `utilities/dashboard/panels/progress_gauge/`
14+
- Mount contract: panel registration and lifecycle through cockpit panel manager.
15+
- API endpoints used by this panel:
16+
- `/api/item?type=&name=`
17+
18+
## Data and Settings
19+
- Reads/writes canonical `user/*` state via dashboard APIs.
20+
- Panel-specific gauge configurations persist in browser local storage.
21+
22+
## Operational Workflows
23+
1. Add panel to Cockpit and create one or more gauges.
24+
2. Configure a countdown, numeric goal, or item-backed property gauge.
25+
3. Refresh and verify the ring state reflects current values.
26+
4. Reload the dashboard and confirm panel gauge configs persist.
27+
28+
## Validation
29+
1. Open Cockpit and mount `Progress Gauge`.
30+
2. Configure at least one countdown gauge and one numeric gauge.
31+
3. Confirm persistence and absence of API/runtime errors.
32+
33+
## Related Docs
34+
- `docs/guides/cockpit.md`
35+
- `docs/guides/dashboard.md`
36+
- `docs/reference/dashboard_api.md`
37+
- `docs/reference/cli_commands.md`
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Progress Gauge Gadget
2+
3+
## Overview
4+
Single-gauge dock gadget for glanceable progress against a countdown, numeric target, or item-backed numeric property.
5+
6+
## Dashboard
7+
- Runtime source: `utilities/dashboard/gadgets/progress_gauge/`
8+
- Registry metadata: `utilities/dashboard/gadgets/progress_gauge/gadget.yml`
9+
- API endpoints used by this gadget:
10+
- `/api/item?type=&name=`
11+
12+
## Data and Settings
13+
- Gadget-specific configuration persists in browser local storage.
14+
- Numeric gauges can be fully local; item-backed gauges read canonical item state through dashboard APIs.
15+
16+
## Operational Workflows
17+
1. Enable the gadget from the topbar `Gadgets` menu.
18+
2. Click the gadget to open its editor.
19+
3. Configure a countdown, numeric, or item-backed gauge.
20+
4. Refresh and verify the compact ring matches the configured state.
21+
22+
## Validation
23+
1. Enable `Progress Gauge` in the dock.
24+
2. Configure a countdown gauge.
25+
3. Confirm the gadget persists across reload and refreshes without console errors.
26+
27+
## Related Docs
28+
- `docs/guides/gadgets_and_dock.md`
29+
- `docs/reference/dashboard_api.md`

docs/features/dashboard/dock/gadgets/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Expanded feature docs for dock gadgets.
55
## Recommended Reading Order
66
1. `docs/features/dashboard/dock/gadgets/gadget_reschedule.md`
77
2. `docs/features/dashboard/dock/gadgets/gadget_timer.md`
8+
3. `docs/features/dashboard/dock/gadgets/gadget_progress_gauge.md`
89

910
## Full List
1011
- `docs/features/dashboard/dock/gadgets/gadget_reschedule.md`
1112
- `docs/features/dashboard/dock/gadgets/gadget_timer.md`
13+
- `docs/features/dashboard/dock/gadgets/gadget_progress_gauge.md`

docs/guides/cockpit.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The Cockpit is the dashboard’s drag-and-drop canvas for live panels. It shares
2020
- **Commitments** - Snapshot of rules, violations, on-track counts; evaluate via `/api/cli commitments check`.
2121
- **Map of Happiness** - Reads `user/settings/map_of_happiness.yml`; shows coverage/satisfaction.
2222
- **Status Strip** - Horizontal ticker of status indicators, color-coded by priority.
23+
- **Progress Gauge** - One or more circular gauges for countdowns and numeric targets.
2324

2425
## Data Sources
2526

docs/guides/gadgets_and_dock.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ This guide covers daily use and developer extension points.
3939

4040
## Built-In Gadgets
4141

42-
As of March 2026, two gadgets ship by default.
42+
As of March 2026, three gadgets ship by default.
4343

4444
### 1. Timer Gadget
4545

@@ -69,6 +69,19 @@ Behavior:
6969
- `POST /api/cli` with `{ command: "today", args: ["reschedule"] }`
7070
- Reloads Calendar today view after success.
7171

72+
### 3. Progress Gauge Gadget
73+
74+
Location: `utilities/dashboard/gadgets/progress_gauge/`
75+
76+
Behavior:
77+
- Shows a compact circular progress ring in the dock.
78+
- Supports:
79+
- countdown to a target date
80+
- numeric progress against a target
81+
- item-backed numeric properties via `GET /api/item`
82+
- Click opens an inline editor/menu.
83+
- Refreshes automatically on a short interval and can be refreshed manually.
84+
7285
---
7386

7487
## Gadget Registry & Discovery

utilities/dashboard/app.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const POST_RELEASE_PANELS = new Set(['map of happiness', 'flashcards']);
7070
const PRIORITY_PANELS = new Set(['commitments', 'commitments snapshot']);
7171
const URGENT_PANELS = new Set(['status chart', 'status strip', 'schedule panel', 'matrix', 'matrix visuals']);
7272
const URGENT_GADGETS = new Set(['timer', 'reschedule']);
73+
const DEV_GADGETS = new Set(['progress gauge', 'progress_gauge']);
7374

7475
function arePopupsEnabled() {
7576
try {
@@ -1136,6 +1137,12 @@ ready(async () => {
11361137
badge.textContent = 'urgent';
11371138
badge.title = 'Urgent gadget';
11381139
item.appendChild(badge);
1140+
} else if (DEV_GADGETS.has(normalized) || DEV_GADGETS.has(normalizedKey)) {
1141+
const badge = document.createElement('span');
1142+
badge.className = 'dev-badge';
1143+
badge.textContent = 'dev';
1144+
badge.title = 'Development feature';
1145+
item.appendChild(badge);
11391146
}
11401147
}
11411148
item.addEventListener('click', () => {

utilities/dashboard/core/runtime.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,15 @@ const HELP_TEXT = {
216216
checklist: 'Checklist Panel: Manage checklists with quick add/remove and detail views.',
217217
commitments: 'Commitments Panel: Snapshot of commitment rules, progress, and evaluation status.',
218218
deadlines: 'Deadlines Panel: Read-only list of upcoming deadlines and due dates with filters.',
219+
'progress-gauge': 'Progress Gauge Panel: Configure one or more circular gauges for countdowns and numeric goals.',
219220
flashcards: 'Flashcards Panel: Review study cards and track progress.',
220221
lists: 'Lists Panel: Pin and run saved list queries as cockpit panels.',
221222
'map-of-happiness': 'Map of Happiness Panel: Summarizes needs coverage from map_of_happiness.yml.',
222223
'random-picker': 'Random Picker Panel: Pull a random item from saved pools.',
223224
Checklist: 'Checklist Panel: Manage checklists with quick add/remove and detail views.',
224225
Commitments: 'Commitments Panel: Snapshot of commitment rules, progress, and evaluation status.',
225226
Deadlines: 'Deadlines Panel: Read-only list of upcoming deadlines and due dates with filters.',
227+
ProgressGauge: 'Progress Gauge Panel: Configure one or more circular gauges for countdowns and numeric goals.',
226228
Flashcards: 'Flashcards Panel: Review study cards and track progress.',
227229
Lists: 'Lists Panel: Pin and run saved list queries as cockpit panels.',
228230
MapOfHappiness: 'Map of Happiness Panel: Summarizes needs coverage from map_of_happiness.yml.',
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
label: "Progress Gauge"
2+
module: "progress_gauge"
3+
enabled: true
4+
order: 30

0 commit comments

Comments
 (0)