Skip to content

Comments

Fix refresh scheduler parity after controller extraction#164

Closed
koala73 wants to merge 1 commit intomainfrom
codex/refactor-app.ts-into-composition-root
Closed

Fix refresh scheduler parity after controller extraction#164
koala73 wants to merge 1 commit intomainfrom
codex/refactor-app.ts-into-composition-root

Conversation

@koala73
Copy link
Owner

@koala73 koala73 commented Feb 20, 2026

Motivation

  • The prior refactor moved refresh orchestration into RefreshScheduler but accidentally detached deduplication from the app-wide in-flight guard, risking overlapping fetches.
  • Cyber-threat refresh gating was also changed unintentionally and needed to match the original feature-flag behavior.
  • Move lifecycle and updater responsibilities into controllers while preserving previous runtime semantics and teardown behavior.

Description

  • Updated RefreshScheduler to accept isInFlight, markInFlight, and clearInFlight callbacks and to use them for refresh deduplication instead of an internal set.
  • Added a shouldRefreshCyberThreats dependency to RefreshScheduler and used it in the cyber refresh scheduling condition to preserve feature-flag gating.
  • Wired the new scheduler dependencies from App when instantiating RefreshScheduler, and restored the scheduler teardown via refreshScheduler.teardown().
  • Kept the controller extraction (added DeepLinkHandler, DesktopUpdater, and RefreshScheduler in src/controllers/) and wired DeepLinkHandler.handle() and DesktopUpdater.setup()/teardown() from App.

Testing

  • Ran npm run typecheck (which runs tsc --noEmit) and it completed successfully.

Codex Task

@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Ready Ready Preview, Comment Feb 20, 2026 4:05am
worldmonitor-finance Ready Ready Preview, Comment Feb 20, 2026 4:05am
worldmonitor-startup Ready Ready Preview, Comment Feb 20, 2026 4:05am

Request Review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant