Skip to content

feat(review): render single-line ```suggestion block on inline comments (#2139) - #4045

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:feat/inline-suggestion-2139
Jul 8, 2026
Merged

feat(review): render single-line ```suggestion block on inline comments (#2139)#4045
JSONbored merged 1 commit into
JSONbored:mainfrom
jimcody1995:feat/inline-suggestion-2139

Conversation

@jimcody1995

@jimcody1995 jimcody1995 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #2139. The formatInlineBodyanchoredSuggestionBlocksafeSuggestionBlock pipeline already renders GitHub-native ```suggestion fences when review.suggestions is enabled (landed via #1956 / #3577, with added-line anchor safety via #2140). This PR completes the remaining #2139 acceptance criteria:

  • Adds explicit tests that multi-line suggestion text is preserved verbatim inside the fence (single-line anchor only; multi-line ranges remain out of scope per the issue).
  • Adds an empty-string guard regression on safeSuggestionBlock.
  • Cross-references feat(review): render single-line ```suggestion block on inline comments #2139 in formatInlineBody docs and the inline-comment test suite.

Deliverables checklist (#2139)

  • formatInlineBody appends a fenced ```suggestion block when finding.suggestion is set and suggestions are enabled
  • Public-safe by construction (suggestion filtered upstream by composeInlineFindings)
  • No block when suggestion is absent (byte-identical to pre-suggestion behavior)
  • Tests: with/without suggestion, fence formatting, multi-line text verbatim, severity label leads the body

Test plan

  • npx vitest run test/unit/inline-comments.test.ts test/unit/inline-suggestion-anchor.test.ts
  • npx tsc --noEmit
  • 100% line/branch coverage on inline-comments.ts + inline-suggestion-anchor.ts (patch-local)

@jimcody1995
jimcody1995 requested a review from JSONbored as a code owner July 7, 2026 13:09
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 7, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@jimcody1995
jimcody1995 marked this pull request as draft July 7, 2026 13:11
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@0796aa7). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4045   +/-   ##
=======================================
  Coverage        ?   93.78%           
=======================================
  Files           ?      394           
  Lines           ?    36628           
  Branches        ?    13403           
=======================================
  Hits            ?    34351           
  Misses          ?     1622           
  Partials        ?      655           
Files with missing lines Coverage Δ
src/review/inline-comments.ts 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. label Jul 7, 2026
@loopover-orb

loopover-orb Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Tip

🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩

✅ Gittensory review result - approve/merge recommended

Review updated: 2026-07-07 14:15:28 UTC

3 files · 1 AI reviewer · no blockers · readiness 100/100 · CI green · unstable

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This PR is a doc-comment cross-reference update (src/review/inline-comments.ts:73, `#1956` → `#1956 / #2139`) plus new tests exercising the already-shipped anchoredSuggestionBlock/safeSuggestionBlock pipeline from #1956/#2140 — there is no production logic change in the visible diff. The new inline-comments.test.ts case correctly verifies multi-line suggestion text is preserved verbatim inside the fence with the severity label still leading the body, matching the existing `formatInlineBody` implementation shown in the full file content. This closes the remaining #2139 test-coverage acceptance criteria without altering behavior, consistent with the PR's own scoping note that multi-line *ranges* remain out of scope.

Nits — 5 non-blocking
  • test/unit/inline-suggestion-anchor.test.ts adds `safeSuggestionBlock("")` and multi-line assertions, but inline-suggestion-anchor.ts itself isn't in the provided file content, so I can't confirm from this diff that the empty-string guard is a real branch rather than an incidentally-passing case — worth a pointer to the guard line in that file.
  • src/review/inline-comments.ts:73's doc comment now stacks two bare issue numbers (`One-click suggested-change blocks on inline review comments #1956 / feat(review): render single-line ```suggestion block on inline comments #2139`) with no named constant, per the external brief's magic-number flag — purely cosmetic.
  • The external brief marks feat(review): render single-line ```suggestion block on inline comments #2139 coverage as 'partial' — a one-line confirmation that no other acceptance criteria remain (beyond the explicitly out-of-scope multi-line ranges) would close the loop.
  • Paste or link the current safeSuggestionBlock/anchoredSuggestionBlock implementation in src/review/inline-suggestion-anchor.ts so the empty-string guard and multi-line verbatim behavior can be traced to source rather than inferred from the new tests alone.
  • Since this PR is test/doc-only, consider noting explicitly in the description that no runtime behavior changed, to speed reviewer triage.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #2139
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 153 registered-repo PR(s), 98 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor jimcody1995; Gittensor profile; 153 PR(s), 0 issue(s).
Gate result ✅ Passing No configured blocker found.
Review context
  • Author: jimcody1995
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript
  • Official Gittensor activity: 153 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@jimcody1995
jimcody1995 marked this pull request as ready for review July 7, 2026 13:25
@jimcody1995 jimcody1995 closed this Jul 7, 2026
@jimcody1995 jimcody1995 reopened this Jul 8, 2026
…erage

The formatInlineBody → anchoredSuggestionBlock pipeline already renders
GitHub-native ```suggestion fences when enabled; add the remaining JSONbored#2139
deliverable tests for multi-line suggestion text preserved verbatim and
document the issue cross-reference.

Co-authored-by: Cursor <cursoragent@cursor.com>
@JSONbored
JSONbored merged commit 95db361 into JSONbored:main Jul 8, 2026
7 of 8 checks passed
@loopover-orb loopover-orb Bot added gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. and removed gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. labels Jul 8, 2026
@JSONbored JSONbored added gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier. and removed gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. labels Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:feature Gittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.

Development

Successfully merging this pull request may close these issues.

feat(review): render single-line ```suggestion block on inline comments

2 participants