Commit a77a4b5
committed
fix: compute envModeItems dynamically so trigger label matches dropdown label
The envModeItems array was a static module-level constant that always
resolved the 'local' label to 'Current checkout'. When a worktree is
active, the dropdown item rendered 'Current worktree' via
resolveCurrentWorkspaceLabel(), creating a mismatch with the trigger.
Move envModeItems inside the component as a useMemo that depends on
activeWorktreePath, using resolveCurrentWorkspaceLabel() for the local
item label so both the trigger and dropdown stay in sync.1 parent 638670c commit a77a4b5
1 file changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 19 | | |
25 | 20 | | |
26 | 21 | | |
| |||
34 | 29 | | |
35 | 30 | | |
36 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
0 commit comments