Add the Profit pulse home widget #82

Merged
miko merged 3 commits from feat/widget-profit-pulse into main 2026-11-02 00:13:10 +00:00
Owner

Adds a plain new home widget, Profit pulse (id profitpulse), registered in the core widget catalog beside the other core widgets. It shows the Profit Analysis headline for the last 30 days (the Profit page default span), all characters, read from the stored tables the worker folds: profit_daily for gross in and kept profit, trade_item_window for the top item, trade_item_daily for the waterfall cost rows. Nothing is recomputed at render and there are no outbound calls.

How much shows follows the size stored for the widget, the same size value every widget reads: the smallest sizes show the two headline figures only, the default 2x2 adds the top item for the period, and larger sizes add the waterfall inline, drawn by the Profit page own chart builder (buildWaterfall) from the same span totals. Waterfall labels position with the page pf-x/pf-y percent classes, scoped to this widget in style.css because market.css is not loaded on the home page and the site CSP (style-src self) blocks inline style positioning.

Nothing else changes: no edits to the size system, the picker, layout storage or endpoints, the expander machinery, or any existing widget. One existing test pin updated: the module catalog order string gains profitpulse after pulse.

Tests, run as pgtester against embedded Postgres: the new TestProfitPulseWidgetSizes and TestProfitPulseWidgetEmpty (seeded ledger figures at 1x1, default and 3x3, unattributed income excluded, empty state), plus the existing home suites (overview, layout round trips, customize surface, grid sizes, size defaults, catalog pins, briefing, orders widget) 35 passed, 0 failed; the profit, demo and ledger suites 22 passed, 0 failed. gofmt clean, go build ./... and go vet pass.

Rig screenshots (demo seed, Juno Park account) at the three sizes are saved under ~/workspace/profitpulse-renders/.

Adds a plain new home widget, Profit pulse (id profitpulse), registered in the core widget catalog beside the other core widgets. It shows the Profit Analysis headline for the last 30 days (the Profit page default span), all characters, read from the stored tables the worker folds: profit_daily for gross in and kept profit, trade_item_window for the top item, trade_item_daily for the waterfall cost rows. Nothing is recomputed at render and there are no outbound calls. How much shows follows the size stored for the widget, the same size value every widget reads: the smallest sizes show the two headline figures only, the default 2x2 adds the top item for the period, and larger sizes add the waterfall inline, drawn by the Profit page own chart builder (buildWaterfall) from the same span totals. Waterfall labels position with the page pf-x/pf-y percent classes, scoped to this widget in style.css because market.css is not loaded on the home page and the site CSP (style-src self) blocks inline style positioning. Nothing else changes: no edits to the size system, the picker, layout storage or endpoints, the expander machinery, or any existing widget. One existing test pin updated: the module catalog order string gains profitpulse after pulse. Tests, run as pgtester against embedded Postgres: the new TestProfitPulseWidgetSizes and TestProfitPulseWidgetEmpty (seeded ledger figures at 1x1, default and 3x3, unattributed income excluded, empty state), plus the existing home suites (overview, layout round trips, customize surface, grid sizes, size defaults, catalog pins, briefing, orders widget) 35 passed, 0 failed; the profit, demo and ledger suites 22 passed, 0 failed. gofmt clean, go build ./... and go vet pass. Rig screenshots (demo seed, Juno Park account) at the three sizes are saved under ~/workspace/profitpulse-renders/.
Add the Profit pulse home widget
All checks were successful
github/analysis Analysis gate on GitHub runners
github/core-only Core-only gate on GitHub runners
github/test Test gate on GitHub runners
github/race Race gate on GitHub runners
fd115cc5ef
Shows the Profit Analysis headline for the last 30 days on the home grid, from the stored profit tables: gross in and kept profit at every size, the top item at the default size, and the waterfall at larger sizes, drawn by the Profit page's own chart builder with its labels positioned by the pf-x/pf-y classes. Registered in the core widget catalog; detail scales with the widget's stored size only.
Adds a kept-profit-per-day mini chart to Profit pulse at its default size
All checks were successful
github/analysis Analysis gate on GitHub runners
github/test Test gate on GitHub runners
github/core-only Core-only gate on GitHub runners
github/race Race gate on GitHub runners
d07738e3d7
Places the Profit pulse mini chart by the widget shape
All checks were successful
github/analysis Analysis gate on GitHub runners
github/core-only Core-only gate on GitHub runners
github/test Test gate on GitHub runners
github/race Race gate on GitHub runners
9b38f3276c
miko merged commit eca7499688 into main 2026-11-02 00:13:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
EveSynapse/evesynapse!82
No description provided.