Skip to content

fix(ui): GitHub folder links lose repository context - #157619

Merged
roboclaw-bot merged 1 commit into
mainfrom
openclaw/fix-weird-link-treatment-pr
Sep 24, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
openclaw/fix-weird-link-treatment-pr

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: pasted GitHub folder links in chat display a long, misleading URL with the owner and repository removed.

User Impact

Nested GitHub tree links now show a readable owner/repo/…/name label. Other GitHub URL labels retain repository context. Click destinations, full-URL tooltips, authored link labels, file links, and issue/PR chips remain unchanged.

Why This Change Was Made

The existing formatter shortened file links but let tree links fall through to a fallback that dropped the first two path segments. Tree links now use explicit middle truncation rather than guessing the boundary between a branch name and a folder path; branch names can contain slashes.

Evidence

  • Reproduced the reported link through the actual Control UI with a deterministic mocked Gateway before editing.
  • Focused renderer, GitHub-reference, file-link, and preview-target suites: 342 tests passed. Five regression cases failed on the original formatter.
  • Captured and inspected the real user/assistant message UI at 1280×900 and 390×844, dark theme; no mobile horizontal overflow; exact href and full-URL tooltip preserved.
  • node scripts/check-changed.mjs: passed (formatting, UI and consuming-test typechecks, lint, i18n, dead exports, and repository guards).
  • Changed test-file cost: pnpm test ui/src/components/markdown-links.test.ts --maxWorkers=1 — 110 tests passed; 2.69 seconds wall time. CI test execution: 0.372 seconds in checks-ui (2/3) (Bun; excludes setup).
  • Exact-head CI run 36065453433 passed the enforced openclaw/ci-gate; completed ClawSweeper review found no blocking findings.
  • Independent review: no actionable P0–P2 findings after addressing slash-containing branch names.

Reported link · mobile

Before

Before: folder link loses its repository

After

After: compact folder link preserves its repository

Related GitHub links · desktop

Before

Before: folder, file, branch, Actions, and custom links

After

After: readable tree path and intact fallback repository context

Worked on by

Work sessions


View the OpenClaw team session

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 39536a2a-0426-491c-8712-9895cb25eca1
@clawsweeper

clawsweeper Bot commented Sep 24, 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.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 24, 2026 22:05
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Sep 24, 2026
@clawsweeper

clawsweeper Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 6:13 PM ET / 22:13 UTC.

ClawSweeper review

What this changes

Control UI chat shortens GitHub folder links while retaining repository context, with updated tests and documentation for the displayed labels.

Merge readiness

✅ Ready for maintainer review

The display defect remains on current main and in the latest release. The branch has convincing before-and-after UI evidence, and this review found no blocking patch defect.

Priority: P2
Reviewed head: 41b8075bcc32ed856e1ee8b179324553ff726ad1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused patch has direct visual proof and meaningful regression coverage, with no concrete blocking defect found.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Before-and-after screenshots from the mocked-Gateway Control UI chat show the changed Markdown formatter producing repository-aware folder labels on mobile and desktop; focused tests cover destinations and tooltips. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): Before-and-after screenshots from the mocked-Gateway Control UI chat show the changed Markdown formatter producing repository-aware folder labels on mobile and desktop; focused tests cover destinations and tooltips. No stored-data contract changes.
Evidence reviewed 7 items Current main still has the defect: The formatter on fetched main drops the first two path segments for non-file GitHub links, removing owner and repository from a folder URL.
Latest release also has the old formatter: The v2026.9.6 source retains the fallback that omits owner and repository; the proposed behavior has not shipped in that release.
Introduced patch and merge result: The pinned branch changes the existing label formatter; the verified test merge retains the same formatter change against its main parent.
Findings None None.
Security None None.

How this fits together

The Control UI renders user and assistant Markdown messages from Gateway conversations. Its parser chooses visible GitHub link labels while preserving link destinations and tooltips.

flowchart LR
A[Chat message] --> B[Markdown parser]
B --> C{GitHub link?}
C -->|Generated label| D[Choose readable label]
C -->|Authored label| E[Keep authored text]
D --> F[Sanitized chat link]
E --> F
F --> G[Browser destination]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +6, Tests +41, Docs 0. Total +47 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 12 6 +6
Tests 1 50 9 +41
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 63 16 +47

Review metrics

None.

Technical review

Best possible solution:

Use the existing chat link formatter to keep folder labels readable and repository-specific while preserving exact destinations and authored text.

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

Yes. Current-main source shows the repository-dropping fallback for a pasted tree URL, and the PR's before screenshot corroborates the visible result; this read-only review did not execute the UI.

Is this the best way to solve the issue?

Yes. The patch adjusts the existing formatter used by chat rendering and checks that links retain their exact destinations.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 2cf8d36f6e42.

Labels

Label changes:

  • add P2: This fixes a visible chat-link labeling bug with limited user impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. Before-and-after screenshots from the mocked-Gateway Control UI chat show the changed Markdown formatter producing repository-aware folder labels on mobile and desktop; focused tests cover destinations and tooltips. No stored-data contract changes.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Before-and-after screenshots from the mocked-Gateway Control UI chat show the changed Markdown formatter producing repository-aware folder labels on mobile and desktop; focused tests cover destinations and tooltips. No stored-data contract changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.

Label justifications:

  • P2: This fixes a visible chat-link labeling bug with limited user impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • proof: sufficient: Contributor real behavior proof is sufficient. Before-and-after screenshots from the mocked-Gateway Control UI chat show the changed Markdown formatter producing repository-aware folder labels on mobile and desktop; focused tests cover destinations and tooltips. No stored-data contract changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Before-and-after screenshots from the mocked-Gateway Control UI chat show the changed Markdown formatter producing repository-aware folder labels on mobile and desktop; focused tests cover destinations and tooltips. No stored-data contract changes.

Evidence

What I checked:

  • Current main still has the defect: The formatter on fetched main drops the first two path segments for non-file GitHub links, removing owner and repository from a folder URL. (ui/src/components/markdown-parser.ts:126, 2cf8d36f6e42)
  • Latest release also has the old formatter: The v2026.9.6 source retains the fallback that omits owner and repository; the proposed behavior has not shipped in that release. (ui/src/components/markdown-parser.ts:126, eb377ac59e6c)
  • Introduced patch and merge result: The pinned branch changes the existing label formatter; the verified test merge retains the same formatter change against its main parent. (ui/src/components/markdown-parser.ts:131, 41b8075bcc32)
  • Render path and regression coverage: Generated GitHub labels use the formatter, and the added cases check tree labels, authored labels, exact destinations, tooltips, and streaming output. (ui/src/components/markdown-links.test.ts:586, 41b8075bcc32)
  • Visual behavior proof: The PR body's downloaded before-and-after mobile and desktop screenshots were inspected. They show the folder link gaining repository context, with related link labels still visible. The body reports the mocked-Gateway Control UI scenario and focused test results.
  • Feature history: The merged compact-GitHub-links PR is relevant history for this formatter, and its verified merge commit is 29b1a65. (ui/src/components/markdown-parser.ts:610, 29b1a65d1e68)

Likely related people:

  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

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.

@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) September 24, 2026 22:17
@roboclaw-bot
roboclaw-bot merged commit 33498e6 into main Sep 24, 2026
172 of 177 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/fix-weird-link-treatment-pr branch September 24, 2026 22:44
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ai): share Mistral text delta appends

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
Worked on by:
- @vyctorbrzezowski


OpenClaw-Publication: 39536a2a-0426-491c-8712-9895cb25eca1

Co-authored-by: vyctorbrzezowski <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 25, 2026
* refactor(ai): share Mistral text delta appends

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit '0484d7a3ecf52589b0d3d98741e58e5f6b5bf661': (68 commits)
  fix(subagents): stop completion transcript retry loops (#157571)
  perf(sessions): remove duplicate foreground history reference scans (#157572)
  improve(typesafe): defer startup work until the first decision (#157380)
  fix(update): restore npm-pack helper typechecking (#157659)
  fix(packaging): avoid heap exhaustion on large bundles (#157471)
  refactor(infra): share process error handler registries (#157632)
  chore(ui): refresh control ui locales (#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (#157592)
  perf(plugins): reuse declared tool membership during resolution (#156205)
  fix(ui): pasted text previews fail before sending (#157390)
  fix(agents): wait for database resources during deletion (#157631)
  improve: move operator profile database reads off the Gateway thread (#155800)
  fix: explain rejected settings without losing edits (#157549)
  fix: keep Gateway responsive while recording trajectory events (#157598)
  fix(auth): show SIWC email and selected model account identity (#157629)
  docs: explain Codex app approval precedence (#155089)
  refactor(wizard): share select prompt requests (#157607)
  fix(ui): omit empty sections from conversation Markdown exports (#157590)
  fix(doctor): explain update lint supervisor refusals (#156547)
  fix(ui): GitHub folder links lose repository context (#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit '229ab8a1fe957d3d4822309a39ddf9c7ec616395': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (#139131)
  refactor(msteams): share stored service URL validation (#157706)
  fix(codex): honor configured tool PATH in native commands (#157290)
  refactor(msteams): share approval kind labels (#157705)
  fix(sessions): keep session results current during cold reads (#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (#157535)
  refactor(i18n): reuse native branch candidate extraction (#157636)
  fix(update): preserve recovery files after ownership refusal (#148890)
  fix(test): prevent late announcements from contaminating registry tests (#157681)
  fix(e2e): scan full onboarding logs for prompts (#157624)
  refactor(session-tools): derive contracts from schemas (#156365)
  refactor(channels): derive config contracts from schemas (#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (#157689)
  refactor: reuse prepared fixtures in slow core tests (#157685)
  refactor(codex): reuse marketplace reference selection (#157621)
  chore(ui): refresh control ui locales (#157710)
  docs(gateway): show how we build OpenClaw on Team (#157675)
  refactor: verify IRC surrogate chunking over loopback (#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
* refactor(ui): share slash-command failure results

* Merge main to incorporate the upstream update type fix

* commit 'dda1f68bfa102cb804392c0e7cc22c0566a0944a': (68 commits)
  fix(subagents): stop completion transcript retry loops (openclaw#157571)
  perf(sessions): remove duplicate foreground history reference scans (openclaw#157572)
  improve(typesafe): defer startup work until the first decision (openclaw#157380)
  fix(update): restore npm-pack helper typechecking (openclaw#157659)
  fix(packaging): avoid heap exhaustion on large bundles (openclaw#157471)
  refactor(infra): share process error handler registries (openclaw#157632)
  chore(ui): refresh control ui locales (openclaw#157573)
  fix(gateway): release remote Skills subscriptions when shutdown drains (openclaw#157592)
  perf(plugins): reuse declared tool membership during resolution (openclaw#156205)
  fix(ui): pasted text previews fail before sending (openclaw#157390)
  fix(agents): wait for database resources during deletion (openclaw#157631)
  improve: move operator profile database reads off the Gateway thread (openclaw#155800)
  fix: explain rejected settings without losing edits (openclaw#157549)
  fix: keep Gateway responsive while recording trajectory events (openclaw#157598)
  fix(auth): show SIWC email and selected model account identity (openclaw#157629)
  docs: explain Codex app approval precedence (openclaw#155089)
  refactor(wizard): share select prompt requests (openclaw#157607)
  fix(ui): omit empty sections from conversation Markdown exports (openclaw#157590)
  fix(doctor): explain update lint supervisor refusals (openclaw#156547)
  fix(ui): GitHub folder links lose repository context (openclaw#157619)
  ...

* Merge frozen main to include the question fixture authority fix

* commit 'dc64cc3a3a3cf38fff1e44c1d7af42a32929d7e4': (25 commits)
  test(ui): capture live operator authority in guest question fixture
  refactor(agents): deslop runners, harness and recovery (openclaw#157294)
  fix(auth): preserve Copilot tenant credentials during Doctor repair (openclaw#139131)
  refactor(msteams): share stored service URL validation (openclaw#157706)
  fix(codex): honor configured tool PATH in native commands (openclaw#157290)
  refactor(msteams): share approval kind labels (openclaw#157705)
  fix(sessions): keep session results current during cold reads (openclaw#156121)
  fix(testing): capture bounded upgrade integrity diagnostics (openclaw#157535)
  refactor(i18n): reuse native branch candidate extraction (openclaw#157636)
  fix(update): preserve recovery files after ownership refusal (openclaw#148890)
  fix(test): prevent late announcements from contaminating registry tests (openclaw#157681)
  fix(e2e): scan full onboarding logs for prompts (openclaw#157624)
  refactor(session-tools): derive contracts from schemas (openclaw#156365)
  refactor(channels): derive config contracts from schemas (openclaw#156367)
  perf(test): reuse MCP archives and batch worker fixture copies (openclaw#157689)
  refactor: reuse prepared fixtures in slow core tests (openclaw#157685)
  refactor(codex): reuse marketplace reference selection (openclaw#157621)
  chore(ui): refresh control ui locales (openclaw#157710)
  docs(gateway): show how we build OpenClaw on Team (openclaw#157675)
  refactor: verify IRC surrogate chunking over loopback (openclaw#157580)
  ...

* chore: merge frozen main prerequisite repairs

Co-authored-by: Vincent Koc <[email protected]>
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 size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant