[PR #11685] fix(app): scroll to active tab when clicked (fixes #11674) #13899

Open
opened 2026-02-16 18:18:43 -05:00 by yindo · 0 comments
Owner

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

State: open
Merged: No


Fixes #11674
Fixes #11687

Summary

Two fixes:

  1. #11674: When clicking on an overflowed tab in the file view/review section, the tab is now scrolled into view so the close button becomes accessible. This extends the existing tab scrolling functionality from PR #11070.

  2. #11687: Added validation to detect paths containing "USERNAME" which may indicate an unexpanded environment variable or corrupted patch on Windows. This helps diagnose the apply_patch verification failed error.

Changes

Issue #11674 (scroll to active tab when clicked)

  • Adds a createEffect that watches the active tab
  • When the active tab changes (e.g., user clicks on a tab), it checks if the tab is overflowed
  • If overflowed, it scrolls the tab into view smoothly

Issue #11687 (validate paths for unexpanded environment variables)

  • Adds path validation at the beginning of the patch processing loop to check for "USERNAME" in paths on Windows
  • Throws a descriptive error message indicating the path may contain an unexpanded environment variable or corrupted patch
  • Separated error messages for "file not found" vs "path is a directory" for clearer diagnostics

Testing

Issue #11674:

  • Open multiple file tabs until they overflow the visible area
  • Click on a partially-hidden tab on the right side
  • The tab should scroll into full view, making the close button accessible

Issue #11687:

  • The fix validates paths before attempting to read them, catching potential issues early with helpful error messages.
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11685 **State:** open **Merged:** No --- Fixes #11674 Fixes #11687 ## Summary Two fixes: 1. **#11674**: When clicking on an overflowed tab in the file view/review section, the tab is now scrolled into view so the close button becomes accessible. This extends the existing tab scrolling functionality from PR #11070. 2. **#11687**: Added validation to detect paths containing "USERNAME" which may indicate an unexpanded environment variable or corrupted patch on Windows. This helps diagnose the apply_patch verification failed error. ## Changes ### Issue #11674 (scroll to active tab when clicked) - Adds a createEffect that watches the active tab - When the active tab changes (e.g., user clicks on a tab), it checks if the tab is overflowed - If overflowed, it scrolls the tab into view smoothly ### Issue #11687 (validate paths for unexpanded environment variables) - Adds path validation at the beginning of the patch processing loop to check for "USERNAME" in paths on Windows - Throws a descriptive error message indicating the path may contain an unexpanded environment variable or corrupted patch - Separated error messages for "file not found" vs "path is a directory" for clearer diagnostics ## Testing ### Issue #11674: - Open multiple file tabs until they overflow the visible area - Click on a partially-hidden tab on the right side - The tab should scroll into full view, making the close button accessible ### Issue #11687: - The fix validates paths before attempting to read them, catching potential issues early with helpful error messages.
yindo added the pull-request label 2026-02-16 18:18:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13899