Skip to content

Metrics single-row toolbar, analytics header tabs, and GitHub repo-access crash fix - #1279

Merged
Makisuo merged 4 commits into
mainfrom
feat/metrics-single-toolbar
Oct 6, 2026
Merged

Makisuo merged 4 commits into
mainfrom
feat/metrics-single-toolbar

Conversation

@Makisuo

@Makisuo Makisuo commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

Metrics / analytics header

  • Collapse the metrics page controls into one header row.
  • Never disable a metric type on summary counts.
  • Put the analytics view tabs in the header row.

GitHub integration crash fix

  • Editing the GitHub App's repository access (adding repos) showed the new repos as "Queued", then crashed the settings page with the error boundary.
  • Cause: BranchSelector returned early for repos with zero branches before calling useAsyncAction. A newly granted repo syncs in with no branches, so once the background sync filled them in, the next status poll rendered one more hook and React threw "Rendered more hooks than during the previous render".
  • Fix: call every hook before the early return.

Reviewer notes

  • The crash fix is a hook reorder only; no behaviour change for repos that already had branches.
  • Not reproduced in the browser; diagnosis is from the render path matching the reported sequence.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features
    • Metrics browsing now includes dedicated search and metric-type filters, plus a grid/table view toggle in the page header.
    • Metric-type filters can display available data-point counts.
  • Updates
    • Overview and AI traffic tabs now appear in the analytics dashboard header alongside time-range controls.
    • Metrics summary cards have been removed; metric results remain available in grid or table views.

Makisuo and others added 4 commits October 6, 2026 22:29
The page stacked three rows above the content: the header with the time
range, a four-card stat rail, and a search + view toggle row. The stat
cards were really a type filter, so they become a single dropdown with
per-type metric counts in its menu, and search, type and view now sit in
the sticky page header beside the time range.
The summary can be stale across a time-range change or lag the results,
and a zero All count made the filter impossible to clear. Counts are now
informational only. All types also gets its data-point total title.
The Overview / AI traffic tabs sat in their own row under the range
controls. They now ride in the header's titleContent slot, so wide
screens get one row and narrow ones stack tabs above the controls,
matching the Hosts view tabs.
A repo newly granted to the GitHub App syncs in as pending with zero
branches, so BranchSelector returned before calling useAsyncAction. Once
the background sync filled in branches, the next poll rendered an extra
hook and React crashed the page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maple-review-bot

maple-review-bot Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Maple review

🟡 Confidence 3/5 · needs attention
quality 100/100 · no findings · tests missing · risk low

Warning

This review ended early; what follows is what it established.

The pull request hoists BranchSelector's useAsyncAction above its zero-branch early return, fixing the hooks-order crash for repos that sync in with no branches, and folds the metrics/analytics controls into one header row. It reintroduces no risk; the merge is safe.

  • BranchSelector runs useAsyncAction before returning null when repo.branches is empty
  • metrics-summary-cards.tsx is deleted; MetricsTypeFilter replaces it and never disables a type
  • Metrics page renders MetricsBrowseFilters and MetricsViewToggle in the header; analytics tabs moved into titleContent
What was checked
  • git diff --stat from base 49cb661f to head shows only github-integration-card.tsx differing, so the metrics and analytics hunks are already on main
  • sandbox_grep at the head for MetricsSummaryCards finds no remaining importer, so deleting metrics-summary-cards.tsx breaks no call site
  • metrics-type-filter.tsx reads counts via Option.getOrNull(AsyncResult.value(...)) and renders options whenever the summary is null
Files not reviewed (1)

The review ended before it read these diffs, so nothing above vouches for them.

  • apps/web/src/components/metrics/metrics-summary-cards.tsx

65395ab · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 71c8b9a1-c336-445a-beca-901e5c1bf0ff
📥 Commits

Reviewing files that changed from the base of the PR and between 49cb661 and 65395ab.

📒 Files selected for processing (6)
  • apps/web/src/components/integrations/github-integration-card.tsx
  • apps/web/src/components/metrics/metrics-browse.tsx
  • apps/web/src/components/metrics/metrics-summary-cards.tsx
  • apps/web/src/components/metrics/metrics-type-filter.tsx
  • apps/web/src/routes/analytics/index.tsx
  • apps/web/src/routes/metrics/index.tsx
 ________________________
< I came, I saw, I CI'd. >
 ------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Makisuo
Makisuo merged commit fc6de5f into main Oct 6, 2026
39 of 40 checks passed
@Makisuo
Makisuo deleted the feat/metrics-single-toolbar branch October 6, 2026 23:19
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