Repository navigation
Resizable composer, remembered per device - #11
Conversation
devswha
left a comment
There was a problem hiding this comment.
Thanks for splitting this out. A few things before merge:
- Min height is above the automatic height. The automatic height is 42px on desktop and 48px on touch, below
COMPOSER_HEIGHT_MIN(56). Soaria-valuenowfalls outsidearia-valuemin, and ArrowDown or a downward drag in automatic mode makes the box grow to 56. Please set the minimum to the automatic minimum. - An accidental touch locks in a height. The touch grip reaches about 12px into the box and calls
preventDefaulton pointerdown. A tap near the top of the box doesn't focus the textarea, and 1px of finger movement switches to manual 56px, which is then saved for good. Please add a movement threshold before switching to manual mode, and keep the hit area off the textarea. On touch the only way back is double-tap, and iOS may not deliverdblclickthere. - The keyboard clamp uses
50dvh. On older iOS Safari,dvhdoesn't shrink with the keyboard (seelib/viewport.ts), so a saved 400px composer can fill the visible area.calc(var(--app-height) / 2)follows the visual viewport.
Minor: localStorage is written on every pointermove (write on pointerup instead), and aria-valuemax stays at 480 even when the viewport limit is lower. Please also rebase onto main: #5 and #14 are merged, and #14 touches Composer.css.
A grip on the box's top edge sets its height: drag it, use the arrow keys (Shift for larger steps), or double-click / Home to return to the automatic height. The height is kept per device in localStorage, limited to half the visible viewport and 480px; a raised keyboard or rotation clamps it through CSS and the saved height returns when there is room again. The text also sits centred in the slightly taller box. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 42c442e)
- The floor is the box's automatic height (the textarea's CSS min-height, 42px on desktop, 48px on touch), not a fixed 56px. aria-valuemin, -valuenow and -valuemax now agree, and valuemax follows the viewport limit. ArrowDown or a drag to the floor returns the automatic height instead of growing the box. - A press on the grip becomes a resize only after 3px (mouse) or 10px (touch) of movement, so a tap or a resting finger sets nothing. - The hit area rises from the border into the status line's gap and never reaches into the box. A tap at the box's top reaches the text, and the attachment strip's remove buttons stay reachable. - Two quick taps on the grip reset it, detected from pointer events: iOS may not send dblclick. - The keyboard clamp uses half of --app-height (the visual viewport), not 50dvh, which older iOS Safari does not shrink for the keyboard. - The height is saved when the pointer is released, not on every move. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The composer mounts before the socket connects, so the first auto-size measures the long "Reconnecting… message held here, never queued" placeholder. On a phone that wraps to two lines, and the box kept that height after connecting until the user typed (72px instead of 48px; 58px instead of 34px on main). Re-running the auto-size when the placeholder changes fits the empty box to the placeholder it actually shows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
cb09da2 to
0c05b5e
Compare
|
Thanks. Reworked in 21046e2 and rebased onto main:
Minor. The height is saved on pointerup (and on each key step), no longer on every move. Also in this PR (0c05b5e). I found a problem that already exists on main. The composer mounts before the socket connects, so on a phone it auto-sizes to the two-line "Reconnecting… message held here, never queued" placeholder and keeps that height after connecting (58px instead of 34px on main). The auto-size now reruns when the placeholder changes. Checked in Chromium, desktop and touch emulation:
|
0c05b5e to
71cad58
Compare
…eaves the relay tab its sign-in buttons alone Owner #25 (packaged Mac app, preview.19): after a sign-out and sign-in the relay tab showed 'Add from account', 'Sign in to this PC's account.' and the revoke-every-device paragraph: the window was signed in to another account than the one the PC is in (the account service makes a new account for a way in the PC's account does not have, src/accounts.ts accountFor), so #11's close never fired. Such a sign-in is no sign-in to this PC: the tab stays the sign-in buttons (keyed by the account, so they come back) and the phone's QR / pairing code, with no prompt, no line and no paragraph; a sign-in to the PC's account then closes onto the main screen as before. The QR part's notice after a scan still names another account.
… Back, row state From the adversarial review of #4487: - #1 Forget sits in a column of its own beside the row's open link (each row a subgrid of the list), so a tap on the chevron never lands on Forget. - #2 The phone app's saved PCs are asked only of an app with getState, and a front page waits on the answer for 1.5 s at most; a late answer still lists them. - #4 What is saved decides only the app's own front page: a PC's own page keeps that PC's sign-in, and its Back on a relay with no accounts. - #5, #10 Add PC over My PCs has an entry of its own in the history (useSheetHistory), so Back returns to My PCs; the focus moves to its title and back to Add PC. - #8 A row says first what this device knows: a pairing's saved Ovis too old, a check that settled (off or on), then the account's word. - #11, #12 The acceptance check finds the forgotten laptop's one row; the mixed list test has a relay pairing and opens every native row at its own address. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…that stay, codes kept From the adversarial review of #4492: - #1 #2 #7 #10 One open attempt for the whole connect screen, tracked from the tap (before the Tailscale question, whose wait is bounded and takes only an explicit off as off): a newer tap, Cancel or leaving drops an earlier one's late answer, no second open runs while one does, both panes show the one status, open is called only where the app has it, Cancel shows only where it can stop it, and the plain wait and the removed screen show a scanned PC's open too. - #3 #4 My PCs and Add a PC stay mounted under one parent across 1024 px, so the tab, what is typed, the focus, the search and an open survive a resize; a pairing dialog stays the top of the history when the window narrows under it. - #5 Each desktop pane scrolls on its own; checked at 1024x400 with the wheel. - #6 A code is looked up in its own field, kept through a failure to correct. - #8 Tailscale's IPv6 range counts as a Tailscale address. - #9 Android's no-answer is explained; an unknown reason never shows the app's words. - #11 #12 A PC the app keeps open while choosing shows My PCs with its Back, and only its own scope on a self-hosted relay's origin is marked. - #13 One alert for a failed sign-in on a wide screen. #14 The Cancel test presses it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Split out of #5, with its review notes addressed.
A grip on the composer's top edge sets the box's height:
--app-height) or 480px.Details:
aria-valuemin,-valuenowand-valuemaxagree, andvaluemaxfollows the viewport limit.scroll-behavior. Without this, growing the composer hid the last message.Headless Chrome checks, desktop and touch emulation:
--app-heightclamping and restoring a saved heightbun testpasses.🤖 Generated with Claude Code