feat(admin): insights is the one analytics surface (issue #181) - #182
Merged
Conversation
…ubcommands removed (issue #181) Commit 1 of the consolidation: the command grammar. - Bare /dispatch insights [7d|30d|mtd] [--no-open] [--full-paths] writes AND opens the artifact -- no html verb to remember; the removed verb answers usage on purpose, because a dead verb that half-works is drift and the usage string teaches the new grammar. - insights whatif <provider/model> --flow <flow> carries the estimator forward (costsWhatIf moved verbatim); completion offers the windows, whatif, and the priced catalog as the long-tail model picker. - The costs and graph subcommands leave USAGE, KNOWN_SUBCOMMANDS and the registration description together (the member-for-member pin); graphHtmlCommand is deleted -- graph.html no longer ships, its discipline lives on in the insights artifact. dispatch_costs and the assemblers are untouched. - Tests: the two channel tests retarget (whatif reply routing; bare insights end-to-end through real deps into a temp PI_GRAPH_DIR with the SSH skip said); junk-arguments pins incl. the dead verb and the removed subcommands; graph-command.test.mjs deleted with its isHeadlessEnv unit block moved beside its only caller. - operate-pi-dispatch SKILL.md points operators at the insights page. The dashboard views go in the next commit; specs ride this PR. Signed-off-by: Rob Boerman <robboerman@live.nl>
…s page (issue #181) Commit 2 of the consolidation: the COSTS and GRAPH views leave the terminal. The excision is the contiguous render region plus the bounded state/seam/key regions; the shared helpers every surviving view uses (collapseKeys, humanizeMs, fmtTokens, fitLine, KIND_*) stay, the budget meters and their reset countdowns stay, and dashboard.ts drops its pricing/costs/graph-model imports entirely -- the module is back to being a pure view over fetchSnapshot. The new i key resolves the overlay with { action: "openInsights" }; handleDashboardAction writes and opens the page between overlays (the addTrigger route -- no dep seam, no TUI suspend bracket), BEFORE the dialog guard on purpose: the action needs no dialogs and an older pi without them must still reach the one analytics surface. The footer becomes 51+18=69 of 76 columns and the arithmetic comment re-runs. Tests: the COSTS suite, the GRAPH suite and the straggler collapse test are deleted whole (their fold/renderer pins live on in costs.test.mjs and the artifact suites); one replacement test pins the new footer, the inert c/g keys, and the i done-action. Zero surviving tests needed edits -- cannedDeps never stubbed the dying seams. Signed-off-by: Rob Boerman <robboerman@live.nl>
…ssue #181) Commit 3 of the consolidation: renderCosts and renderGraph lose their last callers with the costs/graph commands and the unframed GRAPH degrade gone, so they and their exclusive helpers (the window labels, planVerdictLine, windowFacts, provenanceCounts, tableLines, the whole graph text section) leave with them. renderWhatIf stays -- it is insights whatif's reply -- and renderBudget/renderStatus/renderRuns/ renderTriggers/renderSettingsView are untouched. The panel import shrinks to fmtCost, still the single money renderer for the one dollar this file still prints. The artifact suites keep pinning the fold and scene behaviour; the deleted render goldens duplicated pins that live there and in costs.test.mjs. Signed-off-by: Rob Boerman <robboerman@live.nl>
…L-EXPORT (issue #181) Commit 4 of the consolidation, plus the one code change the spec pass exposed: removing the terminal surfaces left REQ-TOPOLOGY-GRAPH (h)'s next/overdue facts with NO surface (the TUI and text renderers carried them alone; the artifact's tips never did) -- the exact design-to-data gap the clause exists to prevent -- so the scene's trigger tips now render next/overdue against the page's own generation instant, in the same PR that removed their last other home, with pins. - REQ-INSIGHTS-HTML-EXPORT: the bare command, the i key, and every normative clause REQ-GRAPH-HTML-EXPORT carried, absorbed verbatim. - REQ-GRAPH-HTML-EXPORT: SUPERSEDED; the ID stays a permanent address. - REQ-COST-ANALYTICS: surfaces become the page, dispatch_costs and insights whatif; rules (a)-(g) untouched; the no-TTY row leaves with the command; the (no flow) row rewords to the fold grain. - REQ-TOPOLOGY-GRAPH: the surface is the artifact's topology pane; honesty rules stand, (h) retargeted to tips and badges. - REQ-ADMIN-VIA-PI-EXTENSION: the command list; tools UNCHANGED, checked (dispatch_costs stays; topology stays non-model-callable). - DES-ADMIN-VIA-PI-EXTENSION: four views, one snapshot poll, the i-key done-action route recorded with its rationale; DES-QUEUE-BULLMQ-OVER-CUSTOM's parenthetical renamed. - OQ-024 rescoped to the insights export, posture unchanged. - INT-* UNCHANGED, checked (grep-verified: no interface names the removed commands). Suite green in the CI posture: 2181 tests, 0 skipped, live Valkey. Signed-off-by: Rob Boerman <robboerman@live.nl>
edgehero
added a commit
that referenced
this pull request
Aug 12, 2026
Ships the insights consolidation: issues #175 and #181, PRs #176-#180 and #182-#184. - admin 0.8.0: insights is the ONE analytics surface. Bare /dispatch insights (and the panel's i key) writes and opens the self-contained page: budget dials with used-vs-cap facts and the worker's own states, plan verdicts, daily + cumulative + per-flow spend charts, the four breakdowns, and the trigger/flow topology with schedule tips and spend badges. insights whatif is the estimator. The COSTS and GRAPH views and the costs/graph subcommands are REMOVED; the cost-fold correctness fixes (requested-window proration, flowKey, other/other, truncated-ledger counter) and the byTrigger/byRepo/ dailyByFlow folds ride along. dispatch_costs is unchanged. - worker 0.3.0 and receiver 0.2.1 are unchanged since v0.10.0 and their publishes skip. - Image ?v= tags normalized to this release's version. Suite green in the CI posture: 2192 tests, 0 skipped, live Valkey. Signed-off-by: Rob Boerman <robboerman@live.nl>
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.
First PR of #181: insights becomes the ONE analytics surface. The COSTS view (
c), the GRAPH view (g),/dispatch costs(incl.whatif) and/dispatch graph(incl.html) are removed; bare/dispatch insights [7d|30d|mtd] [--no-open] [--full-paths]writes AND opens the artifact (nohtmlverb — the removed verb answers usage on purpose, because a dead verb that half-works is drift),insights whatif <provider/model> --flow <flow>carries the estimator forward, and the overlay's newikey runs the same write-and-open between overlays.What survives, deliberately
dispatch_costs(the machine path — it returns the cost fold only; topology stays non-model-callable, so the tool count pin stands at 15), every pure layer (foldCosts, buildGraphModel, buildGraphScene, buildGraphHtml with its full suite as the scene's pinned reference, insights-html), the assemblers,renderWhatIfandrenderBudget. No plain-text analytics form: the artifact writes and prints itsfile://URL even headless, which IS the degraded path.The commits
insightsHtmlCommandbecomesinsightsCommand(tokens shift one left);costsWhatIfmoves verbatim toinsightsWhatIf; completion offers the windows,whatif, and the priced catalog as the long-tail model picker. Wiring's two channel tests retarget (the whatif reply; bare insights end-to-end through real deps into a tempPI_GRAPH_DIR, with the SSH skip said after the URL); junk-argument pins cover the dead verb and the removed subcommands; graph-command.test.mjs is deleted with itsisHeadlessEnvblock moved beside its only caller.ikey resolves the overlay with{ action: "openInsights" }andhandleDashboardActionwrites-and-opens between overlays (the addTrigger route — no dep seam, no TUI suspend bracket, and BEFORE the dialog guard so an older pi without dialogs still reaches the one analytics surface). The footer becomes↑↓ open · a add · w pauses · l logs · i insights · p/r pause · q quit(69 of 76 columns, arithmetic comment re-run). ~950 lines of view tests are deleted whole — their fold/renderer pins live on in costs.test.mjs and the artifact suites — and one replacement test pins the new footer, the inertc/g, and theidone-action. Zero surviving tests needed edits.renderWhatIf(theinsights whatifreply) and everything else stay.next 191d/overdue 2hagainst the page's own generation instant, landed in the same PR that removed their last other home, with pins. REQ-INSIGHTS-HTML-EXPORT absorbs REQ-GRAPH-HTML-EXPORT's normative clauses verbatim (that entry is SUPERSEDED; the ID stays a permanent address). REQ-COST-ANALYTICS and REQ-TOPOLOGY-GRAPH restate their surfaces with the labeling/honesty rules untouched. REQ-ADMIN-VIA-PI-EXTENSION's command list updates; its tool list UNCHANGED, checked. DES-ADMIN-VIA-PI-EXTENSION drops to four views and records the i-key route's rationale. OQ-024 rescoped. INT-* UNCHANGED, checked (grep-verified).Docs and READMEs still describe the old surfaces on purpose: the docs/images pass lands last in this series, after the page gains its budget panel and line charts, so the screenshots are shot once.
Suite green in the CI posture at every commit (final: 2181 tests, 0 skipped, live Valkey). Net: −2,540 lines.