You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: let API clients ask for more reply previews - #1528
On the web, everyone picks how many replies show under each commit (1, 3, 5, 10, 15, 20 or 25, with 3 by default), but every api/* request is fixed at one, so the /dev/null TUI and other device clients can't show what their users see on the web without paging every thread on its own. Signed lists now take ?replies_per_page= with the same values. Every list that returns reply_preview builds it through CommitBuilder::withReplyPreviews(), so the change lives in RepliesPerPage::of() and covers logs, profiles, organizations, mentions, starred commits and search at once.
A missing or unknown value falls back to one preview, the same way the web falls back to 3 for an unknown cookie, so current clients get exactly what they got before. The value is a query parameter rather than an account setting, so nothing new is stored, and clients keep the choice on their side.
Summary by CodeRabbit
New Features
Signed API requests can set replies_per_page to choose the number of reply previews, with supported counts documented as 3, 5, 10, 15, 20, or 25.
Each commit in signed lists now includes its newest reply or quote.
API requests with a missing or unsupported reply count return one preview.
Documentation
Updated the Signed API documentation to describe reply previews and the available replies_per_page values.
No actionable comments were generated in the recent review.
Walkthrough
The Signed API now reads replies_per_page from the query string to select reply previews. Unsupported or malformed values default to one preview. Documentation lists the supported values.
Changes: Signed API Reply Preview Counts
Layer / File(s)
Summary
Query parameter selection and validation app/Enums/RepliesPerPage.php, tests/Feature/Controllers/Api/LogControllerTest.php, KNOWLEDGE_BASE.md
API requests match replies_per_page against enum values and default to one when no value matches. Tests cover three newest replies with a next-page cursor, and unsupported or malformed values. Documentation lists the supported values and describes reply previews in signed lists.
No actionable issue remains from this review; the change is mergeable after normal checks.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly summarizes the main change: API clients can request more reply previews.
Docstring Coverage
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
Finishing Touches
Generate unit tests (beta)
Create a new PR
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.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the web, everyone picks how many replies show under each commit (1, 3, 5, 10, 15, 20 or 25, with 3 by default), but every
api/*request is fixed at one, so the /dev/null TUI and other device clients can't show what their users see on the web without paging every thread on its own. Signed lists now take?replies_per_page=with the same values. Every list that returnsreply_previewbuilds it throughCommitBuilder::withReplyPreviews(), so the change lives inRepliesPerPage::of()and covers logs, profiles, organizations, mentions, starred commits and search at once.A missing or unknown value falls back to one preview, the same way the web falls back to 3 for an unknown cookie, so current clients get exactly what they got before. The value is a query parameter rather than an account setting, so nothing new is stored, and clients keep the choice on their side.
Summary by CodeRabbit
New Features
replies_per_pageto choose the number of reply previews, with supported counts documented as 3, 5, 10, 15, 20, or 25.Documentation
replies_per_pagevalues.