Skip to content

[AISAGE-707] fix(admin): disable manual provider sync in production - #8109

Merged
chrarnoldus merged 1 commit into
mainfrom
chrarnoldus/disable-manual-provider-sync-prod
Oct 19, 2026
Merged

chrarnoldus merged 1 commit into
mainfrom
chrarnoldus/disable-manual-provider-sync-prod

Conversation

@chrarnoldus

Copy link
Copy Markdown
Contributor

Summary

  • Disables the Run Sync button in the admin Gateway → Sync Provider and Model data → Manual Sync card when VERCEL_ENV === 'production', with a short explanation that the cron keeps the data up to date.
  • Adds admin.syncProviders.getManualSyncEnabled so the client learns the server-side environment, and makes admin.syncProviders.triggerSync reject with FORBIDDEN in production so the disabled state cannot be bypassed.
  • Preview, staging, and local development keep the manual sync available.

Verification

  • pnpm test src/routers/admin-router.test.ts -t syncProviders (apps/web): 3 passed
  • tsgo --noEmit for apps/web: passed
  • oxlint and oxfmt on changed files: clean

@chrarnoldus chrarnoldus self-assigned this Oct 19, 2026
@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • apps/web/src/app/admin/sync-providers/SyncProvidersContent.tsx
  • apps/web/src/routers/admin-router.ts
  • apps/web/src/routers/admin-router.test.ts

Reviewed by deepseek-v4.1-flash-1017 · Input: 60K · Output: 14.7K · Cached: 964K

Review guidance: REVIEW.md from base branch main

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