feat: add Desktop composer enter mode toggle - #55244
Conversation
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM
Well-structured Desktop composer enter mode toggle. The resolveComposerEnterKeyIntent helper is cleanly separated with dedicated test coverage. The 13-file scope is below the high-surface-area threshold, and the changes are well-organized: pure logic in enter-key-mode.ts, config propagation in composer-prefs and settings, and i18n additions.
Testing: Dedicated test file covering all key combinations (Enter, Shift+Enter, Ctrl/Cmd+Enter) for both send-first and multiline-first modes.
Code Quality: Clean separation of concerns — key intent resolution is pure and testable.
Reviewed by Hermes Agent
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM
Adds Desktop composer Enter key mode toggle. Supports Enter-to-send (default) and multiline-first modes. Clean type system with ComposerEnterKeyIntent type.
- Well-structured with excellent test coverage
- Clean separation of concerns
- Well-scoped: 13 files, 357 additions
Reviewed 13 files, 357 additions. Approved.
|
Thanks for addressing a real Desktop workflow problem. Current main still prevents plain Enter and submits from Problems
Suggested changes
Automated hermes-sweeper review. |
…-enter-newline-mode # Conflicts: # apps/desktop/src/app/chat/composer/index.tsx # apps/desktop/src/app/session/hooks/use-hermes-config.ts # apps/desktop/src/app/shell/keybind-panel.tsx
|
Updated this branch against current Summary:
Validation:
|
Port the existing NousResearch#55244 implementation onto the current composer, settings, and queue architecture while preserving Enter-to-send by default and IME safety. Co-authored-by: Nick Adams <nick@unleashedtech.io>
Summary
desktop.composer.enter_sendsconfig, defaulting to the existing Enter-to-send behaviorFixes #52952.
Test Plan
npm run test:ui -- src/app/chat/composer/enter-key-mode.test.ts src/app/chat/composer/enter-submit-dom-race.test.tsxuv run --with pytest python -m pytest tests/hermes_cli/test_desktop_composer_config.py -q -o 'addopts='npm run typechecknpx eslint src/app/chat/composer/enter-submit-dom-race.test.tsx src/app/chat/composer/help-hint.tsx src/app/chat/composer/index.tsx src/app/shell/keybind-panel.tsx src/app/session/hooks/use-hermes-config.ts src/app/settings/constants.ts src/lib/keybinds/actions.ts src/types/hermes.ts src/store/composer-prefs.ts src/app/chat/composer/enter-key-mode.ts src/app/chat/composer/enter-key-mode.test.tsnpm run buildNote: full
npm run lintstill reports pre-existing unrelated lint errors inelectron/titlebar-overlay-width.cjs,src/app/session/hooks/use-message-stream.ts, andsrc/app/shell/hooks/use-statusbar-items.tsx.