fix(frontend): drive latest-edited symlink + open nested file links in Files - #5523
Draft
ardaerzin wants to merge 1 commit into
Draft
fix(frontend): drive latest-edited symlink + open nested file links in Files#5523ardaerzin wants to merge 1 commit into
ardaerzin wants to merge 1 commit into
Conversation
…n Files Two drive UX bugs on the chat/config file surfaces: - The summary "latest edited files" fallback listed the cwd top level, which includes the `agent-files` fold SYMLINK — so it surfaced the bare symlink row instead of real files. The full drive already drops it; the summary didn't. Added one shared `isAgentFilesFold(path)` predicate, applied in the full drive and both summary lists so the fold marker is dropped consistently. - File mentions in a reply only opened in Files when written as inline code; a markdown link `[x](path)` went straight to a new tab, so nested / `NN-name/` paths (which the model tends to emit as links) never reached the resolver. `Anchor` now routes a RELATIVE href through the same file resolver: a real drive file becomes the in-Files chip, and a real URL / fragment / non-file falls back to the plain external link. Fixes #5480 Fixes #5481
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI 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:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Two drive file-surface bugs reported after 105.8.
agent-filessymlink row instead of real files ([bug] Latest edited files view showsagent-filessymlink #5480). The agent's durable mount is folded into the drive under anagent-files/symlink; the full drive drops that fold entry, but the summary's recents fallback (the cwd top-level listing) did not, so the bare symlink surfaced.NN-name/paths (which the model tends to render as links) always bypassed the resolver.Changes
Added one shared
isAgentFilesFold(path)predicate and applied it in the full drive and both summary lists, so the fold marker is dropped consistently.Before: the recents fallback = the cwd top level, which includes
agent-files(the symlink) → shown as a row.After: the
agent-filesfold marker is filtered everywhere; recents show real files (or the record-log edits).Anchorin the chat markdown renderer now routes a RELATIVE href through the same file resolver the inline-code path uses.Before:
[plan](03-gtm/plan.md)→<a target="_blank">(new tab).After: a relative href that names a real drive file → the in-Files chip; a
scheme:URL,//host,#fragment, or an unresolved path → the plain external link (label preserved).Scope note for #5480 (please read before QA)
This PR removes the misleading
agent-filessymlink row. It does NOT change where the "latest edited files" list gets its data. That list is sourced from the session RECORD LOG (the agent's write/edit tool events), with the cwd top-level listing as a fallback when the record log is empty. The agent's durable edits live in the agent mount and only reach this list via the record log.Consequence: if a session's record log captured no write/edit events, the list falls back to the cwd top level (now correctly WITHOUT the
agent-filesrow) instead of showing the agent's edits, so it can look sparse or empty. That emptiness is a separate, data-dependent issue (whether the record log captured that session's writes) and is NOT addressed here. If it shows up on a real session, diagnosing it needs that session's record data to trace the record path. Flag such a session and it can be investigated as a follow-up.Tests
pnpm --filter @agenta/oss exec eslintclean;tsc --noEmitreports no new errors, none in the touched files.What to QA
agent-filesrow.03-gtm/plan.md) as a link, click it. It opens in Files (Quick Look), not a new tab, when that file exists in the drive.https://...) in a reply still opens in a new tab; a made-up relative path stays a plain link.agent-filessymlink #5480" above: a sparse/empty "latest edited" list on a session with no recorded write/edit events is expected and out of scope for this PR.Fixes #5480
Fixes #5481