Add OpenRouter spend stats and unify ticker settings #4

Merged
raucao merged 4 commits from feature/openrouter-stats into master 2026-11-13 11:54:09 +00:00
Owner

Adds an OpenRouter spend widget next to the Bitcoin ticker and consolidates the dashboard ticker/stat settings.

OpenRouter spend

  • New OpenRouter integration that reads a management key and shows a single spend total.
  • Configurable to Today, This week, or This month, defaulting to Today.
  • Analytics queries are widened to the previous UTC hour boundary and filtered locally so buckets in non-whole-hour timezones are not clipped.

Bitcoin ticker

  • Adds the same circular icon badge used by the OpenRouter widget.

Settings

  • Replaces the separate Market Ticker and OpenRouter Stats sections with a single Tickers & Stats panel.
  • The panel lists every active ticker/stat with its settings and remove actions, and offers one Add integration button that opens the generic integration list filtered to tickers and stats.
  • Renames OpenRouter Stats to OpenRouter Spend with the description "Daily, weekly, or monthly".

Verification

  • pnpm lint
  • pnpm test (490/490)
Adds an OpenRouter spend widget next to the Bitcoin ticker and consolidates the dashboard ticker/stat settings. ## OpenRouter spend - New OpenRouter integration that reads a management key and shows a single spend total. - Configurable to Today, This week, or This month, defaulting to Today. - Analytics queries are widened to the previous UTC hour boundary and filtered locally so buckets in non-whole-hour timezones are not clipped. ## Bitcoin ticker - Adds the same circular icon badge used by the OpenRouter widget. ## Settings - Replaces the separate Market Ticker and OpenRouter Stats sections with a single Tickers & Stats panel. - The panel lists every active ticker/stat with its settings and remove actions, and offers one Add integration button that opens the generic integration list filtered to tickers and stats. - Renames OpenRouter Stats to OpenRouter Spend with the description "Daily, weekly, or monthly". ## Verification - `pnpm lint` - `pnpm test` (490/490)
raucao added 4 commits 2026-11-13 11:51:41 +00:00
Add a per-user OpenRouter usage integration that reads the management key
and displays a single spend total next to the Bitcoin ticker.

The total is configurable to Today, This week or This month, defaulting to
Today. Analytics queries are widened to the previous UTC hour boundary and
then filtered locally so buckets in non-whole-hour timezones are not
clipped.
Match the OpenRouter widget's icon style: a small circular badge with the
bitcoin glyph in white before the price. Export the bitcoin glyph path and
transform from the integrations registry so the ticker and the avatar use
the same source.
Replace the separate Market Ticker and OpenRouter Stats settings sections
with a single Tickers & Stats section. It lists every active ticker/stat
with its settings and remove actions, and offers one Add integration button
that opens the generic integration list filtered to tickers and stats.

The add button is hidden once every single-instance integration is
connected, matching the old sections' behavior.
Use a clearer title and a description that explains the granularity
options shown in the settings form.
raucao added the feature label 2026-11-13 11:53:00 +00:00
raucao merged commit afb226ee5d into master 2026-11-13 11:54:09 +00:00
raucao deleted branch feature/openrouter-stats 2026-11-13 11:54:09 +00:00
Sign in to join this conversation.