Skip to content

v2: providers settings page#1108

Merged
canalesb93 merged 2 commits into
mainfrom
v2-providers-settings
May 16, 2026
Merged

v2: providers settings page#1108
canalesb93 merged 2 commits into
mainfrom
v2-providers-settings

Conversation

@canalesb93
Copy link
Copy Markdown
Owner

Summary

  • New v2 Setup → Providers page that wraps GET/PUT /api/v1/settings/providers so the SPA gets the same provider configuration UX as the legacy admin form, but with the shadcn/Tailwind design used everywhere else in /v2.
  • One card per provider (Plaid, Teller, CSV) with the existing status badge + live last-sync chip from /sync/health/providers.
  • Per-card actions: validated zod form → PUT, server-side Test connection probe, Disable provider confirmation dialog wired to DELETE /api/v1/providers/{name}.
  • Mirrors the v1 form's "leave blank to keep" UX for secrets and PEM certificates so users don't have to retype values on every save.
  • Adds has_encryption_key to providerConfigResponse so the Teller card can warn the user before a cert upload that would 500 with ENCRYPTION_KEY_MISSING server-side.

Why a new page instead of nesting in the existing Settings modal

The legacy admin UI had a real /settings/providers route that handled cert uploads, env-var-locked deployments, and webhook setup hints. None of that fits cleanly into a modal sheet, and a "provider configuration" surface is also reasonably the first thing a brand-new install lands on. Putting it under the Setup sidebar group puts it next to Connections / Account links, which is where the work actually flows.

Build tag note

No new Go files — only an additive field on providerConfigResponse in internal/api/provider_config.go. The integration tests in internal/api/provider_config_integration_test.go decode into the same struct, so they keep compiling/passing.

Test plan

  • bun run build — clean
  • go vet ./... and go build ./... — clean
  • Captured at desktop / tablet / mobile via bun run validate /v2/providers (see screenshot)
  • Smoke PUT /api/v1/settings/providers/plaid from the SPA against a non-env-var deployment
  • Smoke Teller cert pair upload against a deployment with ENCRYPTION_KEY set
  • Confirm DELETE flow on a sandbox install

🤖 Generated with Claude Code

canalesb93 and others added 2 commits May 15, 2026 22:45
Build out a v2 Setup → Providers page that wraps the existing
GET/PUT /api/v1/settings/providers endpoints. Mirrors the v1 admin
form's "leave blank to keep" UX for secrets and PEM certificates,
but adopts the shadcn/Tailwind layout used elsewhere in the v2 SPA.

- Plaid card: client_id / secret / env / webhook URL form with zod
  validation. Test-connection button hits the existing
  /providers/{name}/test probe. Env-locked deployments collapse to
  a read-only summary.
- Teller card: same shape plus dual PEM file pickers (cert + key)
  with client-side pairing check and a heads-up Alert when
  ENCRYPTION_KEY isn't set on the server (cert storage would fail).
- CSV card: always-available, links into /connections.
- Disable button per provider with an AlertDialog confirmation,
  wired to DELETE /api/v1/providers/{name}.

Adds has_encryption_key to providerConfigResponse so the SPA can
warn before a cert upload that the server-side preflight would
reject (length-0 ENCRYPTION_KEY currently returns 500
ENCRYPTION_KEY_MISSING from UpdateTellerConfigHandler).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts:
#	web/src/lib/nav.ts
#	web/src/main.tsx
@canalesb93 canalesb93 enabled auto-merge (squash) May 16, 2026 06:00
@canalesb93 canalesb93 merged commit 2b298b1 into main May 16, 2026
7 checks passed
@canalesb93 canalesb93 deleted the v2-providers-settings branch May 16, 2026 06:04
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.

1 participant