Repository navigation
fix(web): let ⌘← and ⌘→ go back and forward from the Agent Floor - #306
Merged
kalaspuff merged 1 commit intoOct 28, 2026
Merged
Conversation
The Agent Floor puts the focus in its task box as it opens, and in a text field Chrome, Safari and Firefox on a Mac take ⌘← and ⌘→ to move the caret to the start or the end of the line rather than to go back and forward. So once back or forward landed on the Agent Floor, ⌘← and ⌘→ did nothing there, while the browser's buttons, which don't care where the focus is, still worked. While the box is empty, with no caret to move, ⌘← and ⌘→ in it now go back and forward, on Apple's systems. With text in it, they move its caret as in any field. Other systems are left alone: their browsers go back with Alt+←, which works in a field too.
kalaspuff
approved these changes
Oct 28, 2026
kalaspuff
deleted the
fctl/393-the-browser-s-back-and-forward-doesn-t-w
branch
October 28, 2026 13:54
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
The Agent Floor puts the focus in its task box as it opens (since #127), and in a text field Chrome, Safari and Firefox on a Mac use ⌘← and ⌘→ to move the caret to the start or the end of the line instead of going back and forward. So once back or forward landed on the Agent Floor, ⌘← and ⌘→ did nothing there, while the browser's buttons, which don't depend on the focus, kept working. Now, while the task box is empty, ⌘← and ⌘→ in it go back and forward on Apple's systems; with text in it they move the caret as in any field. Other systems are unaffected: their browsers go back with Alt+←, which works in a field too. Getting started says so.
New tests in
web/src/lib/task-box.test.tsxcover the empty box, a box with text, ⇧, ⌥ and input methods, and Windows; the one for the empty box fails without the fix.cargo xtask check webpasses. In headless Chromium and WebKit againstcargo xtask dev, with a Mac's user agent, ⌘→ and ⌘← in the empty box went forward to a session and back to Settings, and with a task written in the box they left the page alone. Headless browsers don't run their own ⌘← and ⌘→ outside fields, so those steps usedhistory.back()andhistory.forward().Worth confirming
fctl session