Skip to content

Feature: Per feed refresh frequency - #245

Open
baduhai wants to merge 15 commits into
0x2E:mainfrom
baduhai:feature/per-feed-refresh-frequency
Open

Feature: Per feed refresh frequency#245
baduhai wants to merge 15 commits into
0x2E:mainfrom
baduhai:feature/per-feed-refresh-frequency

Conversation

@baduhai

@baduhai baduhai commented Apr 20, 2026

Copy link
Copy Markdown

Reason for feature

Some feeds I'm subscribed to are either throttling or outright blocking me because of the high refresh frequency. I have raised the refresh frequency, but I'd still like some of my feeds to refresh more often, thus a per feed refresh frequency setting.

Summary

Adds the ability to override the global refresh interval (FUSION_PULL_INTERVAL) on a per-feed basis via a dropdown in the edit/add feed dialogues.

Screenshots
Edit feed
image
Add feed
image
Refresh frequency dropdown
image
Currently, these are the refresh frequency options, but I'm open to adding more options or even leaving it up to the user. I just figured having pre-set options would be more convenient.

Changes

  • Database: refresh_interval INTEGER DEFAULT NULL on feeds (NULL = global default)
  • Backend: effective interval resolution per feed, dynamic ticker adapts to shortest interval in use
  • API: refresh_interval field on feed create/update, validation against allowed values (15m–24h), GET /api/app exposes global pull interval
  • Frontend: "Refresh Frequency" dropdown in Advanced Settings (both add & edit dialogues)

Testing

  • All existing backend tests pass (go test ./backend/...)
  • Frontend TypeScript compiles clean
  • Manual testing: created/edited feeds with refresh overrides, verified API responses, confirmed dynamic ticker adjustment in logs

AI-written, human-supervised.

@baduhai

baduhai commented Apr 20, 2026

Copy link
Copy Markdown
Author

Added translations to languages I speak.

Comment thread backend/internal/store/feed.go Outdated
Comment on lines +238 to +245
if params.RefreshInterval != nil {
if *params.RefreshInterval == -1 {
setClauses = append(setClauses, "refresh_interval = NULL")
} else {
setClauses = append(setClauses, "refresh_interval = :refresh_interval")
args = append(args, sql.Named("refresh_interval", *params.RefreshInterval))
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing an interval should also reschedule the feed. This code updates refresh_interval but leaves next_check_at unchanged. For example, changing a feed from 24 hours to 15 minutes can leave it skipped for the remainder of the old schedule.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, addressed on the latest commit.

Comment thread frontend/src/lib/i18n/messages/de.ts Outdated
Comment on lines +102 to +110
"feed.add.refreshFrequencyLabel": "Aktualisierungsfrequenz",
"feed.add.refreshFrequencyDefault": "Standard ({interval})",
"feed.add.refreshFrequency.900": "Alle 15 minutes",
"feed.add.refreshFrequency.1800": "Alle 30 minutes",
"feed.add.refreshFrequency.3600": "Alle 1 hour",
"feed.add.refreshFrequency.7200": "Alle 2 hours",
"feed.add.refreshFrequency.21600": "Alle 6 hours",
"feed.add.refreshFrequency.43200": "Alle 12 hours",
"feed.add.refreshFrequency.86400": "Alle 24 hours",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds really nitpicky but my agent keeps complaining that the German translation is using English time units. Is it normal for German translations to do that?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No not normal, I just didn't look at my German translations after I wrote them 🫣.

@pompydev

Copy link
Copy Markdown
Contributor

This PR will fail on CI because it's missing translations for zh, fr, es, ru, and sv. See https://github.com/0x2E/fusion/blob/1f99b1fc654baa0108e4df4577429d62d0e53cb8/.github/workflows/frontend.yml and run pnpm run check:i18n in frontend/ directory to replicate the issue.

@pompydev

pompydev commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Another pet peeve, time stored as number often mean UNIX timestamp or millisecond interval so I recommend adding Sec suffix for clarity.

- rename refresh_interval to refresh_interval_seconds across backend,
  frontend API types, and the feeds table migration for clarity
- reschedule feed when its refresh interval changes by resetting
  next_check_at so the new schedule takes effect immediately
- fix German refresh frequency labels to use native time units
- add missing zh/fr/es/ru/sv translations
@baduhai

baduhai commented Sep 2, 2026

Copy link
Copy Markdown
Author

This PR will fail on CI because it's missing translations for zh, fr, es, ru, and sv. See https://github.com/0x2E/fusion/blob/1f99b1fc654baa0108e4df4577429d62d0e53cb8/.github/workflows/frontend.yml and run pnpm run check:i18n in frontend/ directory to replicate the issue.

I don't speak these languages, so I just had AI do the translations.

Another pet peeve, time stored as number often mean UNIX timestamp or millisecond interval so I recommend adding Sec suffix for clarity.

fixed.

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