You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: exclude hidden directories when drag-dropping folders into virtualTabs panel (#45)
* Initial plan
* Fix: skip hidden files/folders when expanding directories on drag-and-drop
Agent-Logs-Url: https://github.com/winterdrive/vscode-virtual-tabs/sessions/006c1e08-f3d7-4853-9d32-f692a1c9d096
Co-authored-by: winterdrive <90021888+winterdrive@users.noreply.github.com>
* Fix: skip only hidden directories (not hidden files) on drag-and-drop expansion
Agent-Logs-Url: https://github.com/winterdrive/vscode-virtual-tabs/sessions/73200347-ea31-4051-9259-cc7ff190fca0
Co-authored-by: winterdrive <90021888+winterdrive@users.noreply.github.com>
* feat: add end-to-end tests for Scope Filter UI behavior and unit tests for scope management logic
- Implemented E2E tests for Scope Filter UI behavior covering various scenarios including built-in and repo scopes.
- Added unit tests for addGroup scope decision logic to ensure correct behavior based on active scopes.
- Created tests for built-in group initialization conditions to verify proper handling of existing user groups.
- Developed migration tests for transitioning from single to multiple active scopes.
- Added tests for computing scope descriptions based on active scopes.
- Implemented tests for root tree structure after applying scope filters to validate node types and order.
- Updated existing tests to reflect changes in the visibility of the Add Group button in multi-root workspaces.
* fix: add missing export statements in unit test files
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: winterdrive <90021888+winterdrive@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,16 @@
2
2
3
3
All notable changes to the "VirtualTabs" extension will be documented in this file.
4
4
5
+
## [Unreleased]
6
+
7
+
### Changed
8
+
9
+
- Multi-root workspace: the panel title **Add Group** (`+`) button is now hidden. Each project scope's inline button handles group creation instead, keeping the action close to the target scope. Single-root workspaces are unaffected and still show the panel title button.
10
+
11
+
### Fixed
12
+
13
+
- Directory drag-and-drop now skips hidden directories whose names start with `.`, while still including dotfiles such as `.gitignore` and `.editorconfig`.
*`test-resources/multi-root/` is a committed fixture workspace used by the multi-root UI/E2E tests.
171
171
* The multi-root fixture verifies that VirtualTabs renders one scope section per discovered project and persists new groups only to the selected repo's `.vscode/virtualTab.json`.
172
172
173
+
#### VS Code Version Pinning (`-c 1.96.0`)
174
+
175
+
The test script is pinned to VS Code **1.96.0**. VS Code 1.100+ (verified on 1.120.0) changed its release archive to a nested hash-subfolder structure that breaks `extest`'s ChromeDriver bootstrap, causing a crash before any test runs. Do not bump this version without first verifying that the new release is compatible with `vscode-extension-tester`.
176
+
177
+
#### E2E Test Gotchas
178
+
179
+
**1. Do not rely on FileSystemWatcher for test state changes.**
180
+
181
+
When a test writes a fixture config file and then expects the extension to pick up the change, the FileSystemWatcher's fire timing is non-deterministic in a ChromeDriver-controlled VS Code instance (and can be blocked entirely by the `isInternalSaving` flag). Instead, **click the Refresh toolbar button** after writing the fixture — `reinitializeScopes()` reads from disk synchronously and is guaranteed to see the new content.
182
+
183
+
```ts
184
+
// ❌ Fragile — watcher may not fire in time
185
+
writeConfig(repoAConfigPath, [...]);
186
+
awaitwaitForTreeLabel('My Group'); // may time out
187
+
188
+
// ✅ Reliable — Refresh reads from disk immediately
189
+
writeConfig(repoAConfigPath, [...]);
190
+
awaitclickToolbarButton(sidebar,/refresh/i);
191
+
awaitwaitForTreeLabel('My Group');
192
+
```
193
+
194
+
**2. QuickPick interactions must use Selenium `element.click()`, not `executeScript` DOM click.**
195
+
196
+
VS Code's `canPickMany` QuickPick widget listens for real browser events. A click injected via `driver.executeScript('arguments[0].click()', el)` bypasses VS Code's event system and leaves checkboxes in their current state. Always use `await row.click()` (Selenium WebDriver native click) when toggling QuickPick items.
197
+
198
+
**3. Wrap toolbar button clicks in a `driver.wait()` retry loop.**
199
+
200
+
After a `reinitializeScopes()` call the tree re-renders, invalidating existing Selenium element references (`StaleElementReferenceError`). `clickToolbarButton` already handles this with an internal retry loop — do not remove it.
201
+
173
202
### Test Source Layout
174
203
175
204
```text
@@ -488,6 +517,60 @@ flowchart TD
488
517
489
518
---
490
519
520
+
---
521
+
522
+
## 🤝 AI-Assisted Development Notes
523
+
524
+
When collaborating with an AI assistant (Claude Code, Copilot, Cursor, etc.) on this project:
525
+
526
+
**Always run commands yourself in the VS Code terminal — do not let the AI execute them in a sandbox.**
527
+
528
+
AI assistants may default to running shell commands (`npm run test:ui`, `git`, etc.) inside an isolated sandbox environment. Sandbox runs are invisible to the real VS Code instance, cannot interact with the extension host, and produce misleading results for UI/E2E tests. Instead, instruct the AI to output the command and have you paste it into the integrated terminal manually.
529
+
530
+
> Suggested instruction when starting a session:
531
+
> *"Output all terminal commands for me to run in VS Code's integrated terminal. Do not execute them yourself."*
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ In MVC/MVVM or large-scale projects, related files are often scattered across de
87
87
### ⚡ Workflow Boosters
88
88
89
89
-**Smart Copy Menu** — Unified copy options for names, paths, and total file content.
90
-
-**Directory Drag & Drop** — Drag folders to add all files recursively.
90
+
-**Directory Drag & Drop** — Drag folders to add files recursively while skipping hidden directories.
91
91
-**Clipboard Operations** — Full Cut/Copy/Paste support for files and groups.
92
92
-**Smart Organization** — Auto-group by extension, date, or sort by various criteria.
93
93
@@ -98,12 +98,12 @@ In MVC/MVVM or large-scale projects, related files are often scattered across de
98
98
### 📁 Group Management
99
99
100
100
-**Create/Rename**: Right-click panel or groups to manage.
101
-
-**Multi-root scopes**: In a multi-root workspace, each detected project appears as its own section. Use the scope header to add a group, open that scope's config, reveal its storage, or clear only that scope.
101
+
-**Multi-root scopes**: In a multi-root workspace, each detected project appears as its own section. Use the inline **Add Group** button on the scope header to create groups; the panel title `+` button is intentionally hidden in multi-root mode to keep group creation scoped to the correct project. In single-root mode the panel title button is still present.
102
102
-**Sub-Groups**: Right-click a group → **Add Sub-Group** (or drag one group into another).
103
103
-**Auto-Sync**: The built-in "Open Editors" group automatically tracks your native tabs.
104
104
-**Drag & Drop**:
105
105
-**Files**: Drag files from Explorer into groups.
106
-
-**Folders**: Drag folders to recursively add all files inside.
106
+
-**Folders**: Drag folders to recursively add files inside; directories whose names start with `.` are skipped, while dotfiles such as `.gitignore` are still included.
107
107
-**Multi-select**: Hold `Ctrl/Cmd` to drag multiple files at once.
108
108
109
109

Copy file name to clipboardExpand all lines: docs/llms-full.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ In MVC/MVVM or large-scale projects, related files are often scattered across de
91
91
### ⚡ Workflow Boosters
92
92
93
93
- **Smart Copy Menu** — Unified copy options for names, paths, and total file content.
94
-
- **Directory Drag & Drop** — Drag folders to add all files recursively.
94
+
- **Directory Drag & Drop** — Drag folders to add files recursively while skipping hidden directories.
95
95
- **Clipboard Operations** — Full Cut/Copy/Paste support for files and groups.
96
96
- **Smart Organization** — Auto-group by extension, date, or sort by various criteria.
97
97
@@ -107,7 +107,7 @@ In MVC/MVVM or large-scale projects, related files are often scattered across de
107
107
- **Auto-Sync**: The built-in "Open Editors" group automatically tracks your native tabs.
108
108
- **Drag & Drop**:
109
109
- **Files**: Drag files from Explorer into groups.
110
-
- **Folders**: Drag folders to recursively add all files inside.
110
+
- **Folders**: Drag folders to recursively add files inside; directories whose names start with `.` are skipped, while dotfiles such as `.gitignore` are still included.
111
111
- **Multi-select**: Hold `Ctrl/Cmd` to drag multiple files at once.
112
112
113
113

0 commit comments