Skip to content

feat: let API clients ask for more reply previews - #1528

Merged
nunomaduro merged 2 commits into
dev-null-sh:productionfrom
WendellAdriel:feat/api-replies-per-page
Nov 11, 2026
Merged

nunomaduro merged 2 commits into
dev-null-sh:productionfrom
WendellAdriel:feat/api-replies-per-page

Conversation

@WendellAdriel

@WendellAdriel WendellAdriel commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related PRs

Suggested reviewers: xheaven

Merge Risk: Minimal · up to 22634

No actionable issue remains from this review; the change is mergeable after normal checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: API clients can request more reply previews.
Docstring Coverage Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2ae99731-bc16-433a-ab3f-210f4b72c22f
Commits

Reviewing files that changed from the base of the PR and between 7973e75 and 22634c1.

Files selected for processing: 3

  • KNOWLEDGE_BASE.md
  • app/Enums/RepliesPerPage.php
  • tests/Feature/Controllers/Api/LogControllerTest.php

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@nunomaduro
nunomaduro merged commit 682399f into dev-null-sh:production Nov 11, 2026
1 check 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.

3 participants