feat(prs): show the diff breakdown on the publish approval card #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/pr-approval-breakdown"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The "Publish branch …?" approval card now shows the diff breakdown (
N files +A −Dand the category table) before you approve. The numbers are the same ones the PR pill shows afterwards.How
step.ask/ViewQuestioncarry onlymessage,schema,secret,url(andexpiresAt). I checked the vendoredwaits.mdandcustom-ui.mdand the installed types, so the breakdown rides in the message:<!--breakdown:{json}-->. It's an HTML comment, so it reads as nothing if anything shows the message raw.withBreakdownandsplitPublishMessageinlib/prs.tsadd and strip it; the match is anchored to the end of the message and validated withisDiffBreakdown.diff-breakdownstep inrunCreatePr.components/diff-breakdown-table.tsx, used by both the approval card and the PR pill popover, so they can't drift.<pre>shows only the human text.waitTextstrips the block for the inbox. Nothing else renders question messages.docs/architecture/git.mdis updated (format, single step, and why).Verification
pnpm typecheckandpnpm testpass (1340 passed). New tests cover:waitTextstrips the block.PrPartwith a question built by the realwithBreakdownfrom #50's actual stats.<!--orbreakdown:text appeared anywhere on the page.Not verified
step.askround trip. The card assumes the message comes back from the view unchanged, as the existingstartsWith/includesmatching already does.Screenshots
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.