Skip to content

Commit 7e6c753

Browse files
ericdalloeca-agent
andcommitted
Fix mobile chat overflow and make reconnect banner non-shifting
On iPhone Safari (and other narrow viewports) the chat would overflow horizontally when content arrived, and the reconnect indicator banner would push the chat down/up as it mounted/unmounted, jumping text out from under the user. Changes: - Bump eca-webview to pick up CSS hardening for chat messages: prose now wraps long unbreakable tokens, syntax-highlighted code blocks scroll internally, and the messages container can shrink to viewport width before children measure (eca-webview 646ac5a). - AppLayout.css: defensive viewport clip on html/body (max-width: 100vw; overflow-x: hidden) plus width: 100% on .app-layout. Belt-and-suspenders against iOS Safari's horizontal rubber-band. - RemoteSession.css: convert .reconnect-banner from a flex sibling to position: absolute (anchored to .remote-session, which already has position: relative). The chat no longer reflows when the banner mounts/unmounts, addressing the reporter's explicit request to make the indicator an overlay rather than a layout shifter. Closes #1. 🤖 Generated with [eca](https://eca.dev) Co-Authored-By: eca-agent <git@eca.dev>
1 parent 628f02a commit 7e6c753

3 files changed

Lines changed: 21 additions & 4 deletions

File tree

src/components/AppLayout.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1+
/* Defensive viewport clip — prevents iOS Safari's horizontal rubber-band
2+
* if any descendant briefly overflows the viewport during reflow. The
3+
* webview's own overflow rules (pre, code, message wrappers) are the
4+
* primary fix; this is a belt-and-suspenders for the browser shell. */
5+
html,
6+
body {
7+
max-width: 100vw;
8+
overflow-x: hidden;
9+
}
10+
111
.app-layout {
212
display: flex;
313
flex-direction: column;
14+
width: 100%;
415
height: 100vh;
516
height: 100dvh;
617
overflow: hidden;

src/pages/RemoteSession.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,17 @@
6767
}
6868

6969
/* ---------------------------------------------------------------------------
70-
* Reconnection banner — slim top bar, chat stays fully visible underneath.
71-
* Three visual states: reconnecting (amber), reconnected (green), failed (red).
70+
* Reconnection banner — slim top overlay so the chat does not reflow when
71+
* the banner mounts/unmounts. Anchored to the .remote-session container
72+
* (which has position: relative). Three visual states: reconnecting (amber),
73+
* reconnected (green), failed (red).
7274
* ------------------------------------------------------------------------- */
7375

7476
.reconnect-banner {
77+
position: absolute;
78+
top: 0;
79+
left: 0;
80+
right: 0;
7581
display: flex;
7682
align-items: center;
7783
justify-content: center;
@@ -82,7 +88,7 @@
8288
font-size: 0.8rem;
8389
font-weight: 500;
8490
z-index: 1000;
85-
flex-shrink: 0;
91+
pointer-events: auto;
8692
animation: reconnect-slide-in 0.25s ease-out;
8793
}
8894

0 commit comments

Comments
 (0)