[AGE-4111] fix(frontend): open absolute file paths in Files - #6009
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Railway Preview Environment
|
An agent could provide the correct absolute path, such as
/tmp/agenta/mounts/.../notes/README.md, but clicking it could navigate the browser to that path on the Agenta host instead of opening Files. Agents also often shortened references toREADME.md, which leaves the client unable to identify the intended file.This follow-up preserves the leading slash so the Files pane can match the complete tool path against the mount-relative file. If an absolute local path cannot be resolved, its label stays inert instead of becoming browser navigation.
The runner now appends one platform instruction after the authored instructions for every harness:
The instruction uses the existing fenced platform-guidance block. It does not modify or persist into the user's authored
AGENTS.md.Before:
An unresolved path opened
https://<agenta-host>/tmp/agenta/mounts/....After:
The same path opens the matching file in Files when records prove the match. An unresolved absolute path no longer navigates away from chat.
Tests
cd web && pnpm lint-fixcd web && pnpm --filter @agenta/oss exec tsc --noEmitcd services/runner && pnpm exec vitest run tests/unit/agent-mount-guidance.test.tscd services/runner && pnpm run typecheckjsxDEV is not a function; it collects zero tests.How to review
chatFileRefs.tsxand its tests for preservation of absolute paths.markdown.tsxfor the unresolved-local-path fallback.platform-guidance.tsand the runner test for the cross-harness instruction.Stacked on #6008. Addresses #5983.