Commit 602fcb9
committed
Pane state: clear network host on leaving the network volume
`currentNetworkHost` in FilePane was only reset when the user clicked Back inside ShareBrowser. Volume-switches via the picker / breadcrumb / history nav / MCP left the host pinned: re-entering Network re-mounted NetworkMountView with the stale `initialNetworkHost`, which renders ShareBrowser for that host instead of the host list.
In the SMB E2E suite this manifested as a chain: test #4 (`mounting guest share`) opens guest, the next test's beforeEach switches the pane to local, then the test re-selects Network — and lands on ShareBrowser for guest instead of NetworkBrowser. `cmdr://state` then contains the share list of guest's public share, not the 14-host roster, so `state.includes('SMB Test (Guest)') && state.includes('shares=1')` is never true and the spec hits its 30s pollUntil deadline.
Fix: a `$effect` in FilePane clears `currentNetworkHost` whenever `isNetworkView` becomes false. Re-entry now always lands on the host list. This matches the gotcha already documented in `file-explorer/network/CLAUDE.md` ('previous test that mounted a guest share left FilePane stuck on guest').1 parent a1d1994 commit 602fcb9
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
426 | 444 | | |
427 | 445 | | |
428 | 446 | | |
| |||
0 commit comments