Skip to content

frontend: components: health: HealthTrayMenu: Change disk warning icon to open disk page#3786

Open
patrickelectric wants to merge 1 commit intobluerobotics:masterfrom
patrickelectric:disk-click
Open

frontend: components: health: HealthTrayMenu: Change disk warning icon to open disk page#3786
patrickelectric wants to merge 1 commit intobluerobotics:masterfrom
patrickelectric:disk-click

Conversation

@patrickelectric
Copy link
Member

@patrickelectric patrickelectric commented Feb 10, 2026

Summary by Sourcery

Simplify the disk usage warning in the health tray menu to link directly to the disk tools page instead of showing an inline details popup.

Enhancements:

  • Replace the disk usage menu popup with a clickable warning icon that navigates to the disk tools page and shows a brief tooltip.
  • Remove unused computed helpers related to detailed disk size and free space display from the health tray menu component.

…n to open disk page

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
@sourcery-ai
Copy link

sourcery-ai bot commented Feb 10, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors the disk usage warning in the HealthTrayMenu from a details popover to a simple clickable warning icon that routes directly to the disk tools page, and removes now-unused computed helpers for formatted disk sizes.

Sequence diagram for updated disk warning icon navigation

sequenceDiagram
  actor User
  participant HealthTrayMenu
  participant Router
  participant DiskToolsPage

  User->>HealthTrayMenu: Click disk_warning_icon
  HealthTrayMenu->>Router: push(/tools/disk)
  Router-->>DiskToolsPage: Render DiskToolsPage
  DiskToolsPage-->>User: Display disk tools and usage details
Loading

File-Level Changes

Change Details Files
Change disk usage warning from a details popover to a simple tooltip icon that navigates to the disk page when clicked.
  • Replace v-menu wrapper and activator card with a standalone v-icon rendered when disk usage is high
  • Attach a Vuetify tooltip directive to the icon showing the current disk usage percentage in the warning message
  • Add a click handler on the icon that routes to the '/tools/disk' page
core/frontend/src/components/health/HealthTrayMenu.vue
Remove unused disk size formatting logic previously used in the menu popover.
  • Delete disk_size_friendly and disk_free_friendly computed properties that formatted total and free disk space in GB
  • Remove the table markup that displayed disk percentage, free, and total values in the popover card
core/frontend/src/components/health/HealthTrayMenu.vue

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • The hardcoded route string in @click="$router.push('/tools/disk')" could be replaced with a named route or shared constant to avoid breakage if the path changes.
  • The disk usage warning message template is now duplicated between the v-if and v-tooltip usages; consider extracting it into a computed property for easier maintenance and consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The hardcoded route string in `@click="$router.push('/tools/disk')"` could be replaced with a named route or shared constant to avoid breakage if the path changes.
- The disk usage warning message template is now duplicated between the `v-if` and `v-tooltip` usages; consider extracting it into a computed property for easier maintenance and consistency.

## Individual Comments

### Comment 1
<location> `core/frontend/src/components/health/HealthTrayMenu.vue:3-12` </location>
<code_context>
-      :close-on-content-click="false"
-      nudge-left="150"
-      nudge-bottom="25"
+    <v-icon
+      v-if="disk_usage_high"
+      v-tooltip="`High disk usage! (${disk_usage_percent.toFixed(1)}%) please clean up the disk`"
+      class="px-1 blinking white-shadow"
+      color="red"
+      @click="$router.push('/tools/disk')"
     >
-      <template
-        #activator="{ on, attrs }"
-      >
-        <v-card
-          elevation="0"
-          color="transparent"
-          v-bind="attrs"
-          v-on="on"
-        >
-          <v-icon
-            v-if="disk_usage_high"
-            class="px-1 blinking white-shadow"
-            color="red"
-            :title="`High disk usage high! (${disk_usage_percent.toFixed(1)}%) please clean up the disk`"
-          >
-            mdi-content-save-alert
-          </v-icon>
-        </v-card>
</code_context>

<issue_to_address>
**issue (bug_risk):** Clickable icon should be keyboard-accessible and have an explicit accessible label.

As this icon is now the sole way to reach the disk tools page, it needs to be fully accessible. A plain `<v-icon>` with only a click handler likely isn’t keyboard-focusable and won’t have a clear name for screen readers. Consider using a `v-btn` with an icon, or adding `tabindex="0"`, an `@keydown` handler for Enter/Space, and an explicit accessible label via `aria-label` or `:title` (e.g. `"High disk usage – open disk tools"`).
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +3 to 12
<v-icon
v-if="disk_usage_high"
v-tooltip="`High disk usage! (${disk_usage_percent.toFixed(1)}%) please clean up the disk`"
class="px-1 blinking white-shadow"
color="red"
@click="$router.push('/tools/disk')"
>
<template
#activator="{ on, attrs }"
>
<v-card
elevation="0"
color="transparent"
v-bind="attrs"
v-on="on"
>
<v-icon
v-if="disk_usage_high"
class="px-1 blinking white-shadow"
color="red"
:title="`High disk usage high! (${disk_usage_percent.toFixed(1)}%) please clean up the disk`"
>
mdi-content-save-alert
</v-icon>
</v-card>
</template>

<v-card
elevation="1"
width="350"
>
<v-container>
<div>
<table style="width: 100%">
<tr>
<td>Percentage (Full):</td>
<td>{{ disk_usage_percent.toFixed(1) }} %</td>
</tr>
<tr>
<td>Free:</td>
<td> {{ disk_free_friendly }}</td>
</tr>
<tr>
<td>Total:</td>
<td> {{ disk_size_friendly }}</td>
</tr>
</table>
</div>
</v-container>
</v-card>
</v-menu>
mdi-content-save-alert
</v-icon>
<v-icon
Copy link

Choose a reason for hiding this comment

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

issue (bug_risk): Clickable icon should be keyboard-accessible and have an explicit accessible label.

As this icon is now the sole way to reach the disk tools page, it needs to be fully accessible. A plain <v-icon> with only a click handler likely isn’t keyboard-focusable and won’t have a clear name for screen readers. Consider using a v-btn with an icon, or adding tabindex="0", an @keydown handler for Enter/Space, and an explicit accessible label via aria-label or :title (e.g. "High disk usage – open disk tools").

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

Comments