Skip to content

fix(account): Load more keeps a stale history stale; no "0y ago" - #168

Merged
vilenarios merged 1 commit into
developfrom
fix/history-freshness-loadmore
Oct 21, 2026
Merged

vilenarios merged 1 commit into
developfrom
fix/history-freshness-loadmore

Conversation

@vilenarios

Copy link
Copy Markdown
Contributor

Two findings CodeRabbit raised on the release PR (#167), fixed before 4.11.3 ships.

  • Load more cleared the freshness state. Load history, top up elsewhere, come back (nudge shows), click Load more: the nudge went away and it read "Loaded just now", though page one still predated the top-up. Each page now carries fetchedAt and the age reads page one's; Load more restores the invalidation if it was set before or during the fetch (watched via the query cache's invalidate events).
  • relativeTime said "0y ago" for 360–364 days (twelve 30-day months, not yet a year). Now caps at "11mo ago". Pre-existing; shows in the history line and ArNS target descriptions.

Checks

  • lint, npm test (87 files, 1464 tests; new relativeTime case).
  • Browser: history suite 15/15 including the new case (clock advanced 6 minutes, refresh-balance, Load more → 3 rows, nudge and "6m ago" kept); Account 30/30.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LxLDipDTwGmYw9bgV4cjoJ

- A successful Load more cleared the stale mark and stamped the history
  "just now", though page one still predated the top-up. Each page now
  carries its fetch time and the age reads page one's; Load more restores
  the invalidation if it was set before or during the fetch (CodeRabbit).
- relativeTime returned "0y ago" for 360-364 days (twelve 30-day months,
  not yet a year); it now caps at 11mo (CodeRabbit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LxLDipDTwGmYw9bgV4cjoJ
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: ar-io/ar-io-console/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a99b7b17-3610-447f-b719-cb2f62c08e21
📥 Commits

Reviewing files that changed from the base of the PR and between c63d934 and b41a5f1.

📒 Files selected for processing: 3
  • src/features/arns/purchase/buyTarget.test.ts
  • src/hooks/usePaymentHistory.ts
  • src/utils/relativeTime.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@vilenarios
vilenarios merged commit 56c359c into develop Oct 21, 2026
2 checks passed
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