Repository navigation
feat(ui): render GitHub issue and PR links as reference chips - #139653
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 6, 2026, 1:03 AM ET / 05:03 UTC. ClawSweeper reviewWhat this changesRender GitHub issue and pull-request references in chat as compact, distinctively illustrated chips while preserving their link destinations. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain This remains useful work beyond current main, but the previously reported long-label overflow is still present at the reviewed head. The maintainer-owned PR should remain open. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI converts user and assistant Markdown into sanitized chat content. Its link parser identifies GitHub references, CSS presents them as chips, and the existing hover-card component uses their destinations to display previews. flowchart LR
A[Chat Markdown] --> B[Identify GitHub links]
B --> C{Matching item reference?}
C -->|Yes| D[Issue or pull-request chip]
C -->|No| E[Ordinary link presentation]
D --> F[Sanitized chat content]
E --> F
F --> G[Destination link and hover card]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +55, Tests +165, Docs +30. Total +250 across 7 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep compact reference chips within the available chat width using the existing session-chip containment pattern, while retaining complete destinations and accessible labels. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the PR defect: render a long matching owner/repo reference in a narrow chat column; its unbounded nowrap chip cannot fit. No browser reproduction was executed during this read-only review. Is this the best way to solve the issue? The existing parser and CSS are the appropriate owners, but the current implementation needs width containment before it safely handles all supported labels. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 883d4d65bad1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
373f90d to
74d2f06
Compare
Bare GitHub issue and pull-request URLs in chat previously shortened to a plain "#N" label behind the generic GitHub mark, and any subpath, query, or fragment variant kept the full URL visible. They now render as a compact chip with an issue or pull-request Octicon and "#N", including files, commits, comment, and diff-anchor links; authored "#N" and "owner/repo#N" shorthands become the same chip. The exact destination stays in href and the tooltip, and the existing hover card keeps opening from the chip. Custom labels, repository and blob links, image-only links, and code spans keep their current presentation.
it.each requires one consistent tuple shape across all rows; mixing 3- and 4-element arrays made TypeScript reject the callback signature.
74d2f06 to
caae80b
Compare
|
Merged via squash.
|
…aw#139653) * feat(ui): render GitHub issue and PR links as reference chips Bare GitHub issue and pull-request URLs in chat previously shortened to a plain "#N" label behind the generic GitHub mark, and any subpath, query, or fragment variant kept the full URL visible. They now render as a compact chip with an issue or pull-request Octicon and "#N", including files, commits, comment, and diff-anchor links; authored "#N" and "owner/repo#N" shorthands become the same chip. The exact destination stays in href and the tooltip, and the existing hover card keeps opening from the chip. Custom labels, repository and blob links, image-only links, and code spans keep their current presentation. * fix(ui): normalize github link chip test tuple shapes it.each requires one consistent tuple shape across all rows; mixing 3- and 4-element arrays made TypeScript reject the callback signature.
Problem
GitHub issue and pull-request links in chat shorten to a plain
#Nlabel behind the generic GitHub mark, and any link to a files tab, commit list, comment, or diff anchor keeps the whole URL visible. The references read as ordinary text links rather than the compact reference chips people know from GitHub.Solution
Issue and pull-request links now render as a compact chip: an
issue-openedorgit-pull-requestOcticon followed by#N, on the same tinted surface as the titled session-link chip, with a distinct hover and focus state.#Nfor every item path, including/files,/commits,#issuecomment-…,?tab=…, and#diff-…. The exact destination stays inhrefand in the tooltip, and the existing hover card keeps opening from the chip and navigating to the exact hovered link.[#N](…)and[owner/repo#N](…)shorthands become the same chip when the label matches the link. Any other authored label, repository and blob links, image-only links, and code spans keep their current presentation.THIRD_PARTY_NOTICES.md.Before / after
Dark theme, before:
Dark theme, after:
Hovering a chip still opens the GitHub hover card anchored to the chip (the card body shows the preview-unavailable state because the proof host could not reach GitHub from the Gateway during capture; that path is unchanged by this PR):
Light theme, before and after:
Captures come from two isolated dev Gateways (origin/main bundle vs this branch) with a synthetic workspace; no operator data.
Evidence
node scripts/run-vitest.mjs ui/src/components/markdown-links.test.ts ui/src/components/markdown-session-links.test.ts ui/src/styles/base-theme-contrast.node.test.ts ui/src/components/github-link-hovercard.test.ts→ 4 files, 173 tests passednode scripts/run-vitest.mjs ui/src/styles/chat-github-link-presentation.browser.test.ts ui/src/styles/cursor-policy.browser.test.ts→ 8 tests passed (chip wrapping and cursor policy)node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/github-link-hovercard.e2e.test.ts→ 9 tests passedpnpm tsgo:ui,stylelintonchat/text.css,oxlinton changed files: cleannode scripts/check-changed.mjs: every lane green exceptcore tsgo graph boundary, which fails identically on pureorigin/main(services: 721 test roots exceeds the 720 limit, reproduced at 41fba39); this UI-only diff adds no core test roots, so that repair is routed separately. The core-test typecheck failure seen before the rebase was fix(test): unblock CI after storage-failure regression assertion #139519, already fixed on main.Docs
docs/web/control-ui.mdchat bullet updated to describe the chip, the preserved tooltip destination, and which links keep the plain GitHub mark.