Skip to content

Comments

Console 1791 rpm wrong scale#7732

Merged
jonathanawesome merged 3 commits intomainfrom
console-1791-rpm-wrong-scale
Feb 25, 2026
Merged

Console 1791 rpm wrong scale#7732
jonathanawesome merged 3 commits intomainfrom
console-1791-rpm-wrong-scale

Conversation

@jonathanawesome
Copy link
Member

This PR fixes a visual bug in our RPM over time chart and, additionally, takes this opportunity to kebab-case a few of the files that are in the insights folder to bring them more inline with the rest of the repo.

  • Fix RPM over time chart Y-axis labels being wrong — too low on 24h view, too high on 1h view. The chart data was already converted to RPM, but the axis formatter was re-converting it with formatThroughput(value * 10, interval), causing a double-scaling bug that varied by time window. Tooltips were unaffected.
  • Extract formatRpm() for formatting values already in RPM, and have formatThroughput() delegate to it.
  • Rename PascalCased insight files (Stats.tsx, List.tsx, Fallback.tsx) to kebab-case for consistency.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jonathanawesome, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical display issue in the RPM over time chart, ensuring accurate representation of data across different time windows. Concurrently, it refactors the throughput formatting logic for better maintainability and consistency, and standardizes file naming conventions within the insights module to improve overall code hygiene.

Highlights

  • RPM Chart Y-axis Fix: Resolved a visual bug in the RPM over time chart where Y-axis labels were incorrectly scaled, appearing too low on 24h views and too high on 1h views, due to a double-scaling issue in the axis formatter.
  • Formatting Utility Refactor: Extracted a new formatRpm() function to specifically handle formatting values that are already in RPM, and updated formatThroughput() to delegate to this new function, improving clarity and preventing future scaling errors.
  • File Renaming for Consistency: Renamed several PascalCased insight files (e.g., Stats.tsx, List.tsx, Fallback.tsx) to kebab-case (e.g., stats.tsx, list.tsx, fallback.tsx) to align with the repository's naming conventions.
Changelog
  • packages/web/app/src/components/target/insights/Fallback.tsx
    • Renamed file to fallback.tsx.
  • packages/web/app/src/components/target/insights/List.tsx
    • Renamed file to list.tsx.
    • Updated import path for OperationsFallback to reflect the new kebab-case filename.
  • packages/web/app/src/components/target/insights/Stats.tsx
    • Renamed file to stats.tsx.
    • Updated import statement for formatThroughput to formatRpm.
    • Updated import statement for OperationsFallback to reflect the new kebab-case filename.
    • Removed the interval variable calculation.
    • Modified the axisLabel formatter for the RPM chart to use formatRpm directly.
  • packages/web/app/src/lib/hooks/index.ts
    • Exported the new formatRpm function.
  • packages/web/app/src/lib/hooks/use-formatted-throughput.ts
    • Extracted formatRpm function to format values already in RPM.
    • Refactored formatThroughput to calculate RPM and then use formatRpm.
  • packages/web/app/src/pages/target-insights-operation.tsx
    • Updated import path for OperationsStats to use the new kebab-case filename.
  • packages/web/app/src/pages/target-insights.tsx
    • Updated import path for OperationsList to use the new kebab-case filename.
    • Updated import path for OperationsStats to use the new kebab-case filename.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
hive 9.5.0-alpha-20260225113005-715592201d83e27dc446fba5989bd3cdf776f991 npm ↗︎ unpkg ↗︎

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a visual bug in the RPM over time chart by fixing a double-scaling issue in the axis formatter. The refactoring to introduce a formatRpm function and renaming files to kebab-case are good improvements for code clarity and consistency. I've identified a couple of edge cases where division by zero could occur and have left suggestions to make the code more robust.

@n1ru4l
Copy link
Contributor

n1ru4l commented Feb 25, 2026

optionally, please add a patch changeset for this change.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

🐋 This PR was built and pushed to the following Docker images:

Targets: build

Platforms: linux/amd64

Image Tag: 715592201d83e27dc446fba5989bd3cdf776f991

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

💻 Website Preview

The latest changes are available as preview in: https://pr-7732.hive-landing-page.pages.dev

@jonathanawesome jonathanawesome merged commit 3567483 into main Feb 25, 2026
27 checks passed
@jonathanawesome jonathanawesome deleted the console-1791-rpm-wrong-scale branch February 25, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants