Repository navigation
fix: workspace Markdown evidence links open missing conversations - #186642
Conversation
|
🦞👀 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 maintainer review before merge. What this changesResolve authored relative Markdown links from the opened document’s directory while preserving source identity, drafts, and oversized-file downloads. Example: Open reports/review.md and click Evidence.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a concrete Files navigation bug still present on main and resolves the previous catalog-selection finding; no actionable code defects remain, but the aggregate CI gate is red. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Control UI Markdown renderer identifies document links, the existing workspace preview owner resolves them, and Gateway file services authorize reads from the originating session. flowchart LR
A[Markdown document] --> B[Document link renderer]
B --> C[Workspace preview owner]
C --> D[Gateway session authorization]
D --> E[Filesystem or repository reader]
E --> F[Source checked preview]
Technical reviewBest possible solution: Keep document-relative resolution and source validation in the existing Files owners, coordinating overlapping heading-link work with #185080. Do we have a high-confidence way to reproduce the issue? Current-main source lacks document-relative context, matching the linked reproduction and inspected missing-conversation screenshot; no target code was executed during this review. Is this the best way to solve the issue? The smallest complete repair supplies document context to the existing renderer and preview owner, validates the original source before reuse, and retains metadata needed by the existing download fallback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against acf995b62906. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +168, Tests +360, Docs +11, Generated +3, Other +7. Total +549 across 30 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 (4 earlier review cycles)
Reviewed October 28, 2026, 8:54 PM ET / October 29, 2026, 00:54 UTC (Revision 5). |
35ab2d4 to
a0cf45b
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Fixed: Workspace Markdown evidence links open the intended file while preserving source context, read checks and unsaved drafts. |
…enclaw#186642) Workspace Markdown evidence links now open the intended file while preserving document context, native access checks, and unsaved drafts. Fixes openclaw#186640.
Fixes #186640
What Problem This Solves
A workspace Markdown report can contain a relative evidence link such as
evidence/log.md#details. Clicking it in Files resolves against the browser’s chat URL and opens a nonexistent conversation, even though the intended file is readable through the file browser.User Impact
Authored relative links now open the intended file from the report’s directory, including extensionless files and repository-backed previews without a host filesystem root. Files beyond the inline preview limit retain their metadata and download action. The report remains available in its tab, and existing drafts retain their contents. A heading fragment selects the file without adding heading scrolling.
Reads preserve the originating session and current permissions. A changed workspace is refused before another file or cached draft is selected; a missing or denied target restores the report’s catalog selection. Ordinary message links, external URLs, conversation links, fragment-only links, and the Markdown remote-image policy keep their existing handling.
Why This Change Was Made
Files already owns the document’s canonical path and read context. Its renderer opts into document-relative file links, and the existing navigation owner resolves the destination and checks the native source receipt before selecting a preview. The renderer’s cache distinguishes document readers from ordinary messages; host paths stay outside rendered link metadata. Failed navigation publishes the restored selection through the same workspace owner.
Repository reads populate the existing optional source receipt with their workspace ID and null filesystem roots. This distinguishes a retained document from a replacement repository after a source key is reused, while keeping identity stable across ordinary checkpoints. Save and conflict-recovery consumers use that receipt; clients omitting the optional source precondition retain their existing behavior. Request schemas and filesystem grants are unchanged.
Preview-limit errors retain the same optional root/source metadata in their existing details. The UI validates it against the existing file-response schema and keeps it in the download fallback. Error codes, the preview limit and oversized-write behavior remain unchanged.
Evidence
The original native guest report reproduced the wrong conversation destination, and the application regression failed after the click on the base. Corrected reads preserve the target bytes, source tab, conversation URL and workspace identity. Controls cover keyboard activation, parent paths, encoded filename delimiters, extensionless files, missing and escaping targets, source replacement and dirty-target reuse.
Native repository create/delete/create and active/stored-reader tests establish source-key reuse and distinct repository identities. The real application harness with modeled Gateway replies verifies that a retained foreign report cannot select replacement-repository evidence. This is separate from the live guest filesystem proof and makes no live cloud-placement claim.
The final refusal comparison uses the same real Gateway, guest, report and absent target. Before the correction,
session_file_not_foundleaves the report visible but clears its catalog selection; UI2a492b7restores that selection. Native readback confirms the report and workspace identity, and independent filesystem readback confirms all seven fixture files, modes and configuration unchanged. A delayedAccess deniedapplication regression separately verifies the same recovery with modeled Gateway replies.Changed-file formatting/lint, generated-validator freshness, package boundaries and selected types pass. The broader correction qualified 403 cases across 27 affected files; integration qualified 227 cases across 14 files. The final refusal correction passed 126 cases across six files, including all ten file-link browser cases. These are successive scoped runs, with unchanged results retained at their recorded revisions. Current-head hosted tests, build, lint and types passed; the baseline-ratchet job reports 14 unrelated mock-export failures reproduced on the unchanged target ancestry with matching causal inputs. Its aggregate CI gate remains red under that attribution.
The native oversized-file proof preserves the 300 KiB file’s preview-limit error, opens its metadata/download panel, downloads the exact original bytes and returns to the report. Earlier captures retain their actual revisions: normal navigation at UI
2cfdf0e, and oversized download at UI/Gateway6d13fb3. Source and consumer checks qualify their continued applicability; they are not pixel-identical captures of the current shell.Visual evidence
Native missing-file refusal restores the report selection
refusal-focused.webm
Visual verification
2a492b773e3ad1e8a280e32ac8c78805129fa8f3