[PR #6569] Fix/web file viewer project root #11983

Closed
opened 2026-02-16 18:16:55 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6569

State: closed
Merged: No


Fixed file viewer issues for project root and nested directories by adding request deduplication and improving path handling.

Added loading Map to deduplicate concurrent file read requests, preventing duplicate SDK calls for the same file
Added listing Map to deduplicate concurrent directory list requests
Fixed empty path handling in list() function to properly handle project root (changed path + "/" to path ? path + "/" : "")
Simplified fetch() to always call list(parent) regardless of whether parent is empty, ensuring proper directory listing for root-level files

Before:

https://github.com/user-attachments/assets/6b597f4f-d730-4693-8586-e662db4958e5

After:

https://github.com/user-attachments/assets/529c9252-2d10-4a4c-9f69-de6c59783782

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6569 **State:** closed **Merged:** No --- Fixed file viewer issues for project root and nested directories by adding request deduplication and improving path handling. Added loading Map to deduplicate concurrent file read requests, preventing duplicate SDK calls for the same file Added listing Map to deduplicate concurrent directory list requests Fixed empty path handling in list() function to properly handle project root (changed path + "/" to path ? path + "/" : "") Simplified fetch() to always call list(parent) regardless of whether parent is empty, ensuring proper directory listing for root-level files Before: https://github.com/user-attachments/assets/6b597f4f-d730-4693-8586-e662db4958e5 After: https://github.com/user-attachments/assets/529c9252-2d10-4a4c-9f69-de6c59783782
yindo added the pull-request label 2026-02-16 18:16:55 -05:00
yindo closed this issue 2026-02-16 18:16:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11983