Skip to content

TokenStep 0.2.21: dashboard and settings redesign - #27

Merged
Backtthefuture merged 6 commits into
mainfrom
feat/dashboard-settings-redesign
Sep 27, 2026
Merged

Backtthefuture merged 6 commits into
mainfrom
feat/dashboard-settings-redesign

Conversation

@Backtthefuture

Copy link
Copy Markdown
Owner

Summary

Redesigns the dashboard and settings after the Token Rank profile page, following the approved design canvas.

  • Today: a ring card with the change versus yesterday at the same hour and the token mix, four metric tiles (cost, active hours, requests, rank), a last-5-weeks heatmap with the goal streak, an hourly chart stacked by client with an instant hover callout, and clients next to top models. Developer captions are gone.
  • History: summary tiles including the longest goal streak, a heatmap sized to the card with busy hours next to it, the 30-day trend beside an all-time client/model split, and daily detail with 7 rows, "展开全部", a goal column and CSV export.
  • Settings: sidebar navigation (通用, 外观, 数据源, 额度, Token Rank), grouped sections, no 完成 button. Themes and Token Rank get their own pages. Chips are lighter and switch knobs are white.
  • TokenCard uses a 16pt radius with a faint shadow on the classic theme.
  • Dead views are removed: the old Today cards, StatsView, ContributionWallView and TodayBreakdownCard.
  • Release prep for 0.2.21.

The calculations live in TodayOverviewModel, which has a new fixture check (script/test_today_overview.sh, also run in CI). The Today render fixture now writes the theme migration markers (without them the classic theme rendered as Odyssey), seeds realistic history, and can render History and each settings pane.

Test plan

  • script/test_all.sh passes, including the new Today overview check and the 0.2.21 release contract.
  • Renders checked on the classic theme (Today at normal and narrow widths, History, every settings pane) and on the cinematic themes (render_voyage_interfaces.sh).
  • Ran the app with real data. The hover callout was added after that feedback.
  • CSV export not clicked through by hand.

🤖 Generated with Claude Code

Backtthefuture and others added 6 commits September 27, 2026 07:10
Today now reads like the Token Rank profile: small-radius cards with a
hairline, one glance for the day.

- Ring card: today's tokens, lap, goal, laps done, the change versus
  yesterday at the same hour, and the token mix (fresh input, cache
  reads, output) with the cache hit rate.
- Four metric tiles: estimated cost, active hours, model requests with
  tool calls, and today's rank (or total tokens when the board is off).
- Last 5 weeks heatmap with the goal streak and a link to History.
- Hourly chart stacked by client, with the peak hour and future hours
  drawn as a flat track.
- Clients and top models side by side; models show estimated cost.
- Developer captions ("来自 hourlyBuckets", "本版补全") are gone.

On narrow widths the metrics move below the ring as one row and the two
bottom cards stack. TokenCard drops to a 16pt radius with a faint shadow
on the classic theme; cinematic themes keep their ornaments and shadow.

The calculations live in TodayOverviewModel with a new fixture check.
The Today render fixture now writes the theme migration markers (without
them the classic theme rendered as Odyssey) and seeds five weeks of
history, three clients and yesterday's hours.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Four summary tiles: total tokens since the first day, estimated cost,
  active days with goal days, and the longest goal streak with the
  current one.
- A GitHub-style heatmap sized to the card's width, with month labels,
  next to a busy-hours chart for the last 30 days.
- The 30-day trend beside an all-time split that switches between
  clients and models.
- Daily detail shows 7 days with a "展开全部" toggle, a goal column
  and CSV export. Screenshots still list up to their row limit.

StatsView is folded in and removed. The split switch is drawn rather
than a system Picker, which screenshots cannot render. The Today render
fixture can render History (TOKENSTEP_TODAY_SECTION=history) and seeds
cumulative clients and models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings follows the approved design: a System Settings style sidebar
(通用, 外观, 数据源, 额度, Token Rank) in place of the top tabs, each page
with a title and one-line note, and sections as plain rounded groups with
the title above.

- Theme packs move to their own 外观 page; the Token Rank card to its
  own page, restyled as a group with chips instead of a system segmented
  Picker (screenshots could not render it).
- The General page is one column. History range reads 30/90/180/365 天
  and drops the stale "本版新增入口" badge.
- Changes apply live, so the 完成 button is gone; 恢复默认设置 sits
  quietly at the bottom of the General page.
- Option chips are lighter (green tint when selected), switch knobs are
  white, and a multi-part section body stays in one group.

The Voyage render fixture renders the real SettingsView per pane instead
of its own copy of the old header. The Today render fixture can render
settings panes on the classic theme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TodayHeroCard, the agent intensity, hourly, sources and model usage cards,
TodayBreakdownCard and ContributionWallView have no callers left. The row
builders the new cards and tests use stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hourly chart relied on .help tooltips, which appear late or not at all
over a chart. Each hour's column now takes the hover across its full
height, dims the other hours, and shows a callout with the hour's total and
its per-client split (or that the hour has not come yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release notes, CHANGELOG, README and the build default, via
script/prepare_release.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Backtthefuture
Backtthefuture merged commit 8dc9ddf into main Sep 27, 2026
1 check passed
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.

1 participant