Skip to content

🎨 Palette: Enhanced Telemetry Timeline UX#21

Draft
igor-holt wants to merge 1 commit intomainfrom
palette/telemetry-timeline-ux-improvements-18364449334983814518
Draft

🎨 Palette: Enhanced Telemetry Timeline UX#21
igor-holt wants to merge 1 commit intomainfrom
palette/telemetry-timeline-ux-improvements-18364449334983814518

Conversation

@igor-holt
Copy link
Owner

💡 What: Added a custom tooltip to the Telemetry Timeline chart, improved table accessibility, and added an empty state for the data.

🎯 Why:

  • Tooltip: The default Recharts tooltip lacked context. The new custom tooltip displays the formatted date, event name, prediction mode, and probability, making the data much easier to interpret.
  • Accessibility: The data table was missing scope attributes, which are crucial for screen readers to associate headers with data cells.
  • Empty State: Previously, if no telemetry data was available, the chart would render empty or broken. Now, a friendly "No telemetry data available" message is shown.

📸 Before/After:

  • Before: Default generic tooltip, standard table.
  • After: Rich tooltip with event details, accessible table headers, empty state handling.

Accessibility:

  • Added scope="col" to table headers.
  • Added scope="row" to the Log ID column.
  • Ensured the tooltip provides clear, structured information.

PR created automatically by Jules for task 18364449334983814518 started by @igor-holt

…vements

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 20, 2026 01:14
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gemini-code-assist
Copy link

Summary of Changes

Hello @igor-holt, 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 significantly improves the user experience and accessibility of the Telemetry Timeline feature. It introduces a more informative custom tooltip for the chart, ensures the associated data table is accessible to screen readers, and provides a clear visual indication when no data is present, making the component more robust and user-friendly.

Highlights

  • Enhanced Telemetry Timeline Tooltip: A custom tooltip has been implemented for the Telemetry Timeline chart, providing richer context by displaying formatted date, event name, prediction mode, and probability, improving data interpretability over the default Recharts tooltip.
  • Improved Table Accessibility: The data table associated with the timeline now includes scope="col" attributes for table headers and scope="row" for the 'Log ID' column, significantly enhancing accessibility for screen readers.
  • Added Empty State Handling: The Telemetry Timeline component now gracefully handles cases where no telemetry data is available, displaying a user-friendly 'No telemetry data available' message instead of rendering an empty or broken chart.
Changelog
  • components/TelemetryTimeline.tsx
    • Implemented a CustomTooltip component to display detailed event information on hover.
    • Integrated the CustomTooltip into the LineChart component.
    • Added conditional rendering to display an 'No telemetry data available' message when telemetryData is empty.
    • Applied scope="col" to all table header (<th>) elements for improved accessibility.
    • Applied scope="row" to the 'Log ID' table data (<td>) cells for improved accessibility.
  • data/telemetry.ts
    • Modified the getProbabilityData function to include event and mode properties in the returned data objects, enabling richer tooltip content.
  • pnpm-lock.yaml
    • Added the pnpm lockfile to ensure consistent dependency installations across environments.
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.

Copy link

@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

The pull request introduces several valuable enhancements to the Telemetry Timeline component, including a custom tooltip for better data interpretation, improved accessibility for the data table, and an empty state handling for when no telemetry data is available. These changes significantly improve the user experience and accessibility of the component. The pnpm-lock.yaml file was also updated, likely due to dependency changes related to these new features.

ResponsiveContainer,
} from 'recharts';

const CustomTooltip = ({ active, payload, label }: any) => {

Choose a reason for hiding this comment

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

medium

It's good practice to define a type/interface for the CustomTooltip props instead of using any for better type safety and readability. This helps in understanding what properties active, payload, and label are expected to have.

Suggested change
const CustomTooltip = ({ active, payload, label }: any) => {
const CustomTooltip = ({ active, payload, label }: { active?: boolean; payload?: any[]; label?: string | number }) => {

const TelemetryTimeline: React.FC = () => {
const chartData = getProbabilityData();

if (telemetryData.length === 0) {

Choose a reason for hiding this comment

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

medium

The telemetryData variable is directly accessed here. While it works, it might be more consistent and maintainable to pass telemetryData as a prop to the TelemetryTimeline component, or fetch it within the component if it's dynamic. This makes the component more reusable and testable.

Comment on lines +74 to +77
<th scope="col" style={{ padding: '10px', textAlign: 'left' }}>Log ID</th>
<th scope="col" style={{ padding: '10px', textAlign: 'left' }}>UTC</th>
<th scope="col" style={{ padding: '10px', textAlign: 'left' }}>Event</th>
<th scope="col" style={{ padding: '10px', textAlign: 'left' }}>Prediction (p)</th>

Choose a reason for hiding this comment

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

medium

Adding scope="col" to table headers is a great accessibility improvement. This helps screen readers understand the structure of the table.

{telemetryData.map((entry) => (
<tr key={entry.logId} style={{ borderBottom: '1px solid #ddd' }}>
<td style={{ padding: '10px' }}>{entry.logId}</td>
<td scope="row" style={{ padding: '10px' }}>{entry.logId}</td>

Choose a reason for hiding this comment

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

medium

Adding scope="row" to the Log ID column is also a good accessibility practice, ensuring screen readers correctly associate the row header with its data cells.

Comment on lines +59 to +60
event: entry.event,
mode: entry.prediction.mode,

Choose a reason for hiding this comment

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

medium

Adding event and mode to the getProbabilityData return object is a good change, as it makes this data available for the custom tooltip, enhancing the chart's interactivity and information display.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the Telemetry Timeline component with improved UX features including a custom tooltip for better data context, accessibility improvements through proper ARIA attributes, and empty state handling when no data is available. The changes align with modern web accessibility standards and improve the overall user experience when viewing telemetry data visualizations.

Changes:

  • Added custom Recharts tooltip displaying formatted date, event name, prediction mode, and probability
  • Added scope="col" attributes to table header elements for screen reader accessibility
  • Implemented empty state UI showing "No telemetry data available" message
  • Extended data transformation function to include event and mode fields in chart data

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
pnpm-lock.yaml New lockfile establishing dependencies for Next.js 16, React 19, Recharts 3.7, and related packages
data/telemetry.ts Extended getProbabilityData() to include event and mode fields for enhanced tooltip display
components/TelemetryTimeline.tsx Added CustomTooltip component, empty state handling, and accessibility improvements with scope attributes
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 16 to +17

const CustomTooltip = ({ active, payload, label }: any) => {
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The CustomTooltip component uses the any type for its props, which bypasses TypeScript's type safety. Consider defining a proper interface for the tooltip props. Recharts provides TooltipProps type that can be used, or you can define a custom interface specifying the shape of active, payload, and label parameters to improve type safety and code maintainability.

Suggested change
const CustomTooltip = ({ active, payload, label }: any) => {
import type { TooltipProps } from 'recharts';
const CustomTooltip: React.FC<TooltipProps<number, string>> = ({ active, payload, label }) => {

Copilot uses AI. Check for mistakes.
{telemetryData.map((entry) => (
<tr key={entry.logId} style={{ borderBottom: '1px solid #ddd' }}>
<td style={{ padding: '10px' }}>{entry.logId}</td>
<td scope="row" style={{ padding: '10px' }}>{entry.logId}</td>
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The scope="row" attribute is incorrectly applied to a table data cell (td). The scope attribute is only valid on table header cells (th elements). For row headers, you should use a th element with scope="row" instead of a td element. This is important for screen readers to properly associate the row header with the data cells in the row.

Suggested change
<td scope="row" style={{ padding: '10px' }}>{entry.logId}</td>
<th scope="row" style={{ padding: '10px' }}>{entry.logId}</th>

Copilot uses AI. Check for mistakes.
const TelemetryTimeline: React.FC = () => {
const chartData = getProbabilityData();

if (telemetryData.length === 0) {
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

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

The empty state check uses telemetryData.length === 0 but the chart is rendered using chartData from getProbabilityData(). While these are currently equivalent, there's a logical inconsistency. The component should check the same data source that it displays. Consider using chartData.length === 0 for consistency, or checking both if there's a specific reason to check the raw data.

Suggested change
if (telemetryData.length === 0) {
if (chartData.length === 0) {

Copilot uses AI. Check for mistakes.
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.

2 participants