Skip to content

fix(gui): stop the simulator table overflowing the window - #70

Open
rcd-ios wants to merge 1 commit into
MobAI-App:mainfrom
rcd-ios:fix/gui-window-overflow
Open

rcd-ios wants to merge 1 commit into
MobAI-App:mainfrom
rcd-ios:fix/gui-window-overflow

Conversation

@rcd-ios

@rcd-ios rcd-ios commented Nov 14, 2026

Copy link
Copy Markdown

What

The GUI lays out ~1371pt of content into a window that is 1260pt by default and can shrink to 1080pt, so NavigationSplitView centres the overflow: the sidebar is clipped on the left and the trailing table columns and toolbar items on the right. Because tableHeader and SimulatorRow are independent HStacks that line up only through hard-coded widths, the same overflow also drags the RAM values out from under their header.

Fixes #69

How

  • tableHeader and SimulatorRow now read one private TableColumn enum of widths, so a header and its values cannot drift apart again.
  • The fixed columns are trimmed so the detail pane fits inside the 1080pt window minimum. The flexible Simulator column absorbs the slack, so at ordinary window widths the table looks the same as before.
  • The sidebar's minimum width goes from 340 to 300.
  • Long simulator and runtime names now truncate with a tooltip instead of widening the row.

The detail pane's minimum drops from ~930pt to ~760pt, which leaves ~1060pt total against the 1080pt window minimum.

Testing

Verified on macOS 27.2 (26B123), Xcode 27.2 (27B52), iOS 27.2 runtime, at the default 1260x820 window:

  • xcrun swift-format lint --strict gui/ContentView.swift — no findings
  • make app — builds clean under -warnings-as-errors
  • Accessibility-tree check on the running build: no element laid out outside the window on either edge. Before the change, 63.5pt was cut off the left edge and 48pt off the right.
  • Column positions resolve as expected: runtime 838, boot 920, services 1012, disk 1154, RAM 1254, menu 1340, ending at 1368 + 18pt padding = 1386, the window edge.

One trade-off worth naming: SERVICES narrows 150 to 130, so "Unknown while shutdown" truncates a few characters earlier than it used to. Happy to rebalance the width budget if you would rather take those points from a different column.

The detail pane's fixed column widths plus the sidebar's minimum came to
~1371pt of content, more than the 1080pt window minimum and more than the
default 1260pt window. NavigationSplitView placed the overflow by centring
it, so the sidebar was clipped on the left edge and the trailing table
columns and toolbar items were clipped on the right. Because tableHeader
and SimulatorRow are separate HStacks that only lined up through hard-coded
widths, the same overflow also pushed the RAM values out from under their
header.

Share the column widths in a single TableColumn enum so the header and the
row cannot drift apart, trim the fixed widths so the pane fits inside the
1080pt minimum (the flexible Simulator column absorbs the slack), loosen
the sidebar minimum to 300, and truncate long simulator and runtime names
instead of letting them widen a row.

Fixes MobAI-App#69

@Interlap01 Interlap01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the shared widths are a nice fix. One thing: at 70pt the RUNTIME column now truncates watchOS 26.5 (74pt at 11pt) and visionOS 26.5 (73pt), which fit at the old 74. Could you bump runtime to ~78 and take the points from disk? Its longest value (1,023.5 MB) is ~62pt, so 80 is plenty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GUI: whole split view overflows the window at the default size — clipped sidebar and misaligned table columns

2 participants