fix: widen instances panel so tool preview + approval buttons don't clip

Active sessions with a tool call preview + inline approval buttons can
render ~130pt tall, but the panel height used perSession=65 + baseHeight=100
which left only ~115pt of ScrollView area after header + bottom padding.
The bottom row ended up under the buddy/stats overlay even though the
ScrollView could technically scroll to it.

Bumps to baseHeight=120 / perSession=100 — gives 1 session 220pt, 2 sessions
320pt, etc. Still capped by expandedMax so large session counts still fit
inside 65% of screen height.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
徐翔宇 2026-04-19 00:09:22 +08:00
parent a547d43470
commit 38aad3be51

View file

@ -132,8 +132,8 @@ class NotchViewModel: ObservableObject {
height: min(screenRect.height * 0.78, 780)
)
case .instances:
let baseHeight: CGFloat = 100
let perSession: CGFloat = 65
let baseHeight: CGFloat = 120
let perSession: CGFloat = 100
let contentHeight = baseHeight + CGFloat(sessionCount) * perSession
// 4 sessions: fit content + room for buddy; >4: capped unless expanded
let compactMax: CGFloat = 360