Skip to content

fix(cms): use CORE_SYNC_ENABLED for env detection and persist sync stats#632

Merged
tataihono merged 2 commits intomainfrom
fix/core-sync-env-detection
Apr 2, 2026
Merged

fix(cms): use CORE_SYNC_ENABLED for env detection and persist sync stats#632
tataihono merged 2 commits intomainfrom
fix/core-sync-env-detection

Conversation

@tataihono
Copy link
Copy Markdown
Contributor

Summary

  • Fix production detection: NODE_ENV isn't set to "production" on Railway, causing the admin UI to show "Development mode" on prod. Switched to CORE_SYNC_ENABLED which is the explicit production flag already used by the cron system.
  • Persist sync row counts (created/updated/deleted/errors) in core_sync_states table so they survive server restarts and show in the admin UI after restart.
  • Auto-migrates existing core_sync_states tables to add the new stats columns.
  • Remove non-functional close button (X) from dev-mode alerts and add padding.

Test plan

  • Verify prod CMS no longer shows "Development mode" on the System Status page
  • Verify trigger buttons appear on prod
  • Verify after a sync completes, row counts persist in the watermarks table after restart
  • Verify dev environment still shows "Development mode" alerts without close button

🤖 Generated with Claude Code

tataihono and others added 2 commits April 2, 2026 00:52
…t UI

NODE_ENV is not reliably set to "production" on Railway. Switch to
CORE_SYNC_ENABLED which is the explicit production flag already used
by the cron system. Remove closeLabel from dev-mode alerts to hide
the non-functional X button and add padding underneath.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…, fix alert UI

- Switch production detection from NODE_ENV to CORE_SYNC_ENABLED which
  is the explicit production flag already used by the cron system
- Add created/updated/deleted/errors columns to core_sync_states table
  so row counts persist across server restarts
- Auto-migrate existing tables to add the new stats columns
- Remove closeLabel from dev-mode alerts to hide non-functional X button
  and add padding underneath

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@tataihono tataihono merged commit e6a206e into main Apr 2, 2026
8 checks passed
@tataihono tataihono deleted the fix/core-sync-env-detection branch April 2, 2026 00:55
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

🚀 Expo preview is ready!

  • Project → jesus-film-forge
  • Platforms → android, ios
  • Runtime Version → exposdk:54.0.0
  • More info

Learn more about 𝝠 Expo Github Action

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.

1 participant