Skip to content

Fix Mission Control docs markdown links#90218

Open
spacegeologist wants to merge 1 commit into
openclaw:mainfrom
spacegeologist:fix/mission-control-doc-links-89465
Open

Fix Mission Control docs markdown links#90218
spacegeologist wants to merge 1 commit into
openclaw:mainfrom
spacegeologist:fix/mission-control-doc-links-89465

Conversation

@spacegeologist

@spacegeologist spacegeologist commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #89465.

Summary

  • Rewrite root-relative OpenClaw docs markdown links to https://docs.openclaw.ai in Mission Control markdown surfaces.
  • Preserve Control UI routes such as /cron, /channels, /nodes, and /skills/workshop when rendering arbitrary Mission Control markdown.
  • Gate sidebar docs-link rewriting with explicit markdown provenance so generic workspace markdown previews keep project-local links.

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: Mission Control markdown that contains root-relative OpenClaw docs links now renders those links against https://docs.openclaw.ai, while Control UI routes such as /cron stay in-app.
  • Real environment tested: Local checkout of this PR head (e0e79523e73d282bc622284a6284e4f76c1aeca1) on macOS, Node.js v24.13.1, using the repository's actual UI markdown renderer with a jsdom DOM at http://127.0.0.1:4317/.
  • Exact steps or command run after this patch: Ran a local Node command that imports ui/src/ui/markdown.ts, calls toSanitizedMarkdownHtml with OPENCLAW_MISSION_CONTROL_MARKDOWN_OPTIONS and OPENCLAW_DOCS_MARKDOWN_OPTIONS, and prints the rendered anchor href values.
  • Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output): Terminal capture / console output from the command above:
real behavior proof: markdown renderer link targets
Mission Control docs link: https://docs.openclaw.ai/concepts/agent-workspace
Mission Control internal route: /cron
Docs-only guide link: https://docs.openclaw.ai/cli/setup
Generic markdown preview link: /cli/setup
  • Observed result after fix: Mission Control docs links are rewritten to the public docs host, Mission Control internal routes remain root-relative in the app, docs-only rendering still rewrites OpenClaw docs paths to https://docs.openclaw.ai, and generic markdown previews keep project-local root-relative links unchanged.
  • What was not tested: I did not attach a browser screenshot or screen recording of the full Mission Control app. Browser-level coverage is supported by the focused UI regression tests listed below.
  • Proof limitations or environment constraints: This proof exercises the real markdown sanitizer/link-rewrite code path from the PR checkout in a local DOM environment rather than a full running Control UI session.
  • Before evidence (optional but encouraged): Before this patch, the same root-relative docs links rendered as host-local app paths such as /concepts/agent-workspace, which is the behavior reported in Mission Control: docs links navigate to 127.0.0.1:4317 instead of docs.openclaw.ai #89465.

Validation

  • node scripts/run-vitest.mjs src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts
  • node scripts/run-vitest.mjs ui/src/ui/views/cron.test.ts ui/src/ui/markdown.test.ts
  • node scripts/run-vitest.mjs ui/src/ui/markdown.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/ui/views/cron.test.ts ui/src/ui/views/skills.test.ts ui/src/ui/views/dreaming.test.ts
  • ./node_modules/.bin/oxfmt --check --threads=1 ui/src/ui/markdown.ts ui/src/ui/markdown.test.ts ui/src/ui/chat/grouped-render.ts ui/src/ui/chat/grouped-render.test.ts ui/src/ui/chat/side-result-render.ts ui/src/ui/chat/run-controls.test.ts ui/src/ui/views/markdown-sidebar.ts ui/src/ui/views/cron.ts ui/src/ui/views/cron.test.ts ui/src/ui/views/dreaming.ts ui/src/ui/views/skills.ts ui/src/ui/views/chat.test.ts ui/src/ui/sidebar-content.ts
  • node scripts/run-oxlint.mjs ui/src/ui/markdown.ts ui/src/ui/markdown.test.ts ui/src/ui/chat/grouped-render.ts ui/src/ui/chat/grouped-render.test.ts ui/src/ui/chat/side-result-render.ts ui/src/ui/chat/run-controls.test.ts ui/src/ui/views/markdown-sidebar.ts ui/src/ui/views/cron.ts ui/src/ui/views/cron.test.ts ui/src/ui/views/dreaming.ts ui/src/ui/views/skills.ts ui/src/ui/views/chat.test.ts ui/src/ui/sidebar-content.ts
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 4, 2026
@clawsweeper

clawsweeper Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 12, 2026, 2:07 PM ET / 18:07 UTC.

Summary
The PR makes OpenClaw docs-link rewriting opt-in across selected Mission Control markdown surfaces while preserving Control UI routes and project-local links elsewhere.

PR surface: Source +96, Tests +91. Total +187 across 13 files.

Reproducibility: yes. from source with high confidence. Current main globally rewrites recognized docs-root paths, and the branch’s focused regression case demonstrates why arbitrary workspace markdown such as /cli/setup must remain project-local.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🦞 diamond lobster
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Next step before merge

  • No automated repair is needed; maintainers should complete normal exact-head review and merge gating.

Security
Cleared: The UI-only source and test diff adds no dependency, workflow, permission, secret, installation, publishing, or supply-chain surface, and configurable URL bases are restricted to HTTP(S) origins.

Review details

Best possible solution:

Land the provenance-aware rendering behavior so OpenClaw-authored Mission Control content receives public docs links while arbitrary workspace and sidebar markdown retains project-local root links.

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

Yes, from source with high confidence. Current main globally rewrites recognized docs-root paths, and the branch’s focused regression case demonstrates why arbitrary workspace markdown such as /cli/setup must remain project-local.

Is this the best way to solve the issue?

Yes. Explicit render provenance is narrower and more maintainable than globally inferring that every recognized root path is OpenClaw documentation, and the sidebar flag handles the mixed-content ownership boundary directly.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: The PR fixes a user-visible but bounded Mission Control link-routing defect without affecting core availability or message delivery.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies exact-head live output from the actual markdown renderer showing corrected docs URLs, preserved Control UI routes, docs-only rewriting, and unchanged generic workspace links.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies exact-head live output from the actual markdown renderer showing corrected docs URLs, preserved Control UI routes, docs-only rewriting, and unchanged generic workspace links.
Evidence reviewed

PR surface:

Source +96, Tests +91. Total +187 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 8 120 24 +96
Tests 5 98 7 +91
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 218 31 +187

What I checked:

  • Current-main behavior: Current main globally classifies recognized root-relative paths as OpenClaw documentation while excluding known Control UI routes and resources; this solves the linked issue but cannot distinguish arbitrary workspace markdown provenance. (ui/src/ui/markdown.ts:432, 105d77d486bf)
  • Provenance-aware branch behavior: The branch adds normalized renderer options and only applies a docs origin when callers explicitly select docs or Mission Control rendering; default markdown retains root-relative links. (ui/src/ui/markdown.ts:375, e0e79523e73d)
  • Route preservation: Mission Control mode checks recognized in-app routes before rewriting docs paths and continues preserving app resources, API paths, artifacts, and plugin viewer routes. (ui/src/ui/markdown.ts:471, e0e79523e73d)
  • Mixed-provenance sidebar boundary: Expanded assistant messages explicitly mark OpenClaw-authored markdown for rewriting, while generic sidebar markdown remains in default local-link mode. (ui/src/ui/chat/grouped-render.ts:1595, e0e79523e73d)
  • Regression coverage: Focused tests cover local-by-default links, docs-only rewriting, preserved Control UI routes, docs subpaths sharing route segments, query/hash preservation, and cache separation among rendering modes. (ui/src/ui/markdown.test.ts:605, e0e79523e73d)
  • Real behavior proof: The PR body provides exact-head output from the real markdown renderer showing the intended four-way behavior: public docs URLs, preserved app routes, docs-only rewriting, and unchanged generic project-local links. (ui/src/ui/markdown.ts:1082, e0e79523e73d)

Likely related people:

  • vincentkoc: Authored commit 105d77d, which implemented the current main docs-host rewrite that this branch narrows. (role: introduced current behavior; confidence: high; commits: 105d77d486bf; files: ui/src/ui/markdown.ts, ui/src/ui/markdown.test.ts)
  • BunsDev: Recent merged history includes repeated work across the central renderer, its tests, and the markdown sidebar boundary. (role: recent markdown renderer contributor; confidence: high; commits: 9315302516fb, a710366e9ece, f76a3c5225bb; files: ui/src/ui/markdown.ts, ui/src/ui/markdown.test.ts, ui/src/ui/views/markdown-sidebar.ts)
  • steipete: Recent history includes markdown-test cleanup and docs/navigation maintenance around the same UI-to-docs boundary. (role: recent adjacent UI and docs contributor; confidence: medium; commits: f665c767e631, c47c4b35746d, e93216080aa1; files: ui/src/ui/markdown.test.ts, docs/docs.json)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 4, 2026
@spacegeologist spacegeologist marked this pull request as ready for review June 4, 2026 07:35
@spacegeologist spacegeologist changed the title [codex] Fix Mission Control docs markdown links Fix Mission Control docs markdown links Jun 4, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. P2 Normal backlog priority with limited blast radius. labels Jun 4, 2026
@spacegeologist spacegeologist force-pushed the fix/mission-control-doc-links-89465 branch from 589d236 to 557af3f Compare June 4, 2026 07:53
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 4, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 4, 2026
@spacegeologist spacegeologist force-pushed the fix/mission-control-doc-links-89465 branch from 557af3f to 0884f01 Compare June 4, 2026 08:02
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the ClawSweeper P2 on the latest head 0884f01c5d10b47d5d368086c8c1a7a30f3fc834:

  • renderJobPayload() now passes OPENCLAW_MISSION_CONTROL_MARKDOWN_OPTIONS when rendering cron job prompt markdown.
  • ui/src/ui/views/cron.test.ts now covers a root-relative docs link rewriting to https://docs.openclaw.ai/concepts/agent-workspace and preserves the in-app /cron route.
  • The current merge-ref plugin contract failure was also addressed by keeping packages/plugin-sdk/src/testing.ts as the single-line deprecated bridge expected by the package contract guardrail.

Local validation after the fix:

  • node scripts/run-vitest.mjs ui/src/ui/views/cron.test.ts ui/src/ui/markdown.test.ts
  • node scripts/run-vitest.mjs src/plugins/contracts/plugin-sdk-package-contract-guardrails.test.ts
  • node scripts/run-vitest.mjs ui/src/ui/markdown.test.ts ui/src/ui/chat/grouped-render.test.ts ui/src/ui/views/cron.test.ts ui/src/ui/views/skills.test.ts ui/src/ui/views/dreaming.test.ts
  • ./node_modules/.bin/oxfmt --check --threads=1 ...
  • node scripts/run-oxlint.mjs ...
  • git diff --check

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 Jun 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 4, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 4, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 4, 2026
@spacegeologist spacegeologist force-pushed the fix/mission-control-doc-links-89465 branch from 241ce3d to 197a111 Compare June 4, 2026 10:37
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 4, 2026
@clawsweeper clawsweeper Bot removed the rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. label Jun 4, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 4, 2026
@spacegeologist spacegeologist force-pushed the fix/mission-control-doc-links-89465 branch from 197a111 to 90b7aa1 Compare June 5, 2026 07:52

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 5, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 5, 2026
@spacegeologist spacegeologist force-pushed the fix/mission-control-doc-links-89465 branch from 90b7aa1 to e0e7952 Compare June 12, 2026 17:58
@openclaw-barnacle openclaw-barnacle Bot added size: M and removed size: L proof: sufficient ClawSweeper judged the real behavior proof convincing. labels Jun 12, 2026
@spacegeologist

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 12, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jun 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 P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mission Control: docs links navigate to 127.0.0.1:4317 instead of docs.openclaw.ai

1 participant