Skip to content

fix(ui): humanize GitHub issue and pull request links - #122285

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/control-ui-ghrefs
Aug 11, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/control-ui-ghrefs

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 11, 2026 •

Copy link
Copy Markdown
Member

Closes #122273

What Problem This Solves

Fixes an issue where bare GitHub issue and pull request URLs consumed excessive space in Control UI chat even though the renderer already recognized them as GitHub references.

Why This Change Was Made

In this PR, generated URL labels for recognized GitHub issues and pull requests render as owner/repo#123 while keeping the original destination and hover preview. Explicit Markdown labels remain untouched. The GitHub item parser is shared with the hovercard so both surfaces use one path contract; session-relative #123 labels remain out of scope because the Markdown render contract has no repository identity.

The existing link-decoration contract is unchanged: GitHub references have no underline at rest, while ordinary Markdown links keep the base underline established and tested in #121728.

User Impact

Issue and pull request references are shorter, easier to scan, and less likely to wrap across lines. Repository links and authored labels keep their current presentation.

Compact generated labels retain the existing break-anywhere behavior, so long owner and repository names remain contained in narrow chat panes.

Evidence

Theme Before After
Light Before in light theme: bare GitHub issue and pull request links show full URLs After in light theme: bare GitHub issue and pull request links show compact owner/repo references
Dark Before in dark theme: bare GitHub issue and pull request links show full URLs After in dark theme: bare GitHub issue and pull request links show compact owner/repo references
  • node scripts/run-vitest.mjs ui/src/components/markdown-links.test.ts — 72 tests passed.
  • 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 — Chromium flow passed in both themes, including hover previews, navigation, and long-reference containment at 360px.
  • OPENCLAW_TESTBOX=1 node scripts/check-changed.mjs --base HEAD^ --head HEAD — passed formatting, guards, dead-export scans, i18n verification, core-test/UI typechecks, and changed-file lint on exact head a7c4f39909dc (Blacksmith Testbox, tbx_01kzsdp90jnzvg6rw091fw58sj).
  • Exact-head CI — completed successfully with openclaw/ci-gate green for a7c4f39909dc.
  • Red/green proof: the updated Chromium scenario times out on the compact link name with the pre-fix parser, then passes with this PR.
  • Wrapping red/green proof: the long-reference unit assertion fails on the previous PR head when markdown-bare-url is absent, then passes with the retained class and 360px Chromium containment check.
  • Structured branch review against origin/main reported no actionable findings.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 11, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 11, 2026 21:35
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 11, 2026, 6:00 PM ET / 22:00 UTC.

ClawSweeper review

What this changes

The branch renders automatically generated GitHub issue and pull-request URLs in Control UI chat as compact owner/repo#number labels while retaining their destinations and hover previews.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: the branch still drops the existing narrow-pane breakability contract for every compacted GitHub item link, so it needs the prior P2 revision before merge.

Priority: P3
Reviewed head: 2edaf701ce25e2246ae588b59cb40f70a3fbca9a

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation is focused and supported by useful UI evidence, but the unaddressed narrow-pane regression prevents a merge-ready rating.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR nevertheless supplies after-fix UI captures and mocked-Gateway browser evidence.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR nevertheless supplies after-fix UI captures and mocked-Gateway browser evidence.
Evidence reviewed 5 items Current-main behavior: Current main classifies every generated URL with the breakability class but only adds the GitHub mark; it does not replace the generated URL text.
Patch regression: The branch suppresses markdown-bare-url when an item target is found, then changes that anchor's visible text, so compact generated item links no longer receive the CSS wrapping rule.
Wrapping contract: The existing stylesheet documents that markdown-bare-url provides unconditional break points to prevent a long generated link from moving wholesale and stranding the GitHub glyph.
Findings 1 actionable finding [P2] Keep compact item links breakable
Security None None.

How this fits together

Control UI turns chat Markdown into sanitized links, then its GitHub hovercard recognizes supported item URLs and requests preview metadata from the Gateway. This change affects the visible chat-link label before that hover interaction.

flowchart LR
  Message[Chat Markdown] --> Renderer[Markdown renderer]
  Renderer --> Recognition[GitHub item recognition]
  Recognition --> Label[Compact link label]
  Label --> Chat[Control UI chat]
  Chat --> Hover[GitHub hover preview]
Loading

Before merge

  • Keep compact item links breakable (P2) - markdown-bare-url is the only selector that sets line-break: anywhere to stop a long generated link from moving wholesale and leaving the GitHub glyph behind. This condition excludes every item target, so owner/repo#number loses that narrow-pane behavior; retain the class for generated item URLs and add a narrow-width regression.
  • Complete next step (P2) - The remaining repair is mechanical, but the protected maintainer label and member-authored PR require normal human review rather than a ClawSweeper repair job.

Findings

  • [P2] Keep compact item links breakable — ui/src/components/markdown-parser.ts:481-482
Agent review details

Security

None.

PR surface

Source +16, Tests +13. Total +29 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 48 32 +16
Tests 2 22 9 +13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 70 41 +29

Review metrics

Metric Value Why it matters
Production vs test LOC production +48/-32 (net +16); tests +22/-9 (net +13) The production increase centralizes item-path parsing and label formatting; the remaining blocker is a small behavior-preserving correction to the existing wrapping path.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #122273
Summary: This PR is the direct candidate implementation for the open Control UI label request; the earlier merged GitHub-link presentation PR is related but did not provide compact item labels.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Retain markdown-bare-url on generated GitHub item anchors while compacting their text, then prove a long owner/repository reference wraps correctly in a narrow Control UI chat pane.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: render a long generated GitHub item URL in a narrow chat pane; the branch removes the sole class that enables its unconditional break points. No local test was run because this review is read-only.

Is this the best way to solve the issue?

No: sharing the item-path parser is a clean direction, but the branch must preserve the existing generated-link wrapping invariant rather than making compact labels a separate unbreakable case.

Full review comments:

  • [P2] Keep compact item links breakable — ui/src/components/markdown-parser.ts:481-482
    markdown-bare-url is the only selector that sets line-break: anywhere to stop a long generated link from moving wholesale and leaving the GitHub glyph behind. This condition excludes every item target, so owner/repo#number loses that narrow-pane behavior; retain the class for generated item URLs and add a narrow-width regression.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 459c70e14a2c.

Labels

Label changes:

  • add P3: This is a focused Control UI readability refinement with a narrow, non-blocking layout regression in the proposed branch.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member, so the external-contributor proof gate does not apply; the PR nevertheless supplies after-fix UI captures and mocked-Gateway browser evidence.

Label justifications:

  • P3: This is a focused Control UI readability refinement with a narrow, non-blocking layout regression in the proposed branch.
  • 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 author is a repository member, so the external-contributor proof gate does not apply; the PR nevertheless supplies after-fix UI captures and mocked-Gateway browser evidence.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: Authored the merged GitHub-link presentation work referenced by this PR and is extending the same Markdown-rendering surface. (role: prior merged feature author and current area contributor; confidence: high; commits: 94490bd69bc6; files: ui/src/components/markdown-parser.ts, ui/src/components/markdown-links.test.ts, ui/src/e2e/github-link-hovercard.e2e.test.ts)
  • Peter Steinberger: Feature history records the original Control UI GitHub issue and pull-request preview implementation. (role: original hover-preview feature author; confidence: medium; commits: c064cae040a2; files: ui/src/components/github-link-hovercard.ts)
  • Kevin Lin: Current-main blame attributes the existing generated-URL classification and breakability assignment to this commit. (role: current classifier-line author in main history; confidence: medium; commits: 2d0c30fd654e; files: ui/src/components/markdown-parser.ts)

Rank-up moves

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

  • Preserve the generated-link breakability class for compact item labels and add a narrow-width rendered-UI regression.

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 (1 earlier review cycle)
  • reviewed 2026-08-11T21:53:32.599Z sha 2edaf70 :: found issues before merge. :: [P2] Keep compact item links breakable

@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 Aug 11, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/control-ui-ghrefs branch from 2edaf70 to a7c4f39 Compare August 11, 2026 22:02
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Pre-merge review complete for a7c4f39909dcb61597b5776993e7456c659fbc79.

  • The published wrapping finding is addressed: generated compact references retain markdown-bare-url.
  • Rank-up moves: wrapping class retained; narrow-width long-reference Chromium regression added; compact text replacing generated raw URLs is accepted for this issue's product scope.
  • No actionable findings remain; sequential branch review passes completed cleanly.
  • Focused proof: 72 parser tests and the Chromium hovercard/navigation/narrow-layout scenario passed. The wrapping regression was also confirmed red/green.
  • Exact-head CI: openclaw/ci-gate passed.
  • Production/test LOC delta: +16 / +55. The production growth establishes one shared typed GitHub item-path parser while removing the hovercard's duplicate parser.

Ready for the native landing flow.

@vyctorbrzezowski
vyctorbrzezowski merged commit 65f4320 into main Aug 11, 2026
109 of 110 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/control-ui-ghrefs branch August 11, 2026 22:16
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Landed as 65f43201475863613d3dfbd27229c02486cbb58f.

Exact-head CI passed on a7c4f39909dcb61597b5776993e7456c659fbc79: https://github.com/openclaw/openclaw/actions/runs/31540658458

Issue #122273 was closed by the merge.

vincentkoc added a commit that referenced this pull request Aug 11, 2026
* origin/main: (1725 commits)
  fix(agents): preserve reply cleanup when cancellation throws (#122252)
  fix(ui): render disallowed link schemes as plain text (#122311)
  fix(test): isolate gateway helper env stubs (#122319)
  fix(ui): keep chat Markdown block rhythm consistent (#122289)
  test(cli): trim duplicate Hooks process cases (#122278)
  fix(ui): retain identity while agent roster loads
  fix(ui): preserve configured agent labels
  fix(plugins): keep startup convergence read-only (#122330)
  fix: preserve WebChat reply context after reloads (#122169)
  fix(ui): make DONE moves visibly reversible (#122303)
  fix(ui): keep inline-code punctuation attached (#122291)
  fix(google-meet): publish exports atomically (#122306)
  fix(channels): preserve failed agent run reactions (#122009)
  fix(ui): label patch file operations accurately (#122287)
  fix(windows): preserve Unicode LAN route aliases (#122263)
  test(media): synchronize transcode pool completion (#122279)
  fix(android): keep completed subagent activity visible for sixty seconds (#122089)
  fix(ui): humanize bare GitHub item links (#122285)
  refactor(qqbot): install plugin from Tencent package (#107295)
  chore: scope SQLite session lifecycle CI (#121917)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
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 maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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.

[Bug]: Humanize bare GitHub issue and pull request links in Control UI chat

1 participant