Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Versions below are grouped by day rather than semver release tags. Each `## [YYY


### Added
- Fix SENTRY-WIRE: Adds @sentry/nextjs (v8.55) with client/server/edge configs, an `instrumentation.ts` register hook, and the `withSentryConfig` wrapper in next.config.ts. All four Sentry init paths are gated on a DSN env var (`NEXT_PUBLIC_SENTRY_DSN` for the browser, `SENTRY_DSN` server-side, falls back to the public DSN). When the DSN is unset Sentry is a no-op, so local dev and any branch missing the env var still build and boot. Source-map upload only activates when `SENTRY_AUTH_TOKEN`, `SENTRY_ORG`, and `SENTRY_PROJECT` are all present in the build environment. Tunnel route `/monitoring` is enabled so ad-blockers don't drop client error reports. (2026-06-26T11:30:00-05:00)



- Fix BANK-ACCOUNT-PRIMARY: Adds a Primary designation to bank accounts so an org picks which verified account is the default funding source for outgoing checks. Migration 0163 adds `mail_bank_accounts.is_primary` boolean + a partial unique index `(org_id) WHERE is_primary=true` so two concurrent Set-As-Primary clicks can't end up with two primaries. New `setMailBankAccountPrimary` server action clears every other bank's `is_primary` first, then sets this one. Bank card under VERIFIED badge now shows a PRIMARY chip when applicable; verified non-primary cards show a Set As Primary button. fetchMailBankAccounts sorts is_primary first, then verified, then newest. Matches Stripe Dashboard / Mercury / Bill.com bank-account list pattern. Old "Default for outgoing checks" string in the card foot replaced by "Primary funding source for checks" tied to the is_primary flag. (2026-06-26T08:50:00-05:00)


Expand Down
10 changes: 10 additions & 0 deletions instrumentation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
await import("./sentry.server.config");
}
if (process.env.NEXT_RUNTIME === "edge") {
await import("./sentry.edge.config");
}
}

export { captureRequestError as onRequestError } from "@sentry/nextjs";
17 changes: 16 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { NextConfig } from "next";
import { withSentryConfig } from "@sentry/nextjs";

const cspDirectives = [
"default-src 'self'",
Expand Down Expand Up @@ -47,4 +48,18 @@ const nextConfig: NextConfig = {
},
};

export default nextConfig;
const sentryOrg = process.env.SENTRY_ORG;
const sentryProject = process.env.SENTRY_PROJECT;
const hasSentry = Boolean(process.env.SENTRY_AUTH_TOKEN && sentryOrg && sentryProject);

export default hasSentry
? withSentryConfig(nextConfig, {
org: sentryOrg,
project: sentryProject,
silent: true,
widenClientFileUpload: true,
hideSourceMaps: true,
disableLogger: true,
tunnelRoute: "/monitoring",
})
: nextConfig;
Loading
Loading