Conversation
- Add defaultFeedFetchIntervalMinutes field to GlobalSetting entity - Expose setting via GlobalSettingService with fallback to HuntlyProperties - Update ConnectorFetchService to use DB-stored default interval - Update FeedsService to propagate per-feed and default interval separately - Add defaultFetchIntervalMinutes to FeedsSetting interface model - Add Global Settings section to FeedsTabContent with auto-save on blur - Allow per-feed fetch interval to be left blank to inherit system default - Add i18n keys for new UI strings in en and zh-CN locales
…-fetch-interval feat(feeds): add configurable default feed fetch interval setting
🤖 Augment PR SummarySummary: This PR makes RSS feed refresh cadence configurable by introducing a system-wide default fetch interval and allowing per-feed overrides to be optional. Changes:
Technical Notes: Backend defaults fall back to 🤖 Was this summary useful? React with 👍 or 👎 |
| folderId: yup.number().nullable(), | ||
| subscribeUrl: yup.string().required(t('settings:rssLinkRequired')), | ||
| fetchIntervalMinutes: yup.number().min(1, t('settings:fetchIntervalMin')).required(t('settings:fetchIntervalRequired')) | ||
| fetchIntervalMinutes: yup.number() |
There was a problem hiding this comment.
app/client/src/components/SettingModal/FeedsFormDialog.tsx:62: fetchIntervalMinutes validation currently allows non-integer values (e.g., 1.5), which may be truncated or rejected when deserializing into a Java Integer on the backend. Consider ensuring minutes are validated as whole numbers consistently for both per-feed and global default intervals.
Other locations where this applies: app/client/src/components/SettingModal/FeedsSetting.tsx:121
Severity: medium
Other Locations
app/client/src/components/SettingModal/FeedsSetting.tsx:121
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| connector.setSubscribeUrl(feedsSetting.getSubscribeUrl()); | ||
| connector.setFolderId(feedsSetting.getFolderId() == null || feedsSetting.getFolderId().equals(0) ? null : feedsSetting.getFolderId()); | ||
| connector.setFetchIntervalSeconds(feedsSetting.getFetchIntervalMinutes() * 60); | ||
| connector.setFetchIntervalSeconds(feedsSetting.getFetchIntervalMinutes() == null ? null : feedsSetting.getFetchIntervalMinutes() * 60); |
There was a problem hiding this comment.
app/server/huntly-server/src/main/java/com/huntly/server/service/FeedsService.java:116: fetchIntervalMinutes is converted to seconds without guarding against <= 0 (or very large) values, which could cause tight fetch loops or integer overflow in fetchIntervalSeconds. Even if the UI validates, API clients can still submit invalid values, so server-side validation would help protect background fetch scheduling.
Severity: high
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
This pull request introduces a new global setting for the default feed fetch interval, allowing administrators and users to configure how often feeds are updated system-wide and per-feed. It updates both the backend and frontend to support this feature, including API models, database entities, settings UI, and validation/localization. The changes also improve the user experience by providing contextual hints and validation for fetch intervals.
Backend: Global and Feed Fetch Interval Support
defaultFeedFetchIntervalMinutesto theGlobalSettingentity, API model, and service, including database persistence and default value logic. [1] [2] [3] [4] [5] [6]FeedsSettingand related services to support an optional per-feed fetch interval, and to expose the system default to the frontend. [1] [2] [3] [4] [5]Frontend: Settings UI and Validation
Localization
UI Enhancements
These changes collectively make feed fetching intervals more flexible and user-friendly, while ensuring sensible defaults and clear communication throughout the UI.