Skip to content

fix: show chat composer on tablet portrait (768px)#1699

Merged
jundot merged 1 commit into
jundot:mainfrom
pigeonstorm:fix/tablet-chat-input-hidden
Jun 6, 2026
Merged

fix: show chat composer on tablet portrait (768px)#1699
jundot merged 1 commit into
jundot:mainfrom
pigeonstorm:fix/tablet-chat-input-hidden

Conversation

@pigeonstorm

Copy link
Copy Markdown
Contributor

What

At 768px viewport width (standard iPad portrait), the bottom chat composer / message text box did not appear in the admin chat UI.

Why

The mobile responsive CSS block used @media (max-width: 768px), which turns the left sidebar into a fixed, full-height overlay at exactly 768px. But the JS initializes the sidebar open at that same width:

sidebarOpen: window.innerWidth >= 768,

So at exactly 768px the overlay sidebar is open by default and covers the bottom message composer, making it look like the input box is missing. This is an off-by-one against Tailwind's <768 = mobile convention that the JS already follows.

Fix

Change the mobile breakpoint from max-width: 768px to max-width: 767px in omlx/admin/templates/chat.html, so at 768px the sidebar stays in static flow beside the chat and the composer is fully visible.

Testing

Ran the server against this template and loaded /admin/chat at 768×1024:

  • Sidebar renders in static flow (position: static), beside the chat — not as an overlay.
  • Message composer is fully visible (x=325, w=378), no overlap with the sidebar.
  • Served HTML confirmed to contain max-width: 767px.

🤖 Generated with Claude Code

The mobile responsive block used @media (max-width: 768px), turning the
sidebar into a fixed full-height overlay at exactly 768px. But the JS
defaults the sidebar open at that width (sidebarOpen = innerWidth >= 768),
so on standard iPad portrait (768px) the overlay sidebar covered the
bottom message composer, making it appear to be missing.

Align the CSS breakpoint with the JS <768 "mobile" convention by changing
it to max-width: 767px, so at 768px the sidebar stays in static flow
beside the chat and the composer is fully visible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jundot

jundot commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Thanks for the fix. The breakpoint mismatch is real: CSS treated 768px as mobile while the JS opened the sidebar at 768px, so the left sidebar became an overlay. This one-line change aligns the CSS with the existing JS breakpoint behavior, and I don't see a regression risk. This looks good to me, and I'm going to merge it.

@jundot jundot merged commit 56ed9c6 into jundot:main Jun 6, 2026
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.

2 participants