Skip to content

Agent: Stop Return in the erase confirmation field from crashing the app - #1635

Merged
AnthonyRonning merged 1 commit into
masterfrom
fix/erase-enter-crash
Nov 18, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
fix/erase-enter-crash

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

  • Pressing Return in the "Type ERASE" field of Settings → Account → erase local data no longer quits the app. It now does what the button does: a wrong word shows the notice, the right word starts the erase.
  • Unlike the sign-in paste field fixed in Agent: Stop Return in the OAuth paste field from crashing the app #1591, this dialog is in every build, packaged ones included.

Notes

  • Same cause as Agent: Stop Return in the OAuth paste field from crashing the app #1591. The field's Enter handler called erase_local_store, which read the field back while gpui still held it for the key event. That read panics (cannot read … TextInput while it is already being updated), and inside a macOS key callback the panic aborts the process.
  • The handler now passes the text it is handed to erase_local_store_with. The button and the Vim confirm target still go through erase_local_store, which reads the field; neither runs inside the field's update.
  • The other Enter handlers were checked on master: chat composer, question input, project folder, sidebar rename, remote pairing and naming, MCP address, store gate. Each either defers out of the update or uses the text it is given.
  • No screenshots: nothing visible changes.
  • Test: enter_in_the_erase_field_checks_the_word presses Return in the focused field, empty and with a wrong word. The same steps panicked on master before the fix. It does not press Return with the right word, because that would start a real erase against process-wide state shared with other tests.
  • Checked on macOS: the repo pre-commit checks for maple-agent passed (lint and the full test suite). Not tried in a running app.

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

The field's Enter handler called erase_local_store, which read the field
back while gpui still held it for the key event. That read panics, and
inside a macOS key callback the panic aborts the process. The handler
now passes the text it is handed; the button and the Vim target still
read the field.

Same cause as the OAuth paste field fixed in #1591.

Co-Authored-By: Claude <[email protected]>
@AnthonyRonning
AnthonyRonning merged commit 35bd5bf into master Nov 18, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the fix/erase-enter-crash branch November 18, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant