Skip to content

fix: restore offchain notifications by adopting @anticapture/client 1.2.0#260

Merged
LeonardoVieira1630 merged 7 commits into
devfrom
fix/offchain-notifications-sdk-1.2.0
May 27, 2026
Merged

fix: restore offchain notifications by adopting @anticapture/client 1.2.0#260
LeonardoVieira1630 merged 7 commits into
devfrom
fix/offchain-notifications-sdk-1.2.0

Conversation

@LeonardoVieira1630

Copy link
Copy Markdown
Member

Summary

  • Bumps @anticapture/client to 1.2.0 (publishes the renamed REST shape — daos endpoint, supportsCalldataReview/supportsOffchainData, new proposal() signature) so the offchain code path is no longer silently degraded.
  • Updates the @notification-system/anticapture-client wrapper to the new SDK surface, including bigint→string coercions on voting power, deltas, timestamps, and event thresholds.
  • Propagates the field rename through dispatcher (DaoInfo cache + buildButtons mapping) and coerces vote tallies (forVotes/againstVotes/abstainVotes) and votingPower to string at the boundaries where downstream still expects strings.
  • Aligns MSW handler name (getDaosHandlerdaosHandler) and DaoInfo test fixtures in consumers + integrated-tests.

Context

This is the second half of the incident captured in INCIDENT_prod-notifications-down.md. The first half (GraphQL → REST endpoint switch) ships via the dev → main merge. This PR is what fixes the silent failure mode where the dispatcher kept running but supportsOffchainData was always false, so every offchain-only DAO got skipped.

Test plan

  • pnpm -r build — green across all workspaces.
  • Unit tests: dispatcher (106), consumers (9), logic-system (88), subscription-server (29), anticapture-client (46), messages (9), dashboard (15) — all passing.
  • Integrated tests: 25 files, 107 tests, all passing.
  • After merge: redeploy dispatcher and verify offchain notifications fire for ENS/Uniswap snapshot proposals.

🤖 Generated with Claude Code

LeonardoVieira1630 and others added 5 commits May 27, 2026 13:36
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Renames getDaos to daos, adopts supportsCalldataReview/supportsOffchainData
field names, coerces bigint runtime values to string in voting power and
threshold mappers, and updates proposal() to its new positional signature.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Updates DaoInfo cache type and getDaoInfo return type to the new field
names, coerces vote.votingPower to string before formatTokenAmount, and
fixes test fixtures to pass bigint literals where the type now requires.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SDK 1.2.0 returns forVotes/againstVotes/abstainVotes as bigint at runtime;
stringify them before dispatching to keep the downstream payload contract.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
SDK 1.2.0 exports the handler as daosHandler (was getDaosHandler) and the
DaoInfo response uses supports* field names; align consumers and
integrated-tests fixtures with the new shape.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel

vercel Bot commented May 27, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
flow-editor Ready Ready Preview, Comment May 27, 2026 5:05pm
notification-system-dashboard Ready Ready Preview, Comment May 27, 2026 5:05pm

Request Review

@LeonardoVieira1630 LeonardoVieira1630 self-assigned this May 27, 2026
LeonardoVieira1630 and others added 2 commits May 27, 2026 13:56
SettingsService.getUserPreferences now filters out preference rows whose
trigger_type is not in the current NotificationTypeId enum, so legacy or
manually inserted values in user_notification_preferences cannot break the
GET /users/by-channel/:channel/:channelUserId/notification-preferences
response.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…gger-types

fix: tolerate stale trigger_type values in settings response
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.

2 participants