@@ -167,7 +167,7 @@ func RenderFocusView(mysis MysisInfo, logs []LogEntry, width, height int, isLoad
167167 }
168168
169169 // RenderFocusViewWithViewport renders the detailed mysis view using a scrollable viewport.
170-func RenderFocusViewWithViewport(mysis MysisInfo, vp viewport.Model, width int, isLoading bool, spinnerView string, verbose bool, totalLines int, focusIndex, totalMyses int, currentTick int64, gameStateSnapshots []*store.GameStateSnapshot, err error) string {
170+func RenderFocusViewWithViewport(mysis MysisInfo, vp viewport.Model, width int, isLoading bool, spinnerView string, verbose bool, totalLines int, focusIndex, totalMyses int, currentTick int64, gameStateSnapshots []*store.GameStateSnapshot, sidebarScrollOffset int, err error) string {
171171 var sections []string
172172
173173 // Header with mysis name - spans full width (2 lines)
@@ -199,7 +199,7 @@ func RenderFocusViewWithViewport(mysis MysisInfo, vp viewport.Model, width int,
199199 // Two-column layout: Game State Sidebar | Conversation Log
200200 // Sidebar takes 33% of terminal width (multiply first to avoid precision loss)
201201 sidebarWidth := (width * 33) / 100 // Total width including border
202- const columnGap = 2 // Gap between columns
202+ const columnGap = 3 // Gap between columns (space + │ + space)
203203 conversationWidth := width - sidebarWidth - columnGap
204204
205205 // Conversation title with scroll indicator
@@ -216,21 +216,69 @@ func RenderFocusViewWithViewport(mysis MysisInfo, vp viewport.Model, width int,
216216 // Game state title
217217 gameStateTitle := renderSectionTitle("GAME STATE", sidebarWidth)
218218
219- // Render game state sidebar content (returns lines without border)
220- gameStateSidebarContent := renderGameStateSidebar(gameStateSnapshots, currentTick, sidebarWidth)
219+ // Render game state sidebar content directly (no border, just content + scrollbar)
220+ // Content width: sidebarWidth - leftPadding(1) - scrollbar(1)
221+ const sidebarScrollbarWidth = 1 // "█" or "│"
222+ const sidebarLeftPadding = 1 // Space on left edge
223+ sidebarContentWidth := sidebarWidth - sidebarLeftPadding - sidebarScrollbarWidth
224+ gameStateSidebarAllContent := renderGameStateSidebar(gameStateSnapshots, currentTick, sidebarContentWidth)
225+ sidebarTotalLines := len(gameStateSidebarAllContent)
226+
227+ // Clip sidebar content to viewport height
228+ sidebarHeight := vp.Height
229+ gameStateSidebarContent := gameStateSidebarAllContent
230+
231+ // Clip to visible area if content exceeds height
232+ if len(gameStateSidebarAllContent) > sidebarHeight {
233+ startLine := sidebarScrollOffset
234+ endLine := sidebarScrollOffset + sidebarHeight
235+ if startLine < 0 {
236+ startLine = 0
237+ }
238+ if endLine > len(gameStateSidebarAllContent) {
239+ endLine = len(gameStateSidebarAllContent)
240+ startLine = endLine - sidebarHeight
241+ if startLine < 0 {
242+ startLine = 0
243+ }
244+ }
245+ gameStateSidebarContent = gameStateSidebarAllContent[startLine:endLine]
246+ }
247+
248+ // Render sidebar scrollbar
249+ sidebarScrollbarStr := renderScrollbar(sidebarHeight, sidebarTotalLines, sidebarScrollOffset)
250+ sidebarScrollbarLines := strings.Split(sidebarScrollbarStr, "\n")
251+
252+ // Build sidebar lines with scrollbar (no border)
253+ gameStateSidebarLines := make([]string, sidebarHeight)
254+
255+ for i := 0; i < sidebarHeight; i++ {
256+ var contentLine string
257+ if i < len(gameStateSidebarContent) {
258+ contentLine = gameStateSidebarContent[i]
259+ } else {
260+ contentLine = ""
261+ }
221262
222- // Render sidebar with border using lipgloss
223- // Width() sets CONTENT width, padding is added on top, border is INCLUDED in width
224- // So: content_width + padding(2) = sidebarWidth
225- // Therefore: content_width = sidebarWidth - 2
226- sidebarStyle := lipgloss.NewStyle().
227- Border(lipgloss.RoundedBorder()).
228- BorderForeground(colorBorder).
229- Width(sidebarWidth-2). // -2 for padding (border is included in width)
230- Padding(0, 1) // 1 space padding on left/right
263+ // Pad content to fill width
264+ contentWidth := lipgloss.Width(contentLine)
265+ padding := sidebarContentWidth - contentWidth
266+ if padding < 0 {
267+ padding = 0
268+ }
269+ contentLine = contentLine + strings.Repeat(" ", padding)
231270
232- sidebarRendered := sidebarStyle.Render(strings.Join(gameStateSidebarContent, "\n"))
233- gameStateSidebarLines := strings.Split(sidebarRendered, "\n")
271+ // Add scrollbar
272+ var scrollLine string
273+ if i < len(sidebarScrollbarLines) {
274+ scrollLine = sidebarScrollbarLines[i]
275+ } else {
276+ scrollLine = " "
277+ }
278+
279+ // Add left padding space
280+ gameStateSidebarLines[i] = " " + contentLine + scrollLine
281+ }
234282
235283 // Render scrollbar based on viewport state
236284 scrollOffset := vp.YOffset
@@ -262,10 +310,14 @@ func RenderFocusViewWithViewport(mysis MysisInfo, vp viewport.Model, width int,
262310 conversationView := logStyle.Width(conversationWidth).Render(conversationContent)
263311 conversationViewLines := strings.Split(conversationView, "\n")
264312
265- // Combine titles
313+ // Vertical border between columns
314+ verticalBorderStyle := lipgloss.NewStyle().Foreground(colorBorder) // Purple-tinted border
315+ verticalBorder := verticalBorderStyle.Render("│")
316+
317+ // Combine titles with vertical border
266318 titleRow := lipgloss.JoinHorizontal(lipgloss.Top,
267319 gameStateTitle,
268- strings.Repeat(" ", columnGap),
320+ " "+verticalBorder+" ",
269321 logTitle,
270322 )
271323 sections = append(sections, titleRow)
@@ -293,15 +345,21 @@ func RenderFocusViewWithViewport(mysis MysisInfo, vp viewport.Model, width int,
293345
294346 combinedLine := lipgloss.JoinHorizontal(lipgloss.Top,
295347 leftLine,
296- strings.Repeat(" ", columnGap),
348+ " "+verticalBorder+" ",
297349 rightLine,
298350 )
299351 sections = append(sections, combinedLine)
300352 }
301353
302- // Bottom border for conversation log - matches top border style
354+ // Bottom borders for both sidebar and conversation log with vertical border
355+ sidebarBottomBorder := renderSectionTitle("", sidebarWidth)
303356 logBottomBorder := renderSectionTitle("", conversationWidth)
304- sections = append(sections, strings.Repeat(" ", sidebarWidth)+strings.Repeat(" ", columnGap)+logBottomBorder)
357+ bottomRow := lipgloss.JoinHorizontal(lipgloss.Top,
358+ sidebarBottomBorder,
359+ " "+verticalBorder+" ",
360+ logBottomBorder,
361+ )
362+ sections = append(sections, bottomRow)
305363
306364 // Footer with scroll hints, verbose toggle, and error status
307365 verboseHint := ""