mirror of
https://github.com/alphaXiv/OpenResearch.git
synced 2026-11-11 09:59:34 +08:00
Clicking a report.md link an agent inlined into the chat transcript failed with "path must be repo-relative": the report lives in the files dir (<data dir>/files/<slug>/…), but every chat file-open routed through parseFilePath → FileViewer → the repo /file endpoint, which rejects absolute paths. parseFilePath had no files-dir case and FileViewer carried no source discriminator, so files-dir artifacts were unroutable. - Backend surfaces a (non-canonical) absolute filesDir on every project payload via a shared project_json helper, routed through all six emission sites including the SSE project.updated diff — enriching only list_projects would let a bare project clobber filesDir on the next visit. - parseFilePath gains a files-dir branch: exact-prefix match against filesDir (byte-for-byte with the path the agent inlines), plus a /files/<slug>/ suffix-regex fallback for symlink-divergent data dirs. Tabs it produces carry source:"files". - FileViewer branches its fetch by source: files-dir reports via /files/report, other files via /files/file, else the repo endpoint. Files-dir markdown renders through FilesTab's ReportMd (now exported) so report-relative image paths resolve; a missing file shows a friendly not-found; repo-only notes are suppressed. Verified end-to-end: the failing report.md chip now opens the report from the files endpoint with no error.