Skip to content

feat(panel): mobile-first dock layout — full-height emulator, AI beside the terminal - #59

Merged
dev-josias merged 9 commits into
mainfrom
feat/right-dock-layout
Jul 2, 2026
Merged

feat(panel): mobile-first dock layout — full-height emulator, AI beside the terminal#59
dev-josias merged 9 commits into
mainfrom
feat/right-dock-layout

Conversation

@dev-josias

@dev-josias dev-josias commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Dogfooding-driven layout redesign, in three pushes (evolved live with the user):

Final shape (v4)

┌────────┬───────────────┬──────────┐
│ files  │     code      │ emulator │
│        ├───────┬───────┤ (full    │
│        │ term  │  AI   │  height) │
└────────┴───────┴───────┴──────────┘
  • Emulator alone owns the right column (a phone screen is tall) and auto-shows on startup.
  • AI assistant in the bottom dock's right section, beside the terminal — a chat gets real width there. Splitting the right dock (the first attempt) starved both panels.
  • DocumentSymbol undocked (user call — not part of the mobile core loop; open on demand).
  • Everything visible at once; each panel closes independently.

Migration

migrate_dock_layout rewrites all previous default shapes (pre-v1 / v1 / v2 interim) to the new layout; a PanelInfo.version (serde-default 0, now 4) gates a one-time style rewrite (RightTop + BottomRight + BottomLeft shown, RightBottom hidden), after which user choices always stick. Customized orders untouched.

Framework fixes found live

  • min_height/min_width: 0 on section views — flex children only share a dock when they can shrink below min-content; the emulator's tall device list otherwise hogged the whole dock and the peer section collapsed to zero.
  • Do NOT clip() sections — tried it for overflow bleed, and it made every absolute()-styled panel vanish (terminal/search/problems). Documented with an NB comment; overflow-prone panels must clip/scroll their own content.

Verification

Live on macOS across four launches (screenshots in session): migration fires once; terminal + AI + full-height emulator + editor all render simultaneously. panel::data tests cover every migration source shape + the fresh default. Clippy clean.

Windows: this branch is the base for the Device Logs panel registration (HANDOFF).

… on startup

The emulator and the AI assistant both lived in RightTop — one tab area, so
opening one hid the other. You couldn't watch the agent drive the device, and a
fresh workspace didn't even show the emulator (DocumentSymbol was the active
tab).

- New default right dock: Emulator first in RightTop (auto-shown on startup),
  AiAssistant heads RightBottom — its own, simultaneously-visible section. Watch
  the device while the agent works; close either independently and keep coding.
- One-time migration for saved layouts: rewrites the right dock when the saved
  order still IS the old default (migrate_right_dock), or when the saved styles
  predate the new PANEL_LAYOUT_VERSION (styles saved before the move kept
  RightBottom hidden). PanelInfo now carries a version (serde default 0), so the
  rewrite happens once and later user choices stick. Customized orders are left
  untouched.
- Two floem layout fixes this exposed in panel_view (both sections of a dock):
  * min size 0 — flex children only share the container when they may shrink
    below min-content; the emulator's tall device list otherwise hogged the
    whole dock and the peer section collapsed to zero height.
  * clip() each section — un-clipped overflow painted straight through the
    other section's view (the iOS device list bled over the AI panel).

Live-verified on macOS against the running Pixel_9a: fresh launch shows the
emulator (device lists, live screen once started) on top and the AI panel below,
cleanly clipped. 3 unit tests (migration + fresh default); clippy clean.
…istant only

Mobile-first: DocumentSymbol isn't part of the mobile core loop (open project ->
run on device -> read logs -> fix), so it no longer occupies a default tab in the
right dock. RightTop is just the emulator now; open DocumentSymbol on demand and
it docks via its position() fallback. migrate_right_dock also rewrites the
interim v1 shape ([Emulator, DocumentSymbol]) and PANEL_LAYOUT_VERSION bumps to
2, so machines that already took the v1 migration converge too.
dev-josias added a commit that referenced this pull request Jul 2, 2026
… right column

Splitting the right dock stacked two height-hungry panels: the phone screen lost
the height it needs and the chat lost width — both felt truncated. New shape:
the emulator alone owns the FULL right column (tall, like a phone), and the AI
assistant sits in the bottom dock's right section beside the terminal, where a
chat gets real width. Everything stays visible at once.

migrate_dock_layout (renamed) now rewrites all three old default shapes —
pre-v1 (everything in RightTop), v1 ([Emulator, DocumentSymbol]), and the v2
interim (assistant under the emulator) — to the new layout; RightBottom (Video
only) is hidden by the one-time style rewrite. PANEL_LAYOUT_VERSION -> 3.
Customized layouts untouched. Tests cover every source shape + the fresh
default.
…alize BottomLeft

The clip() wrapper around each dock section made every absolutely-positioned
panel vanish — terminal, search, problems and friends style themselves
absolute(), and a Clip ancestor swallowed them (found live: the terminal
rendered blank beside the AI panel). Removed; panels that can overflow their
section must clip/scroll their own content (with the emulator solo in the right
column, the original bleed case is gone anyway).

The one-time style rewrite now also normalizes BottomLeft (terminal active +
shown) so a stale saved active index can't present an empty tab as the default
experience. PANEL_LAYOUT_VERSION -> 4 (v3 never shipped beyond a dev box).

Live-verified on macOS: terminal (macos tab + prompt), AI assistant, full-height
emulator and editor all visible simultaneously.
@dev-josias dev-josias changed the title feat(panel): emulator + AI assistant visible together; emulator shows on startup feat(panel): mobile-first dock layout — full-height emulator, AI beside the terminal Jul 2, 2026
On Windows the emulator panel was invisible after the #59 dock redesign.
With the AI assistant moved out of the right dock into the bottom dock, the
right column holds only the portable emulator panel, whose min-content width
is ~0 (it is min_width(0) throughout). The bottom dock's wide AI panel then
made the centre column overflow and shove the fixed-width right dock off the
right window edge — the panel was "shown" at its full width but painted past
the window (verified live: is_container_shown=true, rt_shown=true,
size_right=250, yet no visible column). macOS was unaffected: its native
emulator panel reports a real intrinsic width, so the column never collapsed.

Two-part layout fix, independent of where the AI panel lives:
- view.rs: pin the Left/Right dock containers with min_width(size) +
  flex_shrink(0.0) so a side dock never shrinks below its configured width.
- app.rs: min_width(0.0) on the centre (editor + bottom dock) column so it
  shrinks to fit instead of overflowing and pushing the side docks away.

Verified live on Windows against a running Pixel_9a: the Emulators panel, the
AI assistant (bottom dock), terminal and file explorer all render at once —
the intended mobile-first layout.
In the #59 mobile-first layout the AI assistant sits in the bottom dock, which
is narrower/shorter than its old right-dock home. The message body renders
markdown via `rich_text`, which lays a TextLayout out at its natural (unwrapped)
width unless constrained — so replies overflowed the section and were clipped at
its right edge (most visible in the Windows bottom dock).

Give the transcript a bounded width so `rich_text` reflows to it: width_full +
min_width(0) down the message chain (rich_text -> body -> message card ->
dyn_stack -> transcript -> panel), the same way the editor's hover popup wraps
the same markdown via a width constraint. Layout-only; no behaviour change.

Verified live on Windows: assistant replies wrap cleanly inside the bottom-dock
panel with the emulator column visible beside it.
@dev-josias
dev-josias merged commit 5dc8fff into main Jul 2, 2026
7 checks passed
@dev-josias
dev-josias deleted the feat/right-dock-layout branch July 2, 2026 03:12
dev-josias added a commit that referenced this pull request Jul 2, 2026
Bump 0.3.0 -> 0.3.1 (Cargo.toml workspace / umide.spec / Info.plist), flip the
docs badge, add the v0.3.1 changelog entry. Ships the mobile-first dock layout
(#59), macOS native panel icons (#62), the Windows dock-overflow fix, transcript
wrap, RN/Flutter detection (#60) and the logcat backend (#61).
dev-josias added a commit that referenced this pull request Jul 3, 2026
…docked on old saves (#71)

* fix(ui): status bar survives tall docks; Video undocked; Device Logs docked on old saves

Two dogfooding fixes plus one gap-close, all found on macOS:

- Status bar disappeared when the emulator accordion expanded: the root window
  column (title/workbench/status) had no vertical overflow protection, so the
  macOS emulator panel's tall device lists (20+ iOS simulators) inflated the
  workbench's min-content height and pushed the status bar off the bottom
  window edge. Windows never saw it (one Pixel in the list). Fix is the
  vertical twin of the #59 horizontal one: workbench gets min_height(0) so it
  shrinks instead of overflowing, the status bar gets flex_shrink(0) so it can
  never be crushed or pushed out.
- The Video demo panel is undocked from the right dock: its console icon
  duplicated Device Logs' (same DEBUG_CONSOLE glyph under the terminal), and
  the dock is meant to be the emulator column. Still openable on demand.
- The v5 migration also docks Device Logs beside the terminal on orders saved
  before the panel existed — fresh defaults already had it, but both dev
  machines' saved orders would never have shown its tab.

PANEL_LAYOUT_VERSION -> 5; migration is idempotent and additive-only for
customized layouts (arrangements are respected). Tests cover every source
shape incl. the v4 dev-box state.

* docs(handoff): vertical-overflow fix + v5 migration (Video out, DeviceLogs docked on old saves)
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.

1 participant