Skip to content

Make Analytics look like the rest of Modex and fit the window - #248

Merged
BunsDev merged 6 commits into
mainfrom
analytics-fit
Oct 16, 2026
Merged

BunsDev merged 6 commits into
mainfrom
analytics-fit

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Analytics now looks and fits like the rest of Modex. Before this, the dashboard was its own product inside the app:

  • a "modex by TypeSafe" logo sidebar, a breadcrumb top bar and an avatar;
  • marketing headlines ("Your AI, accounted for.");
  • a navy and pink palette with IBM Plex fonts, and a light/dark switch of its own;
  • pages from about 1,100 px to 33,000 px tall (Activity), all scrolling.

Look

  • Tokens: the page imports the app's tokens.css and maps its own variables onto them (surfaces, text, borders, accent, radii, fonts). The chart series use the app's syntax palette.
  • Theme: the page takes the app's theme. WorkspaceAnalytics gives its WorkspaceBrowser an appearance hook, which sets data-theme (Graphite, Jev or OpenCoven) and the view background as the page loads. A theme change in Settings re-applies it, just like the knowledge view.
  • Corners: the native view's corners are rounded to the sheet's (setBorderRadius(11), the 12 px sheet less its border). The new WorkspaceBrowser radius option sets this.
  • Layout like Space:
    • a sidebar titled Analytics, with Workspace/Manage as quiet section labels and 30 px rows;
    • each view's title, with the date and tool filters and Export CSV as pill controls beside it;
    • one summary line below: what was recorded, the date range, and a Coverage link.
  • Removed: the logo, the top bar, headlines and kickers, the Demo Data banner, the footer, the "A note on your numbers" panel and the dashboard's own appearance switch. The Plex fonts and their OFL notice are deleted; the page uses the app's system font stack.

Fit

  • No page scroll: the document is the window's height, and every view fills it.
  • Overview: four totals, then chart and token breakdown, then tools and recent activity, all sized to the window.
  • Chart: it measures its container and draws at that size, with crisp text, rather than scaling a fixed 800×208 box.
  • Long content: Activity, Models and Projects tables, account cards, source rows and overview lists scroll inside their own panel, with sticky table headers.
  • Accounts and Sources: a one-line notice, the main panel filling the rest, and a short explainer strip. Demo-only extras are hidden.
  • Small windows: checked at 845×553 (the app's 900×600 minimum), 1024×640, 1228×753 and 1440×900. Below a 1,100 px window the sidebar narrows to 180 px, as the app's does. Short windows drop panel subtitles and tighten spacing.

Unchanged: data, filters, views, call details, CSV export, the 15-second refresh, and the isolated modex-analytics:// session. The live summary still reads "Recorded on this Mac: N turns from Claude Code and Codex threads in Modex.", and the Export CSV button stays. The standalone preview (dev:usage) renders the same layout in Graphite, or ?theme=jev / ?theme=coven.

Tests

  • Unit: workspace-analytics.test.ts adds that the view wears the app's theme, falls back to Graphite, and never puts an unknown theme string into the page script.
  • E2e: analytics.spec.ts now also asserts that the live page doesn't scroll, wears the app's theme and is titled Overview. It passed locally in the real app with both of its tests, including CSV export.
  • Screenshots: taken headless of every view at the sizes above, of Space in browser-dev for comparison, and of the Analytics view in the running app with recorded rows.

Docs: docs/analytics.md ("How it is shown", the preview, provenance) and docs/status.md.

The dashboard ran as its own product inside the app: a logo sidebar, a
breadcrumb top bar, marketing headlines, a navy and pink palette, IBM Plex
fonts, a light/dark switch of its own, and pages up to 33,000px tall.

It now takes the app's tokens (renderer/tokens.css) and the app's theme,
which main sets through the browser view's appearance hook as the page
loads and when the theme changes; the view's corners follow the sheet. It
is laid out like Space: a sidebar titled Analytics with the six views, and
each view's title with its filters and Export CSV over a one-line summary.
Every view fits the window down to the 900x600 minimum with no page scroll.
Overview sizes its totals, chart, token breakdown, tools and recent turns to
the window; long tables and lists scroll inside their panel. The chart draws
at the size it is shown. The Plex fonts and their license file are removed.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 16, 2026 3:24am UTC

Request Review

…ts name

The Overview note panel and its "View coverage" button are gone; the summary
line now links to Sources as "Coverage". Its separator dot came from CSS
content, which joined the accessible name ("· Coverage"); empty alternative
text keeps it visual only.

Coven-Harness: Claude Code / claude-opus-5-5
@github-code-quality

github-code-quality Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main f17608d analytics-fit 3e72110 +/-
60% 61% +1%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated October 16, 2026 03:48 UTC

Keep the Analytics entry under On main, unreleased after v0.1.0 shipped.

Coven-Harness: Claude Code / claude-opus-5-5
@BunsDev
BunsDev merged commit 5efafc4 into main Oct 16, 2026
13 checks passed
@BunsDev
BunsDev deleted the analytics-fit branch October 16, 2026 03:49
BunsDev added a commit that referenced this pull request Oct 19, 2026
… and the routines spec (#310)

v0.2.0 was published on 2026-10-18 (23:14Z) from the signed tag on 01b1b8a. This
follows Val's status layout (#290):

- Shipped gains a v0.2.0 row linking its release and its review.
- The 13 "On main, unreleased" items move unchanged to a new "Status summary"
  at the end of the v0.2.0 review, along with the old In flight entry. Each one
  was introduced by a commit in the tag (#248, #253, #254, #257 to #261, #263,
  #264, #266, #267, #269). The CF slices and #283's Markdown parser came after
  the tag, so they stay.
- In flight keeps a short follow-ups entry for the gates no receipt records yet:
  the independent download checks, the banner upgrade on the release Mac, and
  the Companion 0.2.0 (7) TestFlight upload.
- The routines spec and the README now say Phase 1, and most of Phase 0, ship
  from v0.2.0.

Unchanged: the website's static fallback (apps/site/release.json) and the
release evidence, which stay with the release owner. Claimed on #290.

Coven-Harness: Claude Code / claude-opus-5-5

This branch was successfully deployed

1 active deployment
Preview — 3e721101 Deployed Oct 16, 2026 by vercel[bot]
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