Skip to content

Fix/workspace pathfix: preserve workspace context for remote file links across web and mobile#119

Merged
GCWing merged 5 commits intoGCWing:mainfrom
wgqqqqq:fix/workspace-path
Mar 12, 2026
Merged

Fix/workspace pathfix: preserve workspace context for remote file links across web and mobile#119
GCWing merged 5 commits intoGCWing:mainfrom
wgqqqqq:fix/workspace-path

Conversation

@wgqqqqq
Copy link
Collaborator

@wgqqqqq wgqqqqq commented Mar 12, 2026

Summary

This PR fixes remote file link handling across the desktop web UI, mobile web, and remote-connect flows.

The main issue was that workspace-relative file paths and backend workspace identifiers were not preserved
consistently, which caused file opens, markdown links, and artifact downloads to break or behave inconsistently in
remote sessions.

What changed

  • preserve backend workspace ids in the web UI state layer instead of reconstructing them from rootPath
  • preserve workspacePath when opening agent-triggered files in the web UI
  • switch chat file-open handling to FileTabManager so agent file navigation keeps the correct workspace context
  • resolve remote artifact paths relative to the session workspace root instead of requiring absolute paths
  • reject relative paths that escape the workspace root
  • pass session_id through mobile file info / chunked file download requests so remote file access resolves
    against the correct session workspace
  • normalize markdown file links in mobile web, including:
    • computer:// and file:// links
    • URL-encoded paths
    • {{workspaceFolder}} placeholders
    • Windows-style absolute paths
  • improve markdown link behavior in web UI so:
    • code-like files still open in the editor
    • non-editable local files are exposed as file links instead of being treated like editable sources

Result

Remote chat messages can now reference workspace files more reliably across clients. Relative artifact links
resolve correctly, downloadable files with encoded or non-ASCII names work in mobile web, and web UI file opens
keep the right workspace context.

wgqqqqq added 5 commits March 12, 2026 09:55
Decode and normalize markdown file hrefs before requesting remote file metadata so relative artifact links with Chinese or URL-encoded names resolve correctly in mobile-web.

Made-with: Cursor
Keep opening code-like files in the editor while sending non-editable local file links to the file explorer so markdown file references behave more predictably in chat.

Made-with: Cursor
@GCWing GCWing merged commit b6ec59c into GCWing:main Mar 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants