Skip to content

Dock the composer on the bottom edge of the studio - #5

Merged
arena-ai-coding-agent[bot] merged 1 commit into
mainfrom
arena/01a0d382-openfield
Sep 24, 2026
Merged

arena-ai-coding-agent[bot] merged 1 commit into
mainfrom
arena/01a0d382-openfield

Conversation

@arena-ai-coding-agent

Copy link
Copy Markdown
Contributor

The bug

The prompt bar ("chat bar") did not sit at the bottom of the window. On a 1440×900 display it stood ~260px above the bottom edge over a band of dead ground; on a 1366×768 laptop it floated across the middle of the third row of runs.

Root cause: .of-studio-app > .ohf was a plain block. .ohf-shell asks for 100dvh, but inside the studio frame the frame owns the height, so the surface fell back to its own content height (~620px) and the absolutely-positioned dock pinned itself to the bottom of that box rather than the window. Nothing in the dock knew where the window ended.

The fix

Two halves, both in the layout rather than in magic numbers:

  1. The studio surface is now the frame's elastic column — .of-studio-app > .ohf gets display:flex; flex-direction:column; min-height:0 (plus min-height:0 on .ohf and .ohf-main), so the shell stretches to the frame and the gallery takes everything left over.
  2. The dock is the last row of that column, not a layer over it — so the composer stands on the bottom edge by layout at any size, and the last row of runs can never be buried behind an opaque plate.

Because the dock is in flow now, the whole --ohf-dock-h measurement disappears: no ResizeObserver in Composer, no measured padding / scroll-padding-bottom in the gallery (24px of breathing room, 20px on phones), and no pointer-events juggling for the selection states.

Verification

Measured in a headless Chromium at 1920×1080, 1440×900, 1366×768, 1280×600, 1024×768 and 390×844 (phone):

check before after
composer bottom (1440×900) 598px, ~302px above the bottom edge 878px, 22px from the bottom edge
dock top vs gallery bottom overlaps the runs equal to the pixel (gallery ends where the dock begins)
last row when scrolled to the end partially hidden fully visible

Also exercised: model picker open, selection toolbar (desktop + phone), a 250-character prompt growing the composer (the gallery gives up the height instead of the tiles being covered), and the empty state.

npx tsc --noEmit passes.

Note: CI-relevant config untouched. next-env.d.ts churn from the local dev server was reverted; no new routes or dependencies.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openfield Ready Ready Preview Sep 24, 2026 1:59pm UTC

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -6 complexity · 0 duplication

Metric Results
Complexity -6
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

The PR successfully refactors the layout to use a flexbox model, pinning the composer to the bottom edge of the studio and preventing it from obscuring gallery content. This change removes the previous dependency on ResizeObserver for height calculations, simplifying the codebase. Codacy results confirm the implementation is up to standards with no new issues or complexity regressions.

While the implementation aligns with the requirements, there are several missing test scenarios. These are critical to ensure that the flex layout handles edge cases like auto-growing input fields and various viewport dimensions without overlapping content or breaking the selection toolbar.

Test suggestions

  • Verify composer pins to the bottom of the viewport at various heights (e.g., 1440x900, 1366x768)
  • Verify that scrolling to the end of the gallery displays the last row of runs completely without overlap
  • Verify that increasing the number of lines in the composer (auto-grow) reduces the gallery height instead of overlapping it
  • Verify that the selection toolbar correctly displays and functions in the new flex layout
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify composer pins to the bottom of the viewport at various heights (e.g., 1440x900, 1366x768)
2. Verify that scrolling to the end of the gallery displays the last row of runs completely without overlap
3. Verify that increasing the number of lines in the composer (auto-grow) reduces the gallery height instead of overlapping it
4. Verify that the selection toolbar correctly displays and functions in the new flex layout

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

The prompt bar sat ~260px above the bottom of the window on a 1440x900
display, over a band of dead ground, and on a 1366x768 laptop it floated
across the middle of the third row of runs.

Root cause: `.of-studio-app > .ohf` was a plain block. `.ohf-shell` asks
for 100dvh, but inside the studio frame the frame owns the height — the
surface fell back to its own content height (~620px) and the absolutely
positioned dock pinned itself to the bottom of *that* box, not the
window. Nothing in the dock knew where the window ended.

Fix, two halves:

- The studio surface is now the frame's elastic column
  (`.of-studio-app > .ohf`, with `min-height: 0` on `.ohf` and
  `.ohf-main`), so the shell stretches to the frame and the gallery
  takes everything left over.
- The dock is the last row of that column instead of a layer over it.
  The composer now stands on the bottom edge by layout at every
  viewport size, and the last row of runs can never be buried behind an
  opaque plate — so the whole `--ohf-dock-h` measurement goes away:
  no ResizeObserver in Composer, no measured padding or
  scroll-padding-bottom in the gallery (24px of breathing room, 20px on
  phones), no `pointer-events` juggling in the selection states.

Verified in a headless browser at 1920x1080, 1440x900, 1366x768,
1280x600, 1024x768 and 390x844: dock top equals gallery bottom exactly,
the last fully-scrolled row of tiles is fully visible, a long prompt
growing the composer takes its height from the gallery, and the model
picker / selection toolbar / long-prompt states all stay on the bottom
edge.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@arena-ai-coding-agent
arena-ai-coding-agent Bot merged commit d7f2f2a into main Sep 24, 2026
6 checks passed
@sahajiscoding
sahajiscoding deleted the arena/01a0d382-openfield branch September 24, 2026 14:02

This branch was successfully deployed

1 active deployment
Preview — 29c4f076 Deployed Sep 24, 2026 by vercel[bot]
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