yiekheng 5c48e0e85f fix(web): wire Refresh Groups button to syncGroupsAction with live SSE refresh
The button was a placeholder that submitted to a no-op server action,
so clicking did nothing. Replace with a small client component that:

  1. Calls syncGroupsAction(accountId) to pgNotify the bot.
  2. Listens for the bot's groups.synced event over SSE and
     router.refresh()es when it arrives so the new rows appear without
     a manual reload.
  3. Disables the button + shows a Syncing… label while the sync is
     in flight, with a 15s safety timeout if the bot or SSE channel
     drops so the spinner doesn't strand.

Drop the in-place <form action={async() => 'use server'}> placeholder.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 19:13:24 +08:00
..