Skip to content

Hide last link when needed, add first link#532

Merged
jakub-id merged 5 commits intomainfrom
hide-last-link
Apr 17, 2026
Merged

Hide last link when needed, add first link#532
jakub-id merged 5 commits intomainfrom
hide-last-link

Conversation

@jakub-id
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings April 17, 2026 10:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts broker API pagination metadata so the last link is omitted when the current page is already the last page, reducing redundant navigation links in list responses.

Changes:

  • Update CollectAboutData to only populate LastLink when offset < lastOffset.
  • Add unit test coverage validating PrevLink/NextLink/LastLink behavior across pages.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
broker/api/common.go Prevents emitting LastLink when already on the last page (offset == lastOffset).
broker/api/common_test.go Adds pagination link tests to verify the updated LastLink behavior and related links.

Comment thread broker/api/common_test.go
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread broker/api/common.go Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@jakub-id jakub-id changed the title Hide last link Hide last link when needed, add first link Apr 17, 2026
@jakub-id jakub-id requested a review from Copilot April 17, 2026 13:47
@jakub-id jakub-id merged commit 1143e9e into main Apr 17, 2026
8 checks passed
@jakub-id jakub-id deleted the hide-last-link branch April 17, 2026 13:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants