Mobile Layout Still Broken - Options
Analysis of remaining issues and proposed solutions for keyboard gap and viewport fill
Output
Mobile Layout Still Broken
Issue 1: Keyboard Gap (Cover Screen)
What's happening: Huge black gap between input and keyboard
Why dvh didn't work: dvh sets initial height, but doesn't dynamically resize when keyboard opens. Samsung/Chrome uses the FULL viewport height, then scrolls content up, leaving gap.
Real fix needed: JavaScript visualViewport API to detect and respond to keyboard
Issue 2: Onboarding Cut Off (Inner Screen)
What's happening: Logo header takes ALL flex space, content below cut off
Why: flex:1 on logo header made it greedy
Fix: Remove flex:1 from logo header, make card scrollable instead
Option A: visualViewport API (Best)
// Dynamically resize on keyboard open/close
window.visualViewport.addEventListener('resize', () => {
const vh = window.visualViewport.height;
document.body.style.height = vh + 'px';
});
Pros: Works on all modern mobile browsers
Cons: Requires JavaScript, may have slight flicker
Option B: Fixed Bottom Input (Alternative)
Pin input to bottom of viewport with position:fixed
.console-input-row {
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
Pros: Pure CSS, no JS
Cons: Content may overlap, needs padding adjustment
Option C: Scrollable Onboarding (Quick Fix)
Remove flex expansion, make onboarding card scrollable with fixed max-height. Content won't fill viewport but at least it's all accessible.
My Recommendation
Option A + C combined: Add visualViewport JS for keyboard handling, AND make onboarding card scrollable (not flex-fill). This gives us proper keyboard behavior AND ensures all content is accessible.
Quick Actions
Original Request
No layout configured
Details
Raw Data
{
"id": "39d8186c-e14f-40c9-866e-d347620f6a84",
"type": "general",
"status": "completed",
"title": "Mobile Layout Still Broken - Options",
"description": "Analysis of remaining issues and proposed solutions for keyboard gap and viewport fill",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:system-ui,sans-serif;\">\n<h2 style=\"color:#ff6b6b;margin:0 0 16px 0;\">Mobile Layout Still Broken</h2>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#ff6b6b;margin:0 0 12px 0;\">Issue 1: Keyboard Gap (Cover Screen)</h3>\n<p style=\"color:#9ca3af;margin:0 0 8px 0;\"><strong>What's happening:</strong> Huge black gap between input and keyboard</p>\n<p style=\"color:#9ca3af;margin:0 0 8px 0;\"><strong>Why dvh didn't work:</strong> <code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;\">dvh</code> sets initial height, but doesn't dynamically resize when keyboard opens. Samsung/Chrome uses the FULL viewport height, then scrolls content up, leaving gap.</p>\n<p style=\"color:#e5c07b;margin:0;\"><strong>Real fix needed:</strong> JavaScript <code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;\">visualViewport</code> API to detect and respond to keyboard</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#ff6b6b;margin:0 0 12px 0;\">Issue 2: Onboarding Cut Off (Inner Screen)</h3>\n<p style=\"color:#9ca3af;margin:0 0 8px 0;\"><strong>What's happening:</strong> Logo header takes ALL flex space, content below cut off</p>\n<p style=\"color:#9ca3af;margin:0 0 8px 0;\"><strong>Why:</strong> <code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;\">flex:1</code> on logo header made it greedy</p>\n<p style=\"color:#e5c07b;margin:0;\"><strong>Fix:</strong> Remove flex:1 from logo header, make card scrollable instead</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#fff;margin:0 0 12px 0;\">Option A: visualViewport API (Best)</h3>\n<pre style=\"background:#3d3d3d;padding:12px;border-radius:4px;font-size:0.8em;overflow-x:auto;color:#98c379;\">// Dynamically resize on keyboard open/close\nwindow.visualViewport.addEventListener('resize', () => {\n const vh = window.visualViewport.height;\n document.body.style.height = vh + 'px';\n});</pre>\n<p style=\"color:#9ca3af;margin:8px 0 0 0;font-size:0.85em;\"><strong>Pros:</strong> Works on all modern mobile browsers<br><strong>Cons:</strong> Requires JavaScript, may have slight flicker</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#fff;margin:0 0 12px 0;\">Option B: Fixed Bottom Input (Alternative)</h3>\n<p style=\"color:#9ca3af;margin:0 0 8px 0;\">Pin input to bottom of viewport with <code style=\"background:#3d3d3d;padding:2px 6px;border-radius:3px;\">position:fixed</code></p>\n<pre style=\"background:#3d3d3d;padding:12px;border-radius:4px;font-size:0.8em;overflow-x:auto;color:#98c379;\">.console-input-row {\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n}</pre>\n<p style=\"color:#9ca3af;margin:8px 0 0 0;font-size:0.85em;\"><strong>Pros:</strong> Pure CSS, no JS<br><strong>Cons:</strong> Content may overlap, needs padding adjustment</p>\n</div>\n\n<div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\">\n<h3 style=\"color:#fff;margin:0 0 12px 0;\">Option C: Scrollable Onboarding (Quick Fix)</h3>\n<p style=\"color:#9ca3af;margin:0;\">Remove flex expansion, make onboarding card scrollable with fixed max-height. Content won't fill viewport but at least it's all accessible.</p>\n</div>\n\n<div style=\"background:rgba(240,193,75,0.15);border:1px solid #f0c14b;padding:12px 16px;border-radius:6px;\">\n<h4 style=\"margin:0 0 8px 0;color:#f0c14b;\">My Recommendation</h4>\n<p style=\"color:#9ca3af;margin:0;\"><strong>Option A + C combined:</strong> Add visualViewport JS for keyboard handling, AND make onboarding card scrollable (not flex-fill). This gives us proper keyboard behavior AND ensures all content is accessible.</p>\n</div>\n</div>",
"requestedAt": "2026-01-04T13:30:00Z",
"requestId": "aa3516ad-0c8d-4190-8eea-5fda880af98c",
"choices": [
{
"label": "Implement A+C",
"value": "Implement Option A (visualViewport) + Option C (scrollable onboarding) combined",
"primary": true
},
{
"label": "Try Option B",
"value": "Try Option B - fixed bottom input with CSS only"
},
{
"label": "Just fix onboarding",
"value": "Just fix the onboarding cutoff issue first, keyboard gap later"
}
],
"turnTiming": {
"totalMs": 58417,
"ttfeMs": 3628,
"thinkingMs": 47616,
"toolExecutionMs": 7170,
"toolCallCount": 4,
"thinkingPct": 82,
"toolsPct": 12,
"ttfePct": 6
}
},
"createdBy": "claude",
"createdAt": "2026-01-04T09:16:40.641Z",
"updatedAt": "2026-01-04T09:16:47.573Z",
"requestId": "aa3516ad-0c8d-4190-8eea-5fda880af98c",
"scope": "vibetools",
"tags": [
"ui",
"mobile",
"responsive",
"critical"
],
"targetUser": "claude"
}