Skip to content

fix(desktop): Esc closes modal instead of aborting model when settings/about/jobs is open#1670

Closed
CVEngineer66 wants to merge 3 commits into
esengine:mainfrom
CVEngineer66:fix/esc-modal-abort
Closed

fix(desktop): Esc closes modal instead of aborting model when settings/about/jobs is open#1670
CVEngineer66 wants to merge 3 commits into
esengine:mainfrom
CVEngineer66:fix/esc-modal-abort

Conversation

@CVEngineer66

@CVEngineer66 CVEngineer66 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

When a modal (settings, about, jobs) is open during model streaming,
pressing Esc was calling abort() instead of closing the modal.

Also fixes #1653: clicking the current session in the sidebar no longer
triggers a session reload that clears live state.

Changes

  • App.tsx - Global Esc handler skips abort() when any modal is open
  • settings.tsx - SettingsModal listens for Esc to call onClose()
  • about.tsx - AboutModal listens for Esc to call onClose()
  • sidebar.tsx - Guard against clicking the already-active session

JobsPop and WorkdirPop already had their own Esc handlers.

Verification

  • npm run build + typecheck pass
  • Manual: open settings during streaming, press Esc to close settings
  • Manual: click current session in sidebar during streaming, no reset

@esengine

Copy link
Copy Markdown
Owner

Took the focused Esc-skip-when-modal-open + active-session-click-guard parts and shipped them as #1685 (merged), co-authored credit preserved.

Dropping this branch because it was based on a pre-#1657 / pre-#1666 / pre-#1667 commit — squash-merging would have silently rolled back the preset drop, the four reasoning-effort options, and the totalCompletionTokens carryover (GitHub's MERGEABLE checks line conflicts, not semantic regressions). The cards.tsx / thread.tsx additions in this branch were already byte-identical to #1662.

Closing in favor of #1685.

@esengine esengine closed this May 24, 2026
@CVEngineer66 CVEngineer66 deleted the fix/esc-modal-abort branch June 9, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants