Repository navigation
Studio: optional Chart view with labelled axes for weekly and cumulative token activity - #13558
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
@codex security review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37bcef8750
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <div className="flex items-center gap-2"> | ||
| {shaded ? null : ( | ||
| <div className="hub-tab-toggle inline-flex h-8 w-fit items-center rounded-full"> |
There was a problem hiding this comment.
Let the activity controls wrap on narrow screens
When Weekly or Cumulative is selected, this non-wrapping row contains the Chart button plus all three mode buttons. In the mobile settings layout, settings-dialog.tsx applies p-6 and StatsCard adds px-5, leaving only about 232px on a 320px viewport; these controls exceed that even in English and are wider in several translations. Because the action is also rendered as shrink-0, this causes horizontal scrolling or clipped controls, so the action/header should wrap or stack at narrow widths.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 8ac687e: the card header now wraps and the action is capped to the card width, so at 320 px the controls stack (overflow 44 px before, 0 px after).
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #10807
Problem
Settings > Profile > Token activity has three modes. Daily is a heatmap, which works well as a calendar. Weekly and Cumulative reuse the same 7-row block grid: each week becomes a column of 0 to 7 filled squares, with no y-axis, tick marks or scale, so you cannot read how many tokens a week or the running total actually was without hovering every column.
Change
This is opt-in. Nothing changes by default.
unsloth_profile_activity_chart) and is cleared by Settings > General > Reset all like the other UI preferences.chartToggle/chartToggleHintare added to all 14 locales.The per-week values come from a small
weekChartPointshelper instats-format.ts(the week total for Weekly, the end-of-week running total for Cumulative), covered by a new case intests/profile-stats-format.test.ts.About "Average tokens per chat"
The issue also asked why this reads 138K when chats top out at 20K to 30K. It is not caching. Every turn re-sends the whole conversation, so the stat counts tokens processed across all turns, not the final length of the chat. A chat that grows to a 24.5K context over 8 turns adds up to about 112K. This is the same way API providers count usage, so the number is left as is.
Testing
npm test: 11811 of 11814 pass; the 3 failures (reasoning-source-render,training-dataset-source-transitions) are unrelated and pass when rerun on their own.tsc -b,tsc -p tsconfig.test.jsonclean;eslintandbiome checkclean on the changed files;tests/studio/test_ui_font_scale_contract.pypasses (chart axis text follows the UI font scale through the existing.recharts-textrule).Before and after
Screenshots from this branch's build (dcb9613) with the same seeded history (16 chats over 10 weeks, 195.6K tokens).
Default view, main vs this branch: the same block grid, plus the new Chart toggle (off):
The opt-in on this branch, Chart off (default) vs Chart on, for Weekly and Cumulative:
At a 320 px settings width with Chart on, the controls wrap inside the card: