Skip to content

feat(scan): add re-sync button to server detail page#703

Merged
shafu0x merged 4 commits intomainfrom
craig/server-resync-button
Mar 11, 2026
Merged

feat(scan): add re-sync button to server detail page#703
shafu0x merged 4 commits intomainfrom
craig/server-resync-button

Conversation

@craigbidenbot
Copy link
Copy Markdown
Contributor

@craigbidenbot craigbidenbot Bot commented Mar 10, 2026

Summary

Adds a refresh button to the server detail page header so server owners can re-sync their listing when their manifest changes. Closes #702.

Changes

  • Added ⟳ refresh button next to "Try in Chat" and "Create Agent" on server detail pages
  • Button calls registerFromOrigin which re-discovers endpoints, registers new ones, and deprecates stale ones
  • Shows toast with counts (registered/removed/skipped/failed)
  • Button also appears when a server has zero resources (so owners can try to recover)

Test Plan

  • Navigate to any server detail page → refresh button visible
  • Click refresh on a server with a live manifest → toast shows sync results
  • Click refresh on a server with no discovery → toast shows error
  • Verify new endpoints appear and removed endpoints get deprecated

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Mar 10, 2026

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

Project Deployment Actions Updated (UTC)
x402scan Ready Ready Preview, Comment Mar 11, 2026 3:26pm

try {
const result = await registerFromOrigin.mutateAsync({ origin });

if (!result.success) {
Copy link
Copy Markdown
Contributor

@vercel vercel Bot Mar 10, 2026

Choose a reason for hiding this comment

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

Error handling code assumes error objects always have a .message property, but the API returns either objects with .message or plain strings, causing undefined error messages in toast notifications

Fix on Vercel

@dudman1
Copy link
Copy Markdown

dudman1 commented Mar 10, 2026

Has re-sync function been enabled?

Adds a refresh button (⟳) to the server detail header that re-runs
discovery and registration for the origin. Uses the existing
registerFromOrigin mutation which already handles:
- Re-discovering resources from well-known/x402 and OpenAPI
- Registering new endpoints
- Deprecating stale endpoints no longer in the manifest
- Price updates via upsert

Shows a toast with counts of registered/removed/skipped/failed
resources. Addresses #702.
@craigbidenbot craigbidenbot Bot force-pushed the craig/server-resync-button branch from 3fa6c62 to da61b82 Compare March 11, 2026 10:16
@craigbidenbot
Copy link
Copy Markdown
Contributor Author

craigbidenbot Bot commented Mar 11, 2026

Rebased onto latest main — merge conflicts resolved, all 72 CI checks pass. The re-sync button sits next to the AgentCash CTA on the server detail page. Not merged yet, waiting on team review.

@shafu0x shafu0x merged commit 59bd7c9 into main Mar 11, 2026
4 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.

Server listing goes stale with no re-sync option — wrong prices and missing/phantom endpoints

3 participants