Skip to content

refactor(fetcher): rename fortune / quote_of_day to random_* family - #158

Merged
unhappychoice merged 1 commit into
mainfrom
refactor/random-prefix-fetchers
Apr 26, 2026
Merged

unhappychoice merged 1 commit into
mainfrom
refactor/random-prefix-fetchers

Conversation

@unhappychoice

Copy link
Copy Markdown
Owner

Summary

Group bundled-rotating-text fetchers under a random_* family prefix. Names the actual mechanic — deterministic random pick from a bundled set, refreshed daily — rather than the source brand or rotation cadence, and unifies with random_cat / random_word / random_haiku / random_zen candidates already on #67.

  • fortune → random_fortune
  • quote_of_day → random_quote (drops the redundant _of_day suffix; the prefix carries the daily-rotation semantics)

Why not daily_*? The cadence is an implementation detail — selection could become per-open or per-hour later, and the name shouldn't lock that in.

Why not bare names? A bare fortune and quote_of_day made future siblings read as a mixed bag in the catalog.

Migration

⚠ BREAKING for user configs that already referenced these fetchers:

-fetcher = "quote_of_day"
+fetcher = "random_quote"

-fetcher = "fortune"
+fetcher = "random_fortune"

No registry-level alias shipped — the old names render the standard unknown fetcher placeholder, which surfaces the rename clearly. Templates (home_daily / home_minimal) updated in this PR.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test (805 passed, 0 failed)
  • No leftover quote_of_day / fortune references in src/ outside cookie content text

🤖 Generated with Claude Code

A bare `fortune` and `quote_of_day` left the catalog without a family
prefix and made future siblings (`random_word`, `random_haiku`,
`random_zen`, image-side `random_cat` already on #67) read as a
mixed bag. Group them under a `random_*` family that names the actual
mechanic — deterministic random pick from a bundled set, refreshed
daily — rather than the cadence (`daily_*`) or the source brand.

- `fortune` → `random_fortune`
- `quote_of_day` → `random_quote` (drops the redundant `_of_day`
  suffix now that the prefix carries the rotation semantics)

Templates `home_daily` / `home_minimal` updated. No alias for the
old names — user configs that referenced `fetcher = "quote_of_day"`
will need to be updated.

BREAKING CHANGE: `fetcher = "quote_of_day"` and `fetcher = "fortune"`
in user configs must be renamed to `random_quote` and `random_fortune`
respectively.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Apr 26, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@unhappychoice has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 33 minutes and 49 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 33 minutes and 49 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3561b296-eea6-48be-a60a-08231c96dce9

📥 Commits

Reviewing files that changed from the base of the PR and between 6210589 and 30d93fa.

📒 Files selected for processing (7)
  • src/fetcher/mod.rs
  • src/fetcher/random_fortune/data.txt
  • src/fetcher/random_fortune/mod.rs
  • src/fetcher/random_quote/data.txt
  • src/fetcher/random_quote/mod.rs
  • src/templates/home_daily.toml
  • src/templates/home_minimal.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/random-prefix-fetchers

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Apr 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.37%. Comparing base (6210589) to head (30d93fa).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #158   +/-   ##
=======================================
  Coverage   78.37%   78.37%           
=======================================
  Files         116      116           
  Lines       21897    21897           
=======================================
  Hits        17161    17161           
  Misses       4736     4736           
Files with missing lines Coverage Δ
src/fetcher/mod.rs 84.15% <100.00%> (ø)
src/fetcher/random_fortune/mod.rs 87.20% <100.00%> (ø)
src/fetcher/random_quote/mod.rs 95.67% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@unhappychoice
unhappychoice merged commit 1e57def into main Apr 26, 2026
7 checks passed
@unhappychoice
unhappychoice deleted the refactor/random-prefix-fetchers branch April 26, 2026 09:56
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.

1 participant