Repository navigation
fix: Markdown heading links open files without leaving the chat - #185080
roboclaw-bot wants to merge 4 commits into
Conversation
Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: fb92dd7a-06de-4171-b1b8-ad86a9b90271
|
🦞👀 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: needs changes before merge. What this changesResolve Markdown document links relative to the open file and scroll heading fragments inside the existing chat reader. Example: Follow multiplayer-agentic-workflows.md#additional-human-agent-development-records from guides/faculty-guide.md.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR addresses a verified navigation defect, but one P2 regression can blank a retained non-Markdown file reader; the earlier retained-Markdown timing finding is withdrawn. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe Control UI Markdown renderer classifies file destinations, existing workspace navigation reads the selected file, and the retained reader applies document-local heading navigation. flowchart LR
A[Markdown document] --> B[File link parser]
B --> C[Workspace navigation]
C --> D[Session file service]
D --> E[Retained file reader]
E --> F[Document heading target]
Technical reviewBest possible solution: Keep the existing parser, workspace, and Markdown-island owners, and restrict fragment-triggered preview switching to files that have a Markdown preview. Do we have a high-confidence way to reproduce the issue? Current-main source and inspected browser evidence establish the original navigation failure; the newly identified non-Markdown failure is source-reproducible, with no target code executed during this review. Is this the best way to solve the issue? The patch uses the appropriate existing owners and preserves document-local heading scope, but its preview-mode transition must respect the target file’s rendering capability. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 08e08b720495. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +154, Tests +280, Docs +6. Total +440 across 16 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 28, 2026, 5:06 PM ET / 21:06 UTC (Revision 3). |
Co-authored-by: jjjhenriksen <[email protected]>
Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: 1e26efc3-56bc-45c8-bb82-c94e2b18a5a0
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Worked on by: - @jjjhenriksen Co-authored-by: jjjhenriksen <[email protected]> OpenClaw-Publication: 3f6b125d-8bab-4b5e-875c-5029d0437224
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes: clicking a Markdown file link with a heading fragment can leave the file reader and navigate to a nonexistent chat instead.
User Impact
Users can follow document-relative links such as
multiplayer-agentic-workflows.md#additional-human-agent-development-recordsand local#sectionlinks in Markdown previews without changing sessions. Existing session links, line links, and literal filename hashes remain supported. No configuration changes or migration are required.Why This Change Was Made
Authored file destinations now keep path, line, and fragment separate, with percent decoding after fragment parsing. The existing reader supplies the document's path and carries heading requests through its retained-file navigation. Heading targets are document-scoped data attributes, not page-global IDs; the Markdown render cache also includes the document path.
Evidence
Current-main recheck — November 4
Prepared locally; source publication blocked. The PR was integrated with main at
3df082cf325b7105fbf6833faed7f96d04f68bc8. Both retainedinventory.csv#totalsandnotes.txt#totalsreproduced a blank source reader before the fix. The local repair routes fragment-driven mode changes through the file-presentation owner and uses one Markdown-preview capability decision for navigation, rendering, and mode selection. CSV/plain-text readers remain visible and retain their existing editor DOM; Markdown heading navigation remains supported.905c7b9fe8ec9db5826f5fa068cfaaaa21bffd03. Publication requestbbab0c80-a84b-447f-af52-8e34def9cb1cwas refused because carrying inherited workflow changes requires the requester's full operator write authority. The refusal explicitly says this is not a GitHub token-scope failure. Saved source is intact; remote PR head remainscdcd432a118878944b547fd46398cd0dece95284. A maintainer with full write access must publish the saved candidate. No merge was attempted.Follow-up assessment: retained-file refresh
The latest source-only timing finding is not reproduced on the reviewed runtime at
83689dd0. A production-build browser scenario held the sixthsessions.files.getresponse, kept the same Markdown article mounted, then returned changed content with the requested heading placed 80 paragraphs below the old document end. The existing runtime scrolled to the new heading without changing the chat URL or resolving another session. Temporary tracing confirmed that the view-facing panel still held its previous fragment while the response was pending; its first callback for the new fragment saw the refreshed heading already rendered. The proposed early-consumption precondition was not observed.The regression covering that delayed response and retained DOM is published at
cdcd432a. The final Vitest report passes in 1.838 s (12.88 s invocation, including a 9.23 s production build); the UI-E2E-chat typecheck, targeted lint, formatting, and whitespace checks pass. No production code was changed. The independent authoring review could not complete due to a runner failure. This trivial, test-only update was published on explicit maintainer direction; no independent-review success is claimed.83689dd0): UI typecheck, UI-E2E-chat test typecheck, targeted type-aware lint, formatting, and whitespace checks passed. Independent Auto Review reported no P0–P2 findings for that runtime patch. The nine-suite invocation takes 7.60 s (9.36 s wrapper wall time); the two direct suites take 1.79 s (3.47 s wrapper wall time). Hosted CI timing is pending for the new head.3249150425a59cf49a9100685abb2b11e397e6ce, preserving upstream's inlined audio-transcript/hex-color handling. At that runtime head, the published source tree matched the locally tested/reviewed tree.518c1140, clicking the guide link navigates from/chat/mainto/chat/multiplayer-agentic-workflows.md#…; the reader fix prevents that navigation.UNC and drive-path checks exercise the rendered-link boundary, not a live Windows filesystem. A previous broader browser-suite attempt stopped during bootstrap and is not relabeled passing. During the expanded proof, native scroll rounding placed a heading at 83.609375 px against an 84 px viewport edge; viewport assertions now compare at CSS-pixel precision. One setup attempt also failed with unpainted text before interaction; the browser flow now awaits font readiness. No product timeout or retry policy was relaxed.
Before
Clicking the heading link exits the reader and navigates to a document-shaped chat route.
After
The sibling document opens at its heading in the existing session.
Scope and simplification
The fix reuses existing workspace preview, navigation, and Markdown-island owners; no replacement reader or route-level filename workaround. Net change against refreshed main: +154 production TypeScript/TSX lines, +280 test lines, +6 documentation lines. Added code carries document context and fragment intent and gives rendered headings local targets. The fixture recreates the reported guide/target names with synthetic content; no private guide content or logs are published.
Worked on by
Work sessions