Commit 332c65a
Prevent collapsing all channels - ensure at least one remains expanded
Resolves issue where collapsing all channels would result in an empty window
with no way to recover. The last remaining expanded channel is now protected
from being collapsed.
Changes:
- Added logic in toggleChannelCollapse to check if collapsing would hide all channels
- If attempting to collapse the last expanded channel, the action is prevented
- Added disabled state to collapse button when it's the last expanded channel
- Button shows tooltip "Cannot collapse last channel" when disabled
- Added CSS for disabled button state (reduced opacity, not-allowed cursor)
- Expanding channels is always allowed regardless of state
This ensures users always have at least one visible channel to interact with
and prevents the unrecoverable empty window state.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent c847596 commit 332c65a
File tree
2 files changed
+28
-2
lines changed- benchmesh-serial-service/frontend/src/ui/workbench/EditorArea
2 files changed
+28
-2
lines changedLines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
91 | 95 | | |
| 96 | + | |
92 | 97 | | |
93 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
94 | 104 | | |
95 | 105 | | |
96 | 106 | | |
| |||
118 | 128 | | |
119 | 129 | | |
120 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
121 | 135 | | |
122 | 136 | | |
123 | 137 | | |
| |||
136 | 150 | | |
137 | 151 | | |
138 | 152 | | |
139 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
140 | 161 | | |
141 | 162 | | |
142 | 163 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
| |||
0 commit comments