Skip to content

feat(web): suggest usernames in PR review comments - #52

Merged
kalvenschraut merged 1 commit into
rtvisionfrom
feat/pr-review-mentions
Sep 12, 2026
Merged

kalvenschraut merged 1 commit into
rtvisionfrom
feat/pr-review-mentions

Conversation

@kalvenschraut

Copy link
Copy Markdown
Member

Typing a username in a PR review currently requires knowing the exact login. This adds @username suggestions to review comments, replies, inline drafts, and comment editors on GitHub, Gitea, and GitLab, using PR participants and repository candidates loaded on demand.

Arrow keys select a person, Enter or Tab inserts the mention, and Escape closes the suggestions. Comments keep their existing submission shortcuts. Web and desktop share the implementation; mobile has no equivalent PR review editor.

Validation: 9 focused tests, web typecheck, targeted lint, and formatting checks pass. Fable approved the implementation after fixes for stale suggestions and keyboard scrolling. The maintainer explicitly waived browser testing and PR images.

Implemented with GPT-6 through Codex. Independent review by Claude Fable 5.1 through Claude Code.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 12, 2026
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai review

Please review the current head, 3f2eba650245afc20c8663a2ee96b9a04c19ee69, and submit an APPROVED review if no blocking findings remain. The maintainer has authorized merging only after your approval and completed CI. Focus on mention insertion, keyboard behavior, permissions, and all PR comment editors. Browser testing and PR images were explicitly waived by the maintainer.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== PR metadata and checks ==='
gh pr view 52 --repo RTVision/t3code --json headRefOid,baseRefOid,files,reviewDecision,statusCheckRollup --jq '{
  headRefOid,
  baseRefOid,
  fileCount: (.files | length),
  files: [.files[].path],
  reviewDecision,
  checks: [.statusCheckRollup[] | {name: .name, status: .status, conclusion: .conclusion}]
}'

echo '=== Current HEAD ==='
git rev-parse HEAD
git status --short

echo '=== Changed-file summary ==='
git diff --stat HEAD^ HEAD
git diff --name-status HEAD^ HEAD

echo '=== Full current-head diff ==='
git diff --find-renames --find-copies --unified=80 HEAD^ HEAD

Length of output: 78750


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== Mention component outline ==='
ast-grep outline apps/web/src/components/ui/mention-textarea.tsx --items all
ast-grep outline apps/web/src/components/ui/mentionText.logic.ts --items all
ast-grep outline apps/web/src/components/pullRequest/PullRequestMentionProvider.tsx --items all

echo '=== Textarea and PR editor usage ==='
rg -n -C 4 --glob '*.{ts,tsx}' '(?:<Textarea\b|<PullRequestMarkdownEditor\b|<MentionTextarea\b)' apps/web/src

echo '=== Candidate operation and permission definitions/usages ==='
rg -n -C 6 --glob '*.{ts,tsx}' '(?:reviewerCandidates|listCandidates|requestReviewers|reviewThreads)' . \
  -g '!apps/web/src/components/pullRequest/PullRequestMentionProvider.tsx'

echo '=== Provider contracts ==='
rg -n -C 5 --glob '*.{ts,tsx}' '(?:reviewerCandidates\s*[:(]|listCandidates\s*[:=]|requestReviewers\s*[:=])' \
  packages apps server 2>/dev/null || true

echo '=== Textarea component props ==='
ast-grep outline apps/web/src/components/ui/textarea.tsx --items all
sed -n '1,240p' apps/web/src/components/ui/textarea.tsx

Length of output: 201595


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== All uses of PR editor components ==='
rg -n -C 8 --glob '*.{ts,tsx}' '<(?:MentionTextarea|PullRequestMarkdownEditor|Textarea)\b' \
  apps/web/src/components/pullRequest \
  apps/web/src/components/diffs

echo '=== Parent placement of changed editors ==='
for file in \
  apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx \
  apps/web/src/components/pullRequest/PullRequestReviewAnnotation.tsx \
  apps/web/src/components/pullRequest/PullRequestSummaryTab.tsx \
  apps/web/src/components/diffs/DiffCommentAnnotation.tsx; do
  echo "--- $file ---"
  rg -n -C 12 '(?:<PullRequest(?:SummaryTab|ReviewBar|CodeTab)|<DiffCommentAnnotation|<ReviewThreadCard|<PullRequestMarkdownEditor)' "$file" || true
done

echo '=== Mention candidate actor types ==='
rg -n -A 35 -B 5 --glob '*.ts' '(?:PullRequestActor\s*=|PullRequestActor =|export const PullRequestActor|PullRequestReviewer\s*=|export const PullRequestReviewer)' packages/contracts/src apps/server/src

echo '=== Failed check details ==='
gh api repos/RTVision/t3code/commits/3f2eba650245afc20c8663a2ee96b9a04c19ee69/check-runs \
  --jq '.check_runs[] | select(.name == "Release Smoke") | {name, status, conclusion, details_url, output}'

echo '=== Current check state ==='
gh pr view 52 --repo RTVision/t3code --json statusCheckRollup --jq \
  '[.statusCheckRollup[] | {name: .name, status: .status, conclusion: .conclusion}]'

Length of output: 41543


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '=== Release Smoke annotations ==='
gh api repos/RTVision/t3code/check-runs/103584647229/annotations \
  --jq '.[] | {path, start_line, end_line, annotation_level, message, title}'

echo '=== Release Smoke job steps ==='
gh api repos/RTVision/t3code/actions/jobs/103584647229 \
  --jq '{name, status, conclusion, started_at, completed_at, steps: [.steps[] | {name, status, conclusion, number}]}'

echo '=== Direct parent chain of all PR editor entry points ==='
rg -n -C 6 --glob '*.{ts,tsx}' '<(?:PullRequestTimelineTab|PullRequestReviewBar|PullRequestCodeTab|PullRequestSummaryTab)\b' \
  apps/web/src/components/pullRequest

echo '=== Current head and checks ==='
git rev-parse HEAD
gh pr view 52 --repo RTVision/t3code --json headRefOid,statusCheckRollup --jq \
  '{headRefOid, checks: [.statusCheckRollup[] | select(.name != null) | {name: .name, status: .status, conclusion: .conclusion}]}'

Length of output: 9256


@kalvenschraut I found no blocking code issue in commit 3f2eba650245afc20c8663a2ee96b9a04c19ee69.

I verified mention insertion, keyboard handling, permission gating, and the pull-request editor surfaces. The provider covers the summary, timeline, and code tabs. Enter, Tab, arrow keys, and Escape preserve the existing submission shortcuts.

I cannot approve yet. CI is not complete. Release Smoke failed, and Check, Test, Test Server 1, Test Server 2, and Test Server 3 are still in progress.

You are interacting with an AI system.

@kalvenschraut
kalvenschraut changed the base branch from rtvision to fix/release-smoke-locked-dependencies September 12, 2026 16:35
@kalvenschraut
kalvenschraut force-pushed the feat/pr-review-mentions branch from 3f2eba6 to 8df5486 Compare September 12, 2026 16:35
@github-actions

github-actions Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB −4 B (−0.0%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.0 KiB −7 B (−0.1%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.6 KiB 6.6 KiB +3 B (+0.0%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 57.1 KiB 57.1 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 10 10 0 (0.0%) 21 ✅
Claude Total thread wire 13.6 KiB 13.6 KiB +2 B (+0.0%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +7 B (+0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.5 KiB 6.5 KiB −5 B (−0.1%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.8 KiB 57.8 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: baf25bc · PR result: 8df5486 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

kalvenschraut added a commit that referenced this pull request Sep 12, 2026
Release Smoke started failing on unrelated PRs when fresh resolution selected an `expo-audio` version that does not match the repository's version-specific patch. The smoke test deleted its copied lockfile before installing; the release workflow keeps that lockfile.

Keep the copied lockfile when checking the release version bump, so the smoke test uses the same locked dependency versions as a release. This unblocks CI for #52 and #53 without changing application dependencies.

Validation: the complete release-smoke script passes locally with `CI=true`; targeted lint and formatting checks pass. The failing hosted jobs report `ERR_PNPM_UNUSED_PATCH` for `expo-audio@57.0.4` before this change.

Implemented with GPT-6 through Codex.
@kalvenschraut
kalvenschraut changed the base branch from fix/release-smoke-locked-dependencies to rtvision September 12, 2026 16:41
@kalvenschraut

Copy link
Copy Markdown
Member Author

@coderabbitai approve

All checks now pass on current head 8df548605e3197f1288335b103479a5962e3653e, including Check, Test, all three server-test jobs, Rust, and Release Smoke. The Test job passed on retry after an unchanged mobile syntax-highlighting test produced different cold-start token boundaries in its first run; that focused mobile test and the same CI suite on #54 passed as well.

You found no blocking issue in the mention implementation at 3f2eba650245afc20c8663a2ee96b9a04c19ee69. The feature diff is unchanged after rebasing onto the separately reviewed CI fix from #54, now merged. This PR targets rtvision. Please confirm approval of the current head and submit an APPROVED review.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

repo="RTVision/t3code"
pr="52"
previous_head="3f2eba650245afc20c8663a2ee96b9a04c19ee69"
expected_head="8df548605e3197f1288335b103479a5962e3653e"

echo '=== Pull request head, target, and review state ==='
gh pr view "$pr" --repo "$repo" \
  --json headRefOid,baseRefName,baseRefOid,reviewDecision \
  --jq '{headRefOid, baseRefName, baseRefOid, reviewDecision}'

echo '=== Required check results for expected head ==='
gh api "repos/$repo/commits/$expected_head/check-runs?per_page=100" \
  --jq '[.check_runs[] | {name, status, conclusion}] | sort_by(.name)'

echo '=== Feature changes relative to the previously reviewed head ==='
git diff --stat "$previous_head" "$expected_head"
git diff --name-status "$previous_head" "$expected_head"

echo '=== Current checkout ==='
git rev-parse HEAD
git status --short

Length of output: 2870


@kalvenschraut Approved. I verified that #52 targets rtvision at 8df548605e3197f1288335b103479a5962e3653e. The required checks, including Release Smoke, completed successfully. The mention feature changes remain unchanged from the reviewed commit.

✅ Action performed

Comments resolved and changes approved.

@kalvenschraut
kalvenschraut merged commit afe3f55 into rtvision Sep 12, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant