Skip to content

Release 1.11.0: Hub, themes, scoped queries and on-demand dashboard - #76

Merged
sriinnu merged 3 commits into
mainfrom
fix/review-terminal-and-cli
Sep 8, 2026
Merged

Release 1.11.0: Hub, themes, scoped queries and on-demand dashboard#76
sriinnu merged 3 commits into
mainfrom
fix/review-terminal-and-cli

Conversation

@sriinnu

@sriinnu sriinnu commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Opening the macOS web dashboard previously opened port 3000 without starting a server; scoped CLI summaries could also include usage outside the requested filters. This release adds an app-owned dashboard with readiness, stop/cancel and quit cleanup, fixes scoped daily-bucket queries, and improves Hub layout, copied commands, settings persistence, chart details and theme rendering.

Prism, Lagoon and Carbon replace the previous visual styles while retaining saved identifiers. Today’s tokens and estimated API cost have equal prominence. Daemon process identity is verified before signalling, competing starts cannot replace the winner’s credentials, and forced rescans coalesce. Native CI and focused module/release documentation are included. All packages target 1.11.0; the macOS build is 48.

Validation: workspace build/lint; 404 JavaScript tests passed (11 existing todos); 41 native tests passed (one optional walkthrough skipped); both npm candidates installed outside the workspace, eight actual CLI fixture queries and TUI navigation/terminal restoration passed; all five bundled web routes rendered in Chrome with live data, no JavaScript errors or horizontal overflow. The source/distribution secrets gate passed. Packaging verifies paired release versions and excludes private usage exports.

Fresh-Mac use, sustained reliability, a real Sparkle upgrade, independent accounting, live VoiceOver/keyboard acceptance and the user trial remain open in the macOS completion tracker. This PR does not close those gates.

Copilot AI lite review requested due to automatic review settings September 8, 2026 19:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A confirmed coordination bug in RefreshCoordinator.run() can block non-forced callers behind a queued full scan, and should be corrected before release.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Release 1.11.0 focuses on making the macOS experience safer and more self-contained (on-demand app-owned dashboard), while fixing correctness issues in scoped reporting by moving filtering to getSummary(options) over sealed daily aggregates and tightening daemon lifecycle/ownership behavior.

Changes:

  • Add an app-owned, loopback-only web dashboard server (bundled assets, readiness nonce, stop/cancel/quit cleanup) plus tests and build packaging rules to avoid shipping public/data.json.
  • Fix scoped summaries so date/provider/project filters correctly intersect over saved daily buckets via TokmeterCore.getSummary(options) and align CLI helpers/docs to this contract.
  • Harden daemon startup/stop by verifying identity before signalling, publishing credentials only after listener ownership, and coalescing refresh/rescan work.
File summaries
File Description
SKILL.md Update integration example + scoping notes
scripts/prepare-packages.sh Enforce paired Drishti/Tokmeter release dependency
scripts/prepare-license-materials.py Include new docs; include .mjs sources
scripts/bump-version.sh Also align Bun workspace version metadata
README.md Update macOS popup/themes/dashboard description
packages/web/vite.config.ts Disable publicDir for app build bundling
packages/web/src/server/dashboard-server.test.ts Add tests for app-owned dashboard server
packages/web/src/main.tsx Add baseline box-sizing/margins/body background
packages/web/SKILL.md Document app-bundled dashboard lifecycle/dev setup
packages/web/scripts/dashboard-server.mjs Add loopback read-only dashboard server script
packages/web/README.md Document app-bundled mode and static export flow
packages/web/package.json Bump private web package to 1.11.0
packages/tui/SKILL.md Update TUI features/key bindings text
packages/tui/README.md Document cleanup view + updated key bindings
packages/tui/package.json Bump TUI package to 1.11.0
packages/tokmeter/README.md Update filtering guidance to getSummary(options)
packages/tokmeter/package.json Bump tokmeter package to 1.11.0
packages/mcp/src/daemon/server.ts Daemon identity verification + refresh coordinator
packages/mcp/src/daemon/server-lifecycle.test.ts Test competing start cannot overwrite winner state
packages/mcp/src/daemon/refresh-coordinator.ts New coordinator for refresh/rescan coalescing
packages/mcp/src/daemon/refresh-coordinator.test.ts Unit tests for refresh coalescing behavior
packages/mcp/src/daemon/protocol.ts Add daemon identity file path constant
packages/mcp/src/daemon/identity.ts Implement process identity capture/verification/signal
packages/mcp/src/daemon/identity.test.ts Unit tests for identity/legacy verification
packages/mcp/SKILL.md Add daemon lifecycle safety guidance
packages/mcp/README.md Document daemon ownership + refresh semantics
packages/mcp/package.json Bump Drishti package to 1.11.0
packages/macos-bar/Tests/TokmeterBarTests/WebDashboardTests.swift Native tests for dashboard child lifecycle
packages/macos-bar/Tests/TokmeterBarTests/ThemeContrastTests.swift Expand contrast coverage; native rendering helper
packages/macos-bar/Tests/TokmeterBarTests/StartupTests.swift Add Node toolchain probe fallback tests
packages/macos-bar/Tests/TokmeterBarTests/PopoverLayoutTests.swift Expand theme coverage in layout test
packages/macos-bar/Tests/TokmeterBarTests/HubResponsiveLayoutTests.swift Add Hub responsive layout + trend meaning tests
packages/macos-bar/Tests/TokmeterBarTests/HubActionsTests.swift Test shell quoting + settings persistence + catalog
packages/macos-bar/Tests/TokmeterBarTests/HeatmapDailyValuesTests.swift Test disclosure/table keyboard navigation layout
packages/macos-bar/Tests/TokmeterBarTests/DemoRenderTests.swift Render tooltip fixtures + add loader totals/daily
packages/macos-bar/Tests/TokmeterBarTests/DaemonClientURLTests.swift Regression tests for URL/query/path encoding
packages/macos-bar/Sources/TokmeterBar/WebDashboardController.swift Add app-owned dashboard controller
packages/macos-bar/Sources/TokmeterBar/TokmeterLoader+CLIFallback.swift Improve Node discovery and error messaging
packages/macos-bar/Sources/TokmeterBar/ThemePalettes.swift Update palette roles for Prism/Carbon/Lagoon
packages/macos-bar/Sources/TokmeterBar/Theme+Modes.swift Update background/hero/card modes + radii
packages/macos-bar/Sources/TokmeterBar/Theme.swift Add cost/burn-rate ink semantics; rename displays
packages/macos-bar/Sources/TokmeterBar/StatCards.swift Add hover tooltips + trend semantics + accessibility
packages/macos-bar/Sources/TokmeterBar/SignalsRibbon.swift Remove variable-color flame; unify burn color logic
packages/macos-bar/Sources/TokmeterBar/ShellArgument.swift Add POSIX shell argument quoting helper
packages/macos-bar/Sources/TokmeterBar/SettingsPopover.swift Wire dashboard open/stop/cancel + errors
packages/macos-bar/Sources/TokmeterBar/PrismSurface.swift Add Prism panel + hero backdrop renderers
packages/macos-bar/Sources/TokmeterBar/NodeToolchain.swift Add candidate list + bounded probe selection
packages/macos-bar/Sources/TokmeterBar/HubYearHeatmap.swift Add daily values disclosure/table + tooltip fixes
packages/macos-bar/Sources/TokmeterBar/HubView.swift Provide continuous glass material background
packages/macos-bar/Sources/TokmeterBar/HubToolCallsCard.swift Adjust tool label layout + add help
packages/macos-bar/Sources/TokmeterBar/HubSidebar.swift Rework today tokens/cost prominence + burn color
packages/macos-bar/Sources/TokmeterBar/HubSettings.swift Surface settings save errors; refine copy
packages/macos-bar/Sources/TokmeterBar/HubPulseCard.swift Use BalancedGrid; improve captions/accessibility
packages/macos-bar/Sources/TokmeterBar/HubProjectCliActions.swift Quote copied commands as literal shell args
packages/macos-bar/Sources/TokmeterBar/HubOverview.swift Use BalancedGrid; fix “recorded days” labeling
packages/macos-bar/Sources/TokmeterBar/HubKpiTile.swift Re-layout KPI tile; combine accessibility
packages/macos-bar/Sources/TokmeterBar/HubConfigStore.swift Persist-before-publish + expose save errors
packages/macos-bar/Sources/TokmeterBar/HubCommandsCatalog.swift Switch examples to drishti + updated descriptions
packages/macos-bar/Sources/TokmeterBar/HubCard.swift Theme-specific panel rendering/radii
packages/macos-bar/Sources/TokmeterBar/HubActivityChart.swift Recorded-day average labeling + hover improvements
packages/macos-bar/Sources/TokmeterBar/HeroHeader.swift Dual headline values + cost estimate behavior
packages/macos-bar/Sources/TokmeterBar/HeroBackground.swift Simplify Prism/Carbon/Lagoon header renderers
packages/macos-bar/Sources/TokmeterBar/DataSections.swift Week hover tooltip + recorded-day axis labeling
packages/macos-bar/Sources/TokmeterBar/DailyUsageTooltip.swift New shared daily tooltip + sparkline hover modifier
packages/macos-bar/Sources/TokmeterBar/DaemonClient.swift Fix URL composition for query/encoded segments
packages/macos-bar/Sources/TokmeterBar/CardBackground.swift Update Prism/Carbon/Lagoon card backgrounds
packages/macos-bar/Sources/TokmeterBar/BalancedGrid.swift Add layout to avoid geometry feedback loops
packages/macos-bar/RELEASE.md Rewrite release workflow + gating steps
packages/macos-bar/README.md Document themes + on-demand dashboard behavior
packages/macos-bar/bundle.sh Bundle web dashboard assets into app Resources
packages/core/src/tokmeter-core.ts Implement getSummary(options) via summary query
packages/core/src/summary-query.ts Add sealed-aggregate summary query implementation
packages/core/src/summary-query.test.ts Add unit tests for summary query correctness
packages/core/SKILL.md Update pricing description to match current behavior
packages/core/README.md Clarify scan vs reports; update pricing resolution text
packages/core/package.json Bump core package to 1.11.0
packages/cli/src/query-filters.test.ts Add tests for CLI filtering + JSON dispatch
packages/cli/src/index.ts Use getSummary(options) results for CLI helpers
packages/cli/src/daemon-read.ts Fix year=0 truthiness eligibility bug
packages/cli/src/daemon-read.test.ts Add year=0 regression coverage
packages/cli/src/cli.ts Validate bounds; scan minimal; render from summary
packages/cli/README.md Clarify date semantics + sealed history behavior
packages/cli/package.json Bump CLI package to 1.11.0
docs/reviews/2026-09-08.md Add consolidated design/arch/docs review record
docs/macos/web-dashboard.md Add dashboard lifecycle/module ownership guide
docs/macos/themes.md Add native theme module ownership + validation guide
docs/macos-completion.md Update completion tracker with 1.11.0 checkpoint
docs/consuming-tokmeter.md Document report filters + retained history semantics
CHANGELOG.md Add 1.11.0 changelog entry
bun.lock Update workspace versions to 1.11.0
biome.json Include .mjs for formatting/linting
.github/workflows/ci.yml Add macOS native build/test job
Review details
  • Files reviewed: 91/92 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +12 to +24
run(full: boolean): Promise<T> {
if (this.queuedFull) return this.queuedFull;
if (this.flight) {
if (!full || this.flight.full) return this.flight.promise;
const queued = this.flight.promise.catch(() => undefined).then(() => this.start(true));
const result = queued.finally(() => {
if (this.queuedFull === result) this.queuedFull = null;
});
this.queuedFull = result;
return result;
}
return this.start(full);
}
@sriinnu
sriinnu merged commit 863b7fd into main Sep 8, 2026
2 checks passed
@sriinnu
sriinnu deleted the fix/review-terminal-and-cli branch September 8, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants