Skip to content

chore: remove Vercel fork relics and AI Gateway managed-keys flow#1049

Merged
suisuss merged 3 commits intostagingfrom
chore/remove-vercel-fork-relics
May 3, 2026
Merged

chore: remove Vercel fork relics and AI Gateway managed-keys flow#1049
suisuss merged 3 commits intostagingfrom
chore/remove-vercel-fork-relics

Conversation

@suisuss
Copy link
Copy Markdown

@suisuss suisuss commented Apr 29, 2026

Summary

Removes leftover artifacts from the upstream vercel-labs/workflow-builder-template that no longer apply since we don't sync from upstream, and the dormant Vercel-OAuth + AI Gateway managed-keys consent flow that was never enabled in any deploy config.

50 files changed, +225 / -2302 net.

Deleted

  • .github/workflows/keeperhub-daily-main-sync-with-upstream.yml — daily cron that hard-reset main to upstream and force-pushed origin/main. Actively dangerous since we no longer sync.
  • scripts/migrate-prod.ts and its pnpm build prefix — gated on VERCEL_ENV which is never set in K8s, so it always logged "Skipping migrations". Migrations are run by the K8s init container (deploy/keeperhub/{staging,prod}/values.yaml) via pnpm db:migrate directly.
  • app/api/ai-gateway/{consent,status,teams}/route.ts, lib/ai-gateway/, components/overlays/ai-gateway-consent-overlay.tsx — AI Gateway managed-keys consent flow that minted Vercel API keys via Vercel OAuth. Gated on AI_GATEWAY_MANAGED_KEYS_ENABLED, never enabled.
  • Vercel genericOAuth provider in lib/auth.ts (gated on unused VERCEL_CLIENT_ID) and the VERCEL_URL baseURL fallback.
  • components/github-stars-{button,loader,provider}.tsx — unused upstream UI loading vercel-labs star count.
  • specs/KEEPERHUB_PARALLEL_REFACTOR_PLAN.md — premised on syncing from upstream.
  • Sentry automaticVercelMonitors: true in next.config.ts — Vercel-cron-only feature, no-op for our K8s deployment.
  • @vercel/sdk from package.json (no consumers after lib/integrations/vercel.ts was already deleted upstream).

AI Gateway plugin kept

plugins/ai-gateway/ (workflow plugin providing Generate Text / Generate Image actions, used via plain AI_GATEWAY_API_KEY) is kept. Only stripped Vercel-specific branding from index.ts (helpLink) and test.ts (managed-keys comments).

Cleaned

  • app/api/user/{route,password,forgot-password}.ts — dropped \"vercel\" from OAUTH_PROVIDERS arrays.
  • lib/auth-providers.ts, components/auth/dialog.tsx, components/ui/integration-icon.tsx — dropped \"vercel\" provider type, Continue with Vercel button, VercelIcon.
  • lib/api-client.ts — dropped VercelTeam type, isVercelUser field, aiGatewayApi client.
  • lib/workflow/executor/execution-fallback.ts and its test — dropped VERCEL_URL fallback.
  • app/layout.tsx — dropped GitHubStarsLoader/Provider Suspense wrapper.
  • Connection/workflow overlays + integration-selector + action-config + integrations-manager — removed managed-keys consent branches, isManaged-routing for AI Gateway, vercel icon mapping.
  • configuration-overlay.tsx, node-config-panel.tsx — schedule trigger filename hint vercel.json -> schedule.json.
  • Comment cleanups in lib/mcp/logging.ts, lib/utils/id.ts, lib/metrics/instrumentation/saturation.ts, lib/workflow/executor/executor.workflow.ts, app/api/agentic-wallet/provision/route.ts, app/api/workflow/[workflowId]/execute/route.ts, sentry.edge.config.ts, tests/integration/agentic-wallet-sweeper.test.ts.
  • Doc/spec updates in AGENTS.md, README.md, docs/users-teams-orgs/users.md, deploy/local/values-keeperhub.template.yaml, specs/logging-and-metrics/logging-metrics-system.md, specs/organization-implementation-strategy.md.

Not touched (intentional)

  • @vercel/og (load-bearing for OG image generation, runs on Node) and its next.config.ts external.
  • @vercel/queue and @vercel/oidc externals in next.config.ts — both are transitive deps from Workflow DevKit and WalletConnect/unstorage; externalization is needed for the Next build.
  • lib/monaco-theme.ts vercelDarkTheme and the vercel-dark Monaco theme name — purely cosmetic.
  • integrations.is_managed DB column — left in schema and Integration type. Old rows with isManaged=true from the deleted consent flow may still exist. Follow-up needed: drop the column with a migration, clean up Integration.isManaged, lib/db/integrations.ts, and the metric in lib/metrics/db-metrics.ts:638.

Verification

  • pnpm type-check: clean
  • pnpm test:unit: 3322 / 3322 tests pass across 174 files
  • Lint baseline went from 183 -> 101 errors (the 82-error reduction is from deleted files; remaining errors are pre-existing in lines this PR does not touch)

Test plan

  • CI: type-check, lint, unit, integration, e2e
  • Manually verify sign-in dialog renders without the Continue with Vercel button
  • Manually verify schedule-trigger code preview shows schedule.json instead of vercel.json
  • Manually verify add-connection / edit-connection / settings flows still work
  • Confirm staging deploy still runs migrations via the K8s init container

Removes leftover artifacts from the upstream vercel-labs/workflow-builder-template
that no longer apply now that we don't sync from upstream.

Deleted:
- .github/workflows/keeperhub-daily-main-sync-with-upstream.yml: daily cron that
  hard-reset main to upstream and force-pushed; actively dangerous.
- scripts/migrate-prod.ts: gated on VERCEL_ENV which is never set in K8s, so it
  always logged "Skipping migrations". Migrations are run by the K8s init
  container (deploy/keeperhub/{staging,prod}/values.yaml) via pnpm db:migrate
  directly. Build script no longer prefixes tsx scripts/migrate-prod.ts.
- specs/KEEPERHUB_PARALLEL_REFACTOR_PLAN.md: premised on syncing from upstream.
- components/github-stars-{button,loader,provider}.tsx: unused upstream UI that
  loaded vercel-labs/workflow-builder-template's star count.
- app/api/ai-gateway/{consent,status,teams}, lib/ai-gateway,
  components/overlays/ai-gateway-consent-overlay.tsx: AI Gateway managed-keys
  consent flow that minted Vercel API keys via Vercel OAuth. Gated on
  AI_GATEWAY_MANAGED_KEYS_ENABLED, never enabled in any deploy config.

Cleaned:
- lib/auth.ts: dropped Vercel genericOAuth provider (gated on VERCEL_CLIENT_ID,
  never set) and the VERCEL_URL baseURL fallback.
- lib/auth-providers.ts, components/auth/dialog.tsx,
  components/ui/integration-icon.tsx: dropped "vercel" from Provider unions,
  Continue with Vercel button, VercelIcon SVGs.
- app/api/user/{route,password,forgot-password}.ts: dropped "vercel" from
  OAUTH_PROVIDERS arrays.
- lib/api-client.ts: dropped VercelTeam type, isVercelUser status field, and
  aiGatewayApi client.
- lib/workflow/executor/execution-fallback.ts and its test: dropped VERCEL_URL
  base-URL fallback (only NEXT_PUBLIC_APP_URL is used in K8s).
- next.config.ts: dropped Sentry automaticVercelMonitors (Vercel-cron-only,
  no-op for our deployment).
- app/layout.tsx: dropped GitHubStarsLoader/Provider Suspense wrapper.
- package.json: dropped @vercel/sdk dependency (no consumers after deleting
  lib/integrations/vercel.ts upstream).

Plugin and minor fixes:
- plugins/ai-gateway/index.ts and test.ts: stripped Vercel branding from the
  AI Gateway plugin (kept the plugin itself - it provides Generate Text/Image
  workflow actions and uses a generic AI_GATEWAY_API_KEY, not OAuth).
- components/overlays/{add-connection,edit-connection,workflow-issues}-overlay,
  components/ui/integration-selector, components/workflow/config/action-config,
  components/settings/integrations-manager: removed managed-keys consent
  branches, isManaged-routing for AI Gateway, vercel icon mapping.
- components/overlays/configuration-overlay.tsx and node-config-panel.tsx:
  schedule-trigger filename hint vercel.json -> schedule.json.
- Comment cleanups in app/api/agentic-wallet/provision/route.ts,
  app/api/workflow/[workflowId]/execute/route.ts, lib/mcp/logging.ts,
  lib/utils/id.ts, lib/metrics/instrumentation/saturation.ts,
  lib/workflow/executor/executor.workflow.ts, sentry.edge.config.ts,
  tests/integration/agentic-wallet-sweeper.test.ts.
- Doc/spec updates: AGENTS.md, README.md, docs/users-teams-orgs/users.md,
  deploy/local/values-keeperhub.template.yaml,
  specs/logging-and-metrics/logging-metrics-system.md,
  specs/organization-implementation-strategy.md.

Verification: type-check passes, all 3322 unit tests pass.
@github-actions
Copy link
Copy Markdown

PR Environment Deployed

Your PR environment has been deployed!

Environment Details:

Components:

  • Keeperhub Application
  • PostgreSQL Database (isolated instance)
  • LocalStack (SQS emulation)
  • Redis (isolated instance)
  • Schedule Dispatcher (staging image)
  • Block Dispatcher (staging image)
  • Event Tracker (staging image)

The environment will be automatically cleaned up when this PR is closed or merged.

joelorzet
joelorzet previously approved these changes Apr 29, 2026
Copy link
Copy Markdown

@joelorzet joelorzet left a comment

Choose a reason for hiding this comment

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

Hi @suisuss,

Verified the surviving Vercel deps (@vercel/og, @vercel/queue, @vercel/oidc) are still load-bearing, and there are no dangling references to AI_GATEWAY_MANAGED_KEYS_ENABLED, VERCEL_CLIENT_ID, isVercelUser, or VERCEL_ENV on the branch.

Nit: dead code in components/auth/dialog.tsx

const getProviderIcon = (provider: Provider, compact = false) => {
  const _iconClass = compact ? "size-3.5" : undefined;
  switch (provider) {
    case "github":
      return <GitHubIcon />;   // doesn't accept className
    case "google":
      return <GoogleIcon />;   // doesn't accept className

_iconClass is the only consumer of compact. With the Vercel branch gone, neither remaining icon takes a className, so both the local and the compact parameter are dead. The underscore prefix looks like the lint rule was silenced rather than the code removed. Drop the parameter from the signature too if no callers pass it.

…l-fork-relics

# Conflicts:
#	app/layout.tsx
#	lib/workflow/executor/executor.workflow.ts
@suisuss suisuss merged commit 9bf54b8 into staging May 3, 2026
28 of 31 checks passed
@suisuss suisuss deleted the chore/remove-vercel-fork-relics branch May 3, 2026 03:00
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

PR Environment Deployment Failed

The PR environment deployment encountered an error.

Please check the workflow logs for details.

Common issues:

  • Database initialization timeout
  • Image build failures
  • Resource constraints

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-1049
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants