Skip to content

Show failed tool update alert on My Tools dashboard page#79

Merged
Power-Maverick merged 5 commits intomainfrom
copilot/add-alert-for-failed-updates
Mar 25, 2026
Merged

Show failed tool update alert on My Tools dashboard page#79
Power-Maverick merged 5 commits intomainfrom
copilot/add-alert-for-failed-updates

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

  • Add packagename and version to the tools SELECT in dashboard API
  • Query tool_updates with status = 'validation_failed' for the user's tools
  • Add compareSemver helper and filter failed updates to only show tool_updates.version >= tools.version
  • Add FailedToolUpdate interface and failedToolUpdates state in dashboard page
  • Add alert banner shown only in My Tools view when there are failed updates
  • Add per-tool "Update failed" badge next to tool name in My Tools table rows
  • Precompute failedUpdatePackageNames as a useMemo-cached Set<string> for O(1) lookups per row render (replaces O(n) .find() on every row)

⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

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

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Mar 25, 2026 4:53pm

@Power-Maverick
Copy link
Copy Markdown
Contributor

@copilot before showing the error check the version in the tool_updates it should be greater than or equal to the version in the tools table

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 24, 2026

@copilot before showing the error check the version in the tool_updates it should be greater than or equal to the version in the tools table

Done in commit 0134ac7. The API now:

  1. Fetches the version field from the tools table alongside each tool
  2. After querying tool_updates with status = 'validation_failed', filters out any entries where the failed update's version is older than the tool's current published version using a compareSemver helper

Only failed updates with tool_updates.version >= tools.version are surfaced in the alert.

Copilot AI requested a review from Power-Maverick March 24, 2026 04:03
@Power-Maverick Power-Maverick marked this pull request as ready for review March 24, 2026 21:45
Copilot AI review requested due to automatic review settings March 24, 2026 21:45
Copy link
Copy Markdown
Contributor

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

Adds visibility in the authenticated dashboard’s “My Tools” view for tool updates that failed validation, so tool owners can see failures and which tools are affected.

Changes:

  • /api/dashboard now returns failedToolUpdates for the authenticated user, based on tool_updates.status = 'validation_failed' and package name matching.
  • Adds a version-based suppression check intended to hide stale failed updates (older than the tool’s current version).
  • Dashboard “My Tools” view renders a red alert banner plus an inline “Update failed” badge per affected tool.

Reviewed changes

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

File Description
app/api/dashboard/route.ts Fetches failed validation updates for the user’s tools and returns them from the dashboard API; introduces a semver comparison helper.
app/(authenticated)/dashboard/page.tsx Consumes failedToolUpdates and renders an alert banner + per-tool “Update failed” badge in the “My Tools” view.

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

@Power-Maverick Power-Maverick merged commit 5558478 into main Mar 25, 2026
2 checks passed
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.

3 participants