Skip to content

feat(ui): render GitHub issue and PR links as reference chips - #139653

Merged
steipete merged 2 commits into
mainfrom
steipete/awesome-stonebraker-23c81c
Sep 6, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/awesome-stonebraker-23c81c

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Problem

GitHub issue and pull-request links in chat shorten to a plain #N label 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-opened or git-pull-request Octicon followed by #N, on the same tinted surface as the titled session-link chip, with a distinct hover and focus state.

  • Bare item URLs compress to #N for every item path, including /files, /commits, #issuecomment-…, ?tab=…, and #diff-…. The exact destination stays in href and in the tooltip, and the existing hover card keeps opening from the chip and navigating to the exact hovered link.
  • Authored [#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.
  • The icons are bundled as CSS masks (no network fetch), stay out of the accessibility tree and copied text, and follow the link color in both themes. The Octicons MIT notice is recorded in THIRD_PARTY_NOTICES.md.

Before / after

Dark theme, before:

GitHub links rendered as plain #N text links behind the GitHub mark

Dark theme, after:

GitHub issue and pull-request links rendered as chips with kind icons

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):

Hover card anchored to a pull-request chip

Light theme, before and after:

Light theme before

Light theme 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 passed
  • node 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 passed
  • pnpm tsgo:ui, stylelint on chat/text.css, oxlint on changed files: clean
  • node scripts/check-changed.mjs: every lane green except core tsgo graph boundary, which fails identically on pure origin/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.
  • Codex autoreview (P0–P2): scoped-clean

Docs

docs/web/control-ui.md chat bullet updated to describe the chip, the preserved tooltip destination, and which links keep the plain GitHub mark.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 1:03 AM ET / 05:03 UTC.

ClawSweeper review

What this changes

Render GitHub issue and pull-request references in chat as compact, distinctively illustrated chips while preserving their link destinations.

Regression provenance

Possible 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
Reviewed head: caae80b9ccc5e47f1798d8c4494f8dbc54926d65

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The focused implementation and useful validation retain value, but the unresolved overflow blocks correctness.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor gate does not apply to this maintainer-authored PR. Its body supplies isolated-Gateway screenshots covering chip appearance and hover-card anchoring; attachment retrieval prevented visual inspection here, without creating a contributor proof deficiency.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor gate does not apply to this maintainer-authored PR. Its body supplies isolated-Gateway screenshots covering chip appearance and hover-card anchoring; attachment retrieval prevented visual inspection here, without creating a contributor proof deficiency.
Evidence reviewed 8 items Introduced overflow trigger: The introduced chip rule sets inline-block and white-space: nowrap without width containment or truncation. A matching repository-qualified label retains its full text, so a long label exceeds a narrow chat column.
Qualified labels remain unshortened: Matching owner/repo references receive the chip class; only generated URL labels are shortened. Exact href values are retained in the tooltip.
Existing containment pattern and coverage gap: The adjacent titled session-link style already combines a maximum width, hidden overflow, and ellipsis. The GitHub browser test checks atomic fragments across 200–900px columns, but neither supplies a long qualified label nor asserts containment.
Findings 1 actionable finding [P2] Bound repository-qualified chips to the available chat width
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Bound repository-qualified chips to the available chat width (P2) - The previously reported overflow remains. A link such as [a-very-long-organization-name/a-very-long-repository-name#3434](https://github.com/a-very-long-organization-name/a-very-long-repository-name/issues/3434) keeps its full label but now receives an inline-block chip with white-space: nowrap and no width limit. It therefore overflows narrow chat columns instead of wrapping. Add containment with truncation or suitable wrapping, preserve the full destination tooltip, and extend the browser test to assert long-label containment.
  • Resolve merge risk (P1) - The supplied before-and-after screenshots could not be visually inspected because attachment retrieval failed.
  • Complete next step (P2) - Constrain repository-qualified chips to the chat width and add a browser containment assertion for long labels, preserving the exact href and tooltip.

Findings

  • [P2] Bound repository-qualified chips to the available chat width — ui/src/styles/chat/text.css:583-587
Agent review details

Security

None.

PR surface

Source +55, Tests +165, Docs +30. Total +250 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 67 12 +55
Tests 3 193 28 +165
Docs 2 31 1 +30
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 291 41 +250

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep compact reference chips within the available chat width using the existing session-chip containment pattern, while retaining complete destinations and accessible labels.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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:

  • [P2] Bound repository-qualified chips to the available chat width — ui/src/styles/chat/text.css:583-587
    The previously reported overflow remains. A link such as [a-very-long-organization-name/a-very-long-repository-name#3434](https://github.com/a-very-long-organization-name/a-very-long-repository-name/issues/3434) keeps its full label but now receives an inline-block chip with white-space: nowrap and no width limit. It therefore overflows narrow chat columns instead of wrapping. Add containment with truncation or suitable wrapping, preserve the full destination tooltip, and extend the browser test to assert long-label containment.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 883d4d65bad1.

Labels

Label changes:

  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The ordinary external-contributor gate does not apply to this maintainer-authored PR. Its body supplies isolated-Gateway screenshots covering chip appearance and hover-card anchoring; attachment retrieval prevented visual inspection here, without creating a contributor proof deficiency.

Label justifications:

  • P3: This is chat presentation polish with a bounded layout defect, not a broken core workflow.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The ordinary external-contributor gate does not apply to this maintainer-authored PR. Its body supplies isolated-Gateway screenshots covering chip appearance and hover-card anchoring; attachment retrieval prevented visual inspection here, without creating a contributor proof deficiency.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The ordinary external-contributor gate does not apply to this maintainer-authored PR. Its body supplies isolated-Gateway screenshots covering chip appearance and hover-card anchoring; attachment retrieval prevented visual inspection here, without creating a contributor proof deficiency.

Evidence

What I checked:

  • Introduced overflow trigger: The introduced chip rule sets inline-block and white-space: nowrap without width containment or truncation. A matching repository-qualified label retains its full text, so a long label exceeds a narrow chat column. (ui/src/styles/chat/text.css:575, caae80b9ccc5)
  • Qualified labels remain unshortened: Matching owner/repo references receive the chip class; only generated URL labels are shortened. Exact href values are retained in the tooltip. (ui/src/components/markdown-parser.ts:550, caae80b9ccc5)
  • Existing containment pattern and coverage gap: The adjacent titled session-link style already combines a maximum width, hidden overflow, and ellipsis. The GitHub browser test checks atomic fragments across 200–900px columns, but neither supplies a long qualified label nor asserts containment. (ui/src/styles/chat-github-link-presentation.browser.test.ts:109, caae80b9ccc5)
  • Current-main necessity: The fetched main stylesheet retains the generic GitHub mark and ordinary wrapping behavior; the introduced item-chip rule is absent. The supplied related merged PR, fix(test): unblock CI after storage-failure regression assertion #139519, repairs an unrelated core test assertion and does not supersede this feature. Release-tree inspection could not complete because a required object was unavailable; no shipped implementation is claimed. (ui/src/styles/chat/text.css:532, 883d4d65bad1)
  • Re-review continuity: The supplied completed review already raised repository-qualified chip containment. Current source independently confirms that blocker remains. Comparing the earlier reviewed SHA failed because its object was unavailable, so no new historical or late-discovery attribution is made. (ui/src/styles/chat/text.css:586, caae80b9ccc5)
  • Supplied visual proof and inspection limitation: The captured PR body describes light/dark before-and-after screenshots from two isolated dev Gateways using a synthetic workspace, plus an anchored hover card. The appearance evidence maps directly to the parser and stylesheet changes. Attempts to retrieve the supplied dark-theme attachments returned cache misses; their pixels were not inspected. This is a reviewer limitation, not missing contributor proof. Captured context identity: 88527d9bbbc525efaa1357954175cd95af219e2da850b4fdebd1005719e32f86.

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Constrain long qualified chips and verify containment in narrow chat columns while preserving href and tooltip.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-06T03:00:01.227Z sha 373f90d :: blocked before merge. :: [P2] Bound repository-qualified chips to the available chat width
  • reviewed 2026-09-06T04:32:26.183Z sha 74d2f060b06e1ac8b8d16f300c1860fef6b3ad8b :: blocked before merge. :: [P2] Bound repository-qualified chips to the available chat width

@steipete
steipete force-pushed the steipete/awesome-stonebraker-23c81c branch from 373f90d to 74d2f06 Compare September 6, 2026 04:27
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.
@steipete
steipete force-pushed the steipete/awesome-stonebraker-23c81c branch from 74d2f06 to caae80b Compare September 6, 2026 04:57
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 6, 2026
@steipete
steipete merged commit 127ecdd into main Sep 6, 2026
128 checks passed
@steipete
steipete deleted the steipete/awesome-stonebraker-23c81c branch September 6, 2026 05:12
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant