Repository navigation
fix(frontend): remove inner edge gaps in empty and diff states - #213
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
all-hands-bot
left a comment
There was a problem hiding this comment.
Taste Rating: 🟢 Good taste - Elegant solution that eliminates layout complexity
[RISK ASSESSMENT]
- [Overall PR]
⚠️ Risk Assessment: 🟢 LOW
Frontend-only visual fix with appropriate test coverage. The change simplifies the layout by replacing absolute positioning with flexbox, which is more maintainable and semantically correct. Scrolling behavior is preserved and moved to the appropriate branch. Screenshots demonstrate the fix works as intended.
VERDICT:
✅ Worth merging: Clean fix that solves a real visual bug while simplifying the code
KEY INSIGHT:
Removing absolute positioning in favor of flexbox not only fixes the gap issue but makes the layout more predictable and easier to reason about.
Resolves #2320
Description
When a user opens a new conversation in
agent-server-guiand looks at the Changes tab in the right-side conversation panel, the panel content does not fill the bordered container — there are visible dark gaps along the inner edges:Steps to Reproduce
http://localhost:3001.Current Behavior
The Changes tab content is inset from the bordered panel by 6–16 px on the right and 16 px on the bottom in the empty state, and by 6 px on the right in the diff-list state.
Expected Behavior
Content fills the bordered panel edge-to-edge along all four inner edges. The Protip sits flush against the bottom and side borders. The diff list extends to the right border (the scrollbar gutter only appears when content actually overflows).
Root Cause
In
src/routes/changes-tab.tsx:<main>setoverflow-y-scroll(always reserves a scrollbar gutter even when there is nothing to scroll) andmd:pr-1.5(6 px right padding).absolute inset-x-0 top-1/2 -translate-y-1/2for the icon,absolute inset-x-0 bottom-0for the Protip), and the Protip card carriedmb-4plusmax-w-2xl mx-auto. Together these produced the bottom and side gaps inside the empty-state branch.md:pr-1.5, which was the small inner-right gap when changes are present.The shared layout files (
conversation-main.tsx,tab-container.tsx, etc.) match the upstream OpenHands reference and are not the source of the bug.Fix
In
src/routes/changes-tab.tsx:flex flex-col h-fulllayout —flex-1icon area on top, full-width Protip wrapper at the bottom.max-w-2xl mx-autoand the wrapper's outer padding so the card spans full width and is flush with the left, right, and bottom borders.overflow-y-auto custom-scrollbar-always) into the diff branch only and dropmd:pr-1.5so the diff list is also flush with the right border.Acceptance Criteria
StatusMessage(loading / not-a-git-repo / runtime-inactive) still centers inside the panel.Summary
src/routes/changes-tab.tsxto fill the panel edge-to-edge in both branches:flex flex-col h-fulllayout (flex-1icon area on top, full-width Protip at the bottom). Removedmax-w-2xl mx-autoand the surroundingpx-4 pb-4so the Protip card spans full width and is flush with the side and bottom borders.md:pr-1.5, switchedoverflow-y-scroll→overflow-y-auto, and movedcustom-scrollbar-alwaysinto this branch only so the scrollbar gutter only appears when content actually overflows.conversation-main.tsx,tab-container.tsx,root-layout.tsx,conversation.tsx) are intentionally untouched — they match the upstream OpenHands reference.Screenshots
Before
After