Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 38f3999

Browse filesBrowse files
fix: lower workspace sidebar minimum width from 25 to 15 columns (#236)
Reduces the drag clamp from 20% to 10% and the render-time floor from 25 to 15 columns so the sidebar can be shrunk further. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cf20dde commit 38f3999
Copy full SHA for 38f3999

4 files changed

+11-11Lines changed: 11 additions & 11 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎internal/plugins/workspace/interactive.go‎

Copy file name to clipboardExpand all lines: internal/plugins/workspace/interactive.go
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,8 @@ func (p *Plugin) calculatePreviewDimensions() (width, height int) {
519519
// Account for sidebar and divider (same calculation as renderListView)
520520
available := p.width - dividerWidth
521521
sidebarW := (available * p.sidebarWidth) / 100
522-
if sidebarW < 25 {
523-
sidebarW = 25
522+
if sidebarW < 15 {
523+
sidebarW = 15
524524
}
525525
if sidebarW > available-40 {
526526
sidebarW = available - 40
@@ -1121,8 +1121,8 @@ func (p *Plugin) interactiveMouseCoords(x, y int) (col, row int, ok bool) {
11211121
if p.sidebarVisible {
11221122
available := p.width - dividerWidth
11231123
sidebarW := (available * p.sidebarWidth) / 100
1124-
if sidebarW < 25 {
1125-
sidebarW = 25
1124+
if sidebarW < 15 {
1125+
sidebarW = 15
11261126
}
11271127
if sidebarW > available-40 {
11281128
sidebarW = available - 40
Collapse file

‎internal/plugins/workspace/interactive_test.go‎

Copy file name to clipboardExpand all lines: internal/plugins/workspace/interactive_test.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,8 +1187,8 @@ func TestCalculatePreviewDimensions_WidthConsistency(t *testing.T) {
11871187
// Sidebar visible: same calculation as in renderListView
11881188
available := tt.totalWidth - dividerWidth
11891189
sidebarW := (available * p.sidebarWidth) / 100
1190-
if sidebarW < 25 {
1191-
sidebarW = 25
1190+
if sidebarW < 15 {
1191+
sidebarW = 15
11921192
}
11931193
if sidebarW > available-40 {
11941194
sidebarW = available - 40
Collapse file

‎internal/plugins/workspace/mouse.go‎

Copy file name to clipboardExpand all lines: internal/plugins/workspace/mouse.go
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -971,9 +971,9 @@ func (p *Plugin) handleMouseDrag(action mouse.MouseAction) tea.Cmd {
971971
startValue := p.mouseHandler.DragStartValue()
972972
newWidth := startValue + (action.DragDX * 100 / p.width) // Convert px delta to %
973973

974-
// Clamp to reasonable bounds (20% - 60%)
975-
if newWidth < 20 {
976-
newWidth = 20
974+
// Clamp to reasonable bounds (10% - 60%)
975+
if newWidth < 10 {
976+
newWidth = 10
977977
}
978978
if newWidth > 60 {
979979
newWidth = 60
Collapse file

‎internal/plugins/workspace/view_list.go‎

Copy file name to clipboardExpand all lines: internal/plugins/workspace/view_list.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ func (p *Plugin) renderListView(width, height int) string {
139139
// RenderPanel handles borders internally, so only subtract divider from available space
140140
available := width - dividerWidth
141141
sidebarW := (available * p.sidebarWidth) / 100
142-
if sidebarW < 25 {
143-
sidebarW = 25
142+
if sidebarW < 15 {
143+
sidebarW = 15
144144
}
145145
if sidebarW > available-40 {
146146
sidebarW = available - 40

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.