Skip to content

Improve API status indicator accessibility — use shadcn tooltip and increase hit area#2880

Merged
seveibar merged 5 commits intotscircuit:mainfrom
rushabhcodes:fix-status-indicator
Mar 18, 2026
Merged

Improve API status indicator accessibility — use shadcn tooltip and increase hit area#2880
seveibar merged 5 commits intotscircuit:mainfrom
rushabhcodes:fix-status-indicator

Conversation

@rushabhcodes
Copy link
Contributor

@rushabhcodes rushabhcodes commented Mar 12, 2026

This pull request enhances the user experience for the API status indicator in the RunFrameWithApi component by adding a tooltip for accessibility and clarity.

UI/UX Improvements:

  • Added a tooltip to the API status indicator using the Tooltip, TooltipTrigger, TooltipContent, and TooltipProvider components from lib/components/ui/tooltip, improving accessibility and providing a clearer status message on hover or focus. [1] [2]
  • Replaced the direct use of title and aria-label on the status indicator with a button wrapped in a tooltip, and adjusted the indicator's opacity for the connected state for better visual feedback.
image

Copilot AI review requested due to automatic review settings March 12, 2026 08:33
@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
runframe Ready Ready Preview, Comment Mar 18, 2026 3:19pm

Request Review

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 improves the API status indicator UX in RunFrameWithApi by making it keyboard/focus accessible via a shadcn/Radix tooltip wrapper and increasing the indicator’s hit area.

Changes:

  • Wrap the API status indicator in a tooltip and replace the raw <span title/aria-label> with a focusable <button> trigger.
  • Adjust the “connected” indicator styling (reduced opacity) and increase the clickable/hoverable area.
  • Minor refactor to URL hash update string building.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/hooks/styles.generated.ts Regenerates the Tailwind-generated style string to include newly referenced utility classes.
lib/components/RunFrameWithApi/RunFrameWithApi.tsx Adds tooltip-based, focusable API status indicator and tweaks URL hash update formatting.

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

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

message is an awful var name inside RunFrameForApi, it could mean a million things, move this code outside this element and make sure youre naming well based on contrxt

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

why have an enum? adds complexity for no gain in this case

@github-actions
Copy link
Contributor

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Copy link
Contributor

@MustafaMulla29 MustafaMulla29 left a comment

Choose a reason for hiding this comment

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

Those strings are too long for tool tip ig, maybe we can do: "dev server connected" and "connection lost"

@rushabhcodes
Copy link
Contributor Author

@MustafaMulla29 fixed "Dev server disconnected" : "Dev server connected"

Copy link
Contributor

@MustafaMulla29 MustafaMulla29 left a comment

Choose a reason for hiding this comment

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

Wait for seve

@rushabhcodes
Copy link
Contributor Author

@seveibar

@seveibar seveibar merged commit cee0641 into tscircuit:main Mar 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants