Repository navigation
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
When an author replies to their own commit, the web shows the commit with Show thread and reads the thread in order on its page. The queries behind the API already work this out: they select
continuation_idand take that reply out ofreplies_countandreply_preview.CommitResourcenever sent the field, though, so an app sees a reply count that leaves one reply out and has no way to tell which reply continues the thread.The /dev/null app works around it today by loading each commit's replies to find the continuation. That means a self-thread with no other replies shows nothing in a log until it's opened.
Changes
CommitResourcesendscontinuation_idnext toreplies_count, withwhenHas, so it only appears where the query selected it. That covers the signed API's logs, profiles, search, starred commits, replies and a commit's page. It isnullwhen there is no continuation. Unsigned requests (withPublicPreview()) don't select it, so the public read API is unchanged. Deleted commits keep their short shape.KNOWLEDGE_BASE.mdmentions the field in the paragraph on threads.Validation
Local, PHP 8.5.13:
pest tests/Feature/Controllers/Api/LogControllerTest.php tests/Feature/Controllers/Api/CommitControllerTest.php: 133 passed. Two new tests check that a self-threaded commit sends its continuation and the reducedreplies_count, in the latest log and on a signed commit page. The exact-shape tests now includecontinuation_id.pest tests/Feature/Controllers/Api tests/Feature/Controllers/CommitControllerTest.php tests/Feature/Controllers/LogControllerTest.php tests/Unit/Queries: 1764 passed, 2 failed. Both failures ask for pages missing from this clone's Vite manifest (resources/js/pages/device/index.tsx), which I couldn't build without bun. They don't touch this change.phpstanonCommitResource.php: no errors.pint --test: pass.rector --dry-run: the new tests are clean. It still suggests importing names on lines ofCommitControllerTest.phpthat this PR doesn't touch.Independent review
Not done yet.
Limitations
None known. No JS or TS changed.