mirror of
https://github.com/awizemann/scarf.git
synced 2026-05-10 02:26:37 +00:00
fix(projects): clamp Sessions tab height so it doesn't push the window
The new Sessions tab's outer VStack had no maxHeight constraint.
Its inner `List(sessions) { … }` uses intrinsic content size — which
grows with the row count — and with enough sessions the enclosing
VStack would push the project window past the bottom of the screen.
Fixed by adding `.frame(maxWidth: .infinity, maxHeight: .infinity)`
to the outer VStack in `ProjectSessionsView.body`, matching the
pattern `siteTab` uses for its webview. Now the List fills the
available tab area and scrolls internally as expected.
Other v2.3 tabs already self-constrain (`widgetsTab` via ScrollView,
`siteTab` via explicit maxHeight). This brings Sessions in line.
80/80 Swift tests still pass. Visual-only fix; no test change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,13 @@ struct ProjectSessionsView: View {
|
||||
Divider()
|
||||
content
|
||||
}
|
||||
// Without this clamp the inner List's intrinsic height grows
|
||||
// with its row count and the enclosing VStack pushes the
|
||||
// window itself past the screen. Other tabs handle this via
|
||||
// their own container (widgetsTab = ScrollView, siteTab =
|
||||
// explicit maxHeight) — match the siteTab pattern here so
|
||||
// the List scrolls internally.
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.task(id: project.id) {
|
||||
// Rebuild the VM when the project changes so stale state
|
||||
// from a previously-selected project doesn't bleed
|
||||
|
||||
Reference in New Issue
Block a user