Repository navigation
fix(app): a narrow window offers no splits and follows the keyboard - #232
Merged
Merged
Conversation
A narrow window draws only the active group's active tab (docs/specs/ui.md#narrow-windows), so the split commands do not apply there: Split right and Split down leave More options, a tab's menu and the command palette, and their keys do nothing. An empty tab has no More options, which would list nothing. The bottom bar hides while any text field has the focus, which is what opens the on-screen keyboard, not only while an editor has it; the editing toolbar still shows only for an editor. Prompts end at the keyboard: lodge-ui's Prompt takes 100dvh in a narrow window, which iOS Safari does not shrink for the keyboard, so the app caps it by the visual viewport's inset. Fixes #228 Fixes #229
…e out the top safe area A width rule holds when the action runs: More options and a tab's menu check the width again before they split, and an open menu closes when the window crosses the narrow width. A narrow prompt starts under the top safe area, so its height to the keyboard leaves that margin out too.
bketelsen
approved these changes
Nov 13, 2026
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #228. Fixes #229. Both follow docs/specs/ui.md, Narrow windows.
workspace:split-verticalandworkspace:split-horizontalget anappliesthat is false while the narrow query matches (isNarrow()inapp/src/app/narrow.ts), so the palette leaves them out and their keys do nothing. More options and a tab's menu leave out Split right and Split down. An empty tab in a narrow window has no More options, because it would list nothing.useTextFocusinapp/src/app/keyboard.ts), which is what opens the on-screen keyboard: an editor, the inline title, a property, a search field. The editing toolbar still shows only for an editor; an input that an editor draws (the inline title in editing view, a property) is a field, not the editor. AMutationObservercatches a focused field that leaves the document without afocusout(a prompt that closes).Prompttakes100dvhin a narrow window, which iOS Safari does not shrink for the keyboard.usePromptsEndAtKeyboardcaps each open prompt (a modal dialog led by its combobox) atcalc(100dvh - <inset>px), the inset from the visual viewport (useKeyboardInset, as the editing toolbar uses). The fix stays in notes, so no lodge-ui release is needed.The iPhone Safari check (#230) is not part of this PR.
Risk tier
Risk tier: 2 — a behaviour change in the web app's narrow layout. No path in
.github/risk-paths.jsonmatches.Docs housekeeping
docs/specs/ui.md#narrow-windowsanddocs/design/app.md(Narrow windows) are updated in place; no new doc.Verification
make checkgreen (host)make ui-checkgreen (nsl): 95 files, 814 testsmain,make ui-vitest F=src/app/narrow.test.tsxfails 3 tests:the split commands > in a narrow window:expected true to be false(Split right offered)a narrow window > ends a prompt at the on-screen keyboard:expected '' to be 'calc(100dvh - 344px)'a narrow window > hides the bottom bar while a text field outside the editor has the focus: thewaitForon the bottom bar's absence times out (the bar stays drawn)Cross-review
openai/gpt-6.1-sol, coderanthropic/claude-opus-5-5.beca68e(basec3194a7): Not ready, 2 medium blocking findings, both accepted and fixed inb2485eb:calc(100dvh - env(safe-area-inset-top, 0px) - <inset>px).MainWindowcloses an open menu when the window crosses the narrow width.a menu opened in a wide window > splits nothing once the window is narrowand> closes when the window turns narrow, and the changed prompt test; record.memory/corrections/2026-11-13-pr-232-narrow-menu-and-prompt-height.json.b2485ebwithmenus.ts,MainWindow.tsxandkeyboard.tsrestored tobeca68e,make ui-vitest F=src/app/narrow.test.tsxfails those 3 tests on assertions.make ui-checkgreen (95 files, 816 tests),make checkgreen.