Fix: Allow native Cmd+Up/Down cursor movement when user has typed text#3246
Merged
angiejones merged 2 commits intoblock:mainfrom Jul 7, 2025
Merged
Conversation
Resolved conflict in ChatInput.tsx by combining: - History navigation improvements (hasUserTyped tracking) - New @ mention functionality for file selection Both features now work together seamlessly.
angiejones
approved these changes
Jul 7, 2025
Collaborator
|
thank you! |
zanesq
added a commit
that referenced
this pull request
Jul 8, 2025
* 'main' of github.com:block/goose: feat: Add environment variables to override model context limits (#3260) chore(release): release version 1.0.34 (#3285) fix(devcontainer): install protoc to fix build (#3267) Enabling npx command to install on Windows Desktop (#3283) Fix: Allow native Cmd+Up/Down cursor movement when user has typed text (#3246) chore(release): release version 1.0.33 (#3284) fix Windows Env Vars (#3282) # Conflicts: # ui/desktop/src/components/ChatInput.tsx
dianed-square
added a commit
to dianed-square/goose
that referenced
this pull request
Jul 8, 2025
* update-to-v1.0.35: (57 commits) chore(release): release version 1.0.35 (block#3292) docs: enhanced code editing topic (block#3287) fix cu (block#3291) feat: Add environment variables to override model context limits (block#3260) chore(release): release version 1.0.34 (block#3285) fix(devcontainer): install protoc to fix build (block#3267) Enabling npx command to install on Windows Desktop (block#3283) Fix: Allow native Cmd+Up/Down cursor movement when user has typed text (block#3246) chore(release): release version 1.0.33 (block#3284) fix Windows Env Vars (block#3282) feat: bedrock image content support (block#3266) Add support in goose configure for streaming http mcp tools (block#3256) docs: add Alby MCP tutorial (block#3217) refactor(tests): make logging test in goose-cli less flaky on macos (block#3273) feat: cli can work with gui generated recipes (block#3254) Goose projects docs (block#3272) feat: add support for 'cu' command in extension installation (block#3261) Docs: Add cloudinary mcp tutorial (block#3268) fix: Enable agent to see instruction to use final output tool when it wasn't called (block#3253) Use command line to run sub agent and sub recipe (in sequence or parallel) (block#3190) ...
lifeizhou-ap
added a commit
that referenced
this pull request
Jul 9, 2025
* main: (23 commits) docs: VS Code MCP video (#3307) docs: fixed broken link (#3306) Add YouTube video to Netlify MCP documentation (#3302) docs: add sub-recipes topic (#3241) docs: move topics to tutorials section (#3297) site analytics (#3293) chore(release): release version 1.0.35 (#3292) docs: enhanced code editing topic (#3287) fix cu (#3291) feat: Add environment variables to override model context limits (#3260) chore(release): release version 1.0.34 (#3285) fix(devcontainer): install protoc to fix build (#3267) Enabling npx command to install on Windows Desktop (#3283) Fix: Allow native Cmd+Up/Down cursor movement when user has typed text (#3246) chore(release): release version 1.0.33 (#3284) fix Windows Env Vars (#3282) feat: bedrock image content support (#3266) Add support in goose configure for streaming http mcp tools (#3256) docs: add Alby MCP tutorial (#3217) refactor(tests): make logging test in goose-cli less flaky on macos (#3273) ...
michaelneale
added a commit
that referenced
this pull request
Jul 9, 2025
* main: (23 commits) docs: VS Code MCP video (#3307) docs: fixed broken link (#3306) Add YouTube video to Netlify MCP documentation (#3302) docs: add sub-recipes topic (#3241) docs: move topics to tutorials section (#3297) site analytics (#3293) chore(release): release version 1.0.35 (#3292) docs: enhanced code editing topic (#3287) fix cu (#3291) feat: Add environment variables to override model context limits (#3260) chore(release): release version 1.0.34 (#3285) fix(devcontainer): install protoc to fix build (#3267) Enabling npx command to install on Windows Desktop (#3283) Fix: Allow native Cmd+Up/Down cursor movement when user has typed text (#3246) chore(release): release version 1.0.33 (#3284) fix Windows Env Vars (#3282) feat: bedrock image content support (#3266) Add support in goose configure for streaming http mcp tools (#3256) docs: add Alby MCP tutorial (#3217) refactor(tests): make logging test in goose-cli less flaky on macos (#3273) ...
GaryZhous
pushed a commit
to GaryZhous/goose
that referenced
this pull request
Jul 9, 2025
ahau-square
pushed a commit
that referenced
this pull request
Jul 11, 2025
atarantino
pushed a commit
to atarantino/goose
that referenced
this pull request
Jul 14, 2025
block#3246) Signed-off-by: Adam Tarantino <tarantino.adam@gmail.com>
s-soroosh
pushed a commit
to s-soroosh/goose
that referenced
this pull request
Jul 18, 2025
block#3246) Signed-off-by: Soroosh <soroosh.sarabadani@gmail.com>
kwsantiago
pushed a commit
to kwsantiago/goose
that referenced
this pull request
Jul 19, 2025
block#3246) Signed-off-by: Kyle Santiago <kyle@privkey.io>
cbruyndoncx
pushed a commit
to cbruyndoncx/goose
that referenced
this pull request
Jul 20, 2025
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.
This PR implements an idea shared by @wallerdev via internal Block Slack.
Problem
Currently, when users type text in the chat input field and press
Cmd+Up(orCtrl+Up), the text gets replaced with the previous message from history instead of moving the cursor to the beginning of the text. This conflicts with native macOS behavior and user expectations, especially for users familiar with apps like Slack whereCmd+Upmoves the cursor when there's text in the input.Solution
This PR implements a smart solution that distinguishes between text that comes from history navigation vs. text that the user has actively typed:
Cmd+Up/Downcontinues to work for history navigation (preserves existing behavior)Cmd+Up/Downto navigate through more history itemsCmd+Up/Downswitches to native cursor movement behaviorgoose-chat-input-cursor-ux.mov
Technical Implementation
hasUserTypedstate to track when user actively modifies the input fieldhasUserTyped && displayValue.trim() !== ''handleChange,performSubmit, history navigation, and initializationBenefits
✅ Preserves all existing functionality - History navigation works exactly as before when input is empty
✅ Allows continued history navigation - Users can navigate through multiple history items without interference
✅ Enables native text editing - When users type, they get familiar macOS cursor movement behavior
✅ Smart and intuitive - Behavior automatically adapts based on how text got into the field
✅ No breaking changes - All existing tests should continue to pass
Testing
Fixes the UX friction mentioned in the team discussion where
Cmd+Upwould unexpectedly replace user-typed text.