Skip to content

[AGE-4111] fix(frontend): open absolute file paths in Files - #6009

Merged
mmabrouk merged 1 commit into
release/v0.112.1from
agent/fix-absolute-chat-file-links
Aug 13, 2026
Merged

[AGE-4111] fix(frontend): open absolute file paths in Files#6009
mmabrouk merged 1 commit into
release/v0.112.1from
agent/fix-absolute-chat-file-links

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

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 to README.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:

When you mention a local file in your response, use a clickable Markdown link whose target is the file's full absolute path.

The instruction uses the existing fenced platform-guidance block. It does not modify or persist into the user's authored AGENTS.md.

Before:

[README](/tmp/agenta/mounts/project/session/notes/README.md)

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-fix
  • cd web && pnpm --filter @agenta/oss exec tsc --noEmit
  • cd services/runner && pnpm exec vitest run tests/unit/agent-mount-guidance.test.ts
  • cd services/runner && pnpm run typecheck
  • The focused frontend Vitest file currently fails during dependency import with the repository test-environment error jsxDEV is not a function; it collects zero tests.

How to review

  1. Review chatFileRefs.tsx and its tests for preservation of absolute paths.
  2. Review markdown.tsx for the unresolved-local-path fallback.
  3. Review platform-guidance.ts and the runner test for the cross-harness instruction.

Stacked on #6008. Addresses #5983.

@linear-code

linear-code Bot commented Aug 13, 2026

Copy link
Copy Markdown

AGE-4111

@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Blocked Blocked Aug 13, 2026 11:35am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • release/.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 3fcfe903-4fc4-46c0-831b-d13fb1fbbf73

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk
mmabrouk marked this pull request as ready for review August 13, 2026 14:09
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. bug frontend labels Aug 13, 2026
@mmabrouk
mmabrouk changed the base branch from fix/age-4116-chat-file-link-wrong-file to release/v0.112.1 August 13, 2026 14:10
@mmabrouk
mmabrouk merged commit a3e118e into release/v0.112.1 Aug 13, 2026
36 of 37 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-6009.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-6009-fc66cf9
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-08-13T14:20:25.938Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug frontend size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant