Skip to content

fix(peers): fetch pagination data via fetch to persist list in history state - #362

Merged
trtajim merged 1 commit into
mainfrom
fix/peers-load-more-history-state
Sep 22, 2026
Merged

trtajim merged 1 commit into
mainfrom
fix/peers-load-more-history-state

Conversation

@trtajim

@trtajim trtajim commented Sep 22, 2026

Copy link
Copy Markdown
Member

Summary of Changes

  • Updated loadMore in Peers/Index.vue to use fetch with Inertia headers rather than an Inertia router visit.
  • This prevents Inertia from replacing props.peers on the page component, allowing useRemember to retain and restore the entire loaded peer list and scroll position across browser back/forward navigation.
  • Preserves filter/search reactivity so searching or sorting still cleanly updates the peer list.

Testing

  • Tested loading more items, navigating to a profile, and returning via the back button.

Summary by CodeRabbit

  • Bug Fixes
    • Improved loading additional peers so newly fetched results are appended reliably.
    • Prevented duplicate peers from appearing in the list.
    • Ensured the list and pagination controls stay synchronized when peer data updates.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: hscstack/platform/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 91c6eea6-448e-4a38-8020-f422b300942d

📥 Commits

Reviewing files that changed from the base of the PR and between f365531 and afd6c88.

📒 Files selected for processing (1)
  • resources/js/pages/Peers/Index.vue
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@trtajim
trtajim merged commit c706ab4 into main Sep 22, 2026
5 of 6 checks passed
@trtajim
trtajim deleted the fix/peers-load-more-history-state branch September 22, 2026 16:45
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