fix: increase realtime createdAt filter max from 24h to 7d #3027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Increases the
REALTIME_MAXIMUM_CREATED_AT_FILTER_AGE_IN_MSdefault from 24 hours to 7 days.Problem
When using
useRealtimeRunsWithTagwithcreatedAt: '1w', runs older than 24 hours are silently excluded because the server caps the filter toREALTIME_MAXIMUM_CREATED_AT_FILTER_AGE_IN_MS(default 24h), regardless of what the client requests.This causes confusion when monitoring long-running jobs that have been in progress for more than a day - they simply don't appear in the realtime hook despite being visible in
runs.listand the dashboard.Solution
Increase the default cap from 24 hours to 7 days to match common user expectations. Users requesting
createdAt: '1w'will now see runs from the past week as expected.The environment variable remains configurable for deployments that need stricter limits.
Changes
apps/webapp/app/env.server.ts: Change default from24 * 60 * 60 * 1000to7 * 24 * 60 * 60 * 1000Fixes #3018