Skip to content

fix(ux): add CSS so usage-history sparkline is visible in Opportunities table - #1432

Merged
cristim merged 1 commit into
mainfrom
fix/1417-opportunities-sparkline
Jul 17, 2026
Merged

cristim merged 1 commit into
mainfrom
fix/1417-opportunities-sparkline

Conversation

@cristim

@cristim cristim commented Jul 17, 2026

Copy link
Copy Markdown
Member

Summary

  • Add .usage-sparkline-cell CSS rule (center-align, min-width: 4rem) and .usage-sparkline CSS rule (display: block, color: var(--cudly-primary)) to charts.css; the missing rules meant the SVG's stroke="currentColor" could inherit a color that was invisible or the SVG would be misaligned in the table cell
  • The SVG generation in renderUsageSparkline() was already correct; only the stylesheet was missing
  • Add integration tests verifying the SVG polyline renders in the table when a recommendation carries non-empty usage_history, and the em-dash fallback is used when usage_history is null

Closes #1417

…es table (#1417)

The SVG inline sparkline rendered by renderUsageSparkline() had no
matching CSS for .usage-sparkline or .usage-sparkline-cell, causing the
SVG to be invisible or misaligned in some browsers.

Add two rules to charts.css:
- .usage-sparkline-cell: center-align with min-width so the column
  stays stable as data loads
- .usage-sparkline: display:block with explicit color (--cudly-primary)
  so the SVG stroke/fill values inherited via currentColor are always
  visible regardless of ancestor color overrides

Add integration tests verifying the SVG polyline appears in the rendered
table HTML when a recommendation carries non-empty usage_history, and
that the em-dash fallback is used when usage_history is null.

Closes #1417
@cristim cristim added triaged Item has been triaged priority/p3 Polish / idea / may never ship severity/low Minor harm urgency/this-quarter Within the quarter impact/many Affects most users effort/s Hours type/bug Defect labels Jul 17, 2026
@cristim

cristim commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1847170c-0818-4b48-95dd-0c2a02fc98a8

📥 Commits

Reviewing files that changed from the base of the PR and between 473f69b and 1023390.

📒 Files selected for processing (2)
  • frontend/src/__tests__/recommendations.test.ts
  • frontend/src/styles/charts.css
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/1417-opportunities-sparkline

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

@cristim
cristim merged commit 86593a5 into main Jul 17, 2026
20 checks passed
@cristim
cristim deleted the fix/1417-opportunities-sparkline branch July 17, 2026 06:50
@cristim

cristim commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Merged to main after independent review (SHIP) + all CI green. restore the Opportunities per-row usage sparkline (CSS currentColor resolution + cell sizing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/s Hours impact/many Affects most users priority/p3 Polish / idea / may never ship severity/low Minor harm triaged Item has been triaged type/bug Defect urgency/this-quarter Within the quarter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(opportunities): per-row usage-history sparkline not visible in recommendations table (regression after #239/PR #801)

1 participant