Repository navigation
Question answers are submitted with Enter, with a setting for Cmd/Ctrl+Enter (opencode#66169) - #1275
Merged
Merged
Conversation
…l+Enter (opencode#66169) Settings > General gains Submit question answers with: Enter (the default) or Cmd/Ctrl+Enter. The submit key moves the question dock on, or submits on the last question; the other Enter picks the highlighted answer, or starts a new line in the typed answer; Cmd/Ctrl+Enter always submits (packages/app/src/session/requests/question-keys.ts:29-37, :95-101). Classic: the submit key on an answer picks it first on a single choice and moves on; on the typed answer's mark it opens the field while that is empty. The typed answer is a field of several lines that grows: the submit key moves on, Up at its start goes back to the answers, and the arrows and End land in the field (session-question-dock-classic.tsx:236-248, :440-457, :738-771; question-prompt.css:361-430). A picked answer's wash and the hover's fill change places. The Next and Submit buttons show the chosen key (question-submit.ts:4-8). The dock reads the setting through DockHost::dock_question_submit.
… takes 18 px lines Official's typed answer grows to six 18 px lines (max-block-size 118px with its padding) and then scrolls inside itself (packages/session-ui/src/components/question-prompt.css:398-409, question-prompt-experimental.css:432-453). Both docks now put the field in a scroll box of that height with a plain overflow box's bar. The new dock's field takes official's lines, row padding and mark offset (question-prompt-experimental.css:392-411).
Hona
added a commit
that referenced
this pull request
Nov 25, 2026
…e Rune pin, #1257) (#1278) Three new official commits since 028cd6ce91, none the desktop's, all skipped (73c3b1da2f, ac1bab2ffc, c85b83eb08). UP-212 (the elevation shadows' layers in the design's order) is in dev by the Rune pin 5342f14d (#1257), which holds rune#2187: the row has what the pin's picture walk showed and what was not compared. UP-242's row says it is ported in a draft, #1275, not run.
…ows it Under web_focus, Rune activates a focused on_press element on unmodified Enter before the window's on_key runs (runtime/input/focus.rs:283,1042-1047), so pressing Enter on a focused answer card ran select only and never reached classic::key / question::key to move on. Attach El::on_key to the answers group in both Classic and New docks (which runs before press-on-return and skips focused text fields, el/focus.rs:121-124), key the custom toggle q-custom-mark so focus_in_options recognizes it, sync focus from tx.focused(), and ignore repeated Enter/Space.
…er submits In Rune a multi-line text_input inserts a newline natively only on Shift+Return (rune::el::input); plain Enter is left to on_input_key / on_submit. When SubmitKey::ModEnter is chosen, both Classic and New docks now insert '\n' into the typed answer via TextEdit::insert on plain Enter (and ignore key repeats on submit).
Hona
marked this pull request as ready for review
November 26, 2026 01:13
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.
Port of opencode#66169 (
028cd6ce91, "submit question answers with Enter, with a setting for Cmd/Ctrl+Enter"). Ledger row UP-242. Official paths are underpackages/.What changes
layer-02picked,layer-01under the pointer).How
app/src/session/requests/question-keys.ts:29-37questionEnter,:95-101crates/session-view/src/dock/question/mod.rsenter,SubmitKey,intentquestion-submit.ts:4-8mod.rssubmit_hint;face.rs,classic.rssession-question-dock-classic.tsx:440-457classic.rskey:738-771classic.rstyped_key:236-248,:335,:421classic.rskey,enter_fieldsession-ui/src/components/question-prompt.css:361-430classic.rscustomsession-question-dock-experimental.tsx:1365-1369mod.rstyped_keyapp/src/settings/model.tsx(general.questionSubmitKey, defaultenter),settings/general/general.tsx:140-168,settings/search-catalog.ts,runtime/i18n/en.tsfeatures/settings/src/prefs.rsQuestionSubmitKey,lib.rs,stored.rs,pages/general.rs,search/mod.rs; two strings incrates/opencode-i18n/locales/official/en.jsonThe dock reads the setting through
DockHost::dock_question_submit(default Enter), so an embedder that does not set it keeps Enter.No manifest, lock, profile or plugin contract.
How it differs from official
None known, by reading; no run has checked it yet.
session-ui/src/components/question-prompt.css:398-409,question-prompt-experimental.css:432-453). Cases 13 and 14.question-prompt-experimental.css:392-411,:432-453). At one line the row is 40 tall, as before.en.tsalone (no other file underapp/src/runtime/i18nholdsquestionSubmitKeyat028cd6ce91).5de44ab24(case 13): typing eight lines keeps the field box at 118 tall with line 8 and the caret visibly in sight.Run
A PR build is of the PR's own head. The head holds
devwith the Rune pin5342f14d(#1257) and #1202 (shareden.json). Before = opencode-rune #1271's own PR build, head278f9aaf38, run45709668204:deva5c55ecf42with the same pin and the re-keyed profile, and nothing of this change.5de44ab24(Windows x64 CI build, run45721511550; headless,--scene questionand the app's own fixture file, no server; 46 launches across three runs, every exit code read whole and 0):"Enter", description namingShift+Enter; before: no such row), case 2 select & description (EnterandCtrl+Enter; pickingCtrl+Enterupdates description to nameEnter; restart persistence needs a live server since--fixturedoes not persist settings), case 3 (Settings search"question"lists the row), case 5 (Down+Shift+Enterpicks and stays), case 6 (Next button tip"Next ⏎"; before:"Next Ctrl+⏎"), case 7 (Endputs focus and ring inq-input;"one",Shift+Enter,"two"growsq-customto 58 > 40;Upx 3 leavesq-inputand focusesq-opt-2), case 8 (Enterinq-inputmoves to question 2; before: closes field and stays), case 9 (exact swap: hovered#242424vs#2e2e2e, picked#2e2e2evs#242424), case 10 button tip ("Next Ctrl+⏎"), case 11/14 button hint (["Next","⏎"]) and 40-px custom row, case 12 ("2"picks,Ctrl+Entermoves on,Escapefires dismiss write), case 13 (q-field= 118 tall,q-input-scroll-0= 108 with bar, line 8 and caret visibly in sight).5de44ab24and fixed in976fb91b1: case 4 (Classic,Down+Enterpickedq-opt-1and stayed on question 1 instead of moving on). Underweb_focus, Rune activates a focusedon_presselement on unmodifiedEnterbefore the window'son_keyruns, soq-opt-1's click handler swallowedEnter. Fixed by attachingEl::on_keytoq-options-{tab}in bothclassic.rsandface.rs(which runs before press-on-return and skips focused text fields), keying the custom markq-custom-mark, syncing focus fromtx.focused(), and ignoring repeatedEnter/Space.976fb91b1e(Windows x64 CI build, run45727779290; headless,--scene question, no server; 11 launches exit 0):Down+Entermoves to question 2), case 5 (Down+Shift+Enterpicks and stays), case 10a/10b (Ctrl+Entersubmitting:Down+Enterpicks and stays;Down+Ctrl+Entermoves to Q2), case 11 (New dock:Down+Entermoves to Q2;Down+Shift+Enterpicks and stays;Enterinq-inputmoves to Q2), case 14 (New dock 1 line = 40 tall, 2 lines = 58 tall, 8 lines =q-fieldcapped at 118 withline 8and caret visibly in sight).976fb91b1eand fixed in493815678: case 10c (withCtrl+Entersubmitting, plainEnterin the typed answer inserted no newline:"one"+Enter+"two"gave"onetwo"). In Rune a multi-linetext_inputinserts\nnatively only onShift+Return(rune::el::input); plainEnteris left toon_input_key/on_submit. Fixed in both Classic and New docks (insert_typed_newlineincrates/session-view/src/dock/question/mod.rsandclassic.rs: inserts\nviaTextEdit::inserton plainEnterwhenSubmitKey::ModEnteris chosen).493815678c, the head that merges (Windows x64 CI build, run45731119759; headless,--scene question, no server; 3 launches exit 0):Ctrl+Entersubmitting (help="Next Ctrl+⏎"),q-inputfocused,"one"+ plainEnter+"two"->text="one\ntwo",q-customheight58,q-field46,q-input36,foc=true.Ctrl+Entersubmitting + New question UI (texts=["Next","Ctrl+⏎"]),q-inputfocused,"one"+ plainEnter+"two"->text="one\ntwo",q-customheight58,q-field46,q-input36,foc=true.Entersubmitting, ClassicDown+Entermoves to Q2 ("Submit"/help="Submit ⏎",opts=3[checkbox]).45731119759green on493815678c(guardrails, macOS, Windows x64, Windows arm64, Linux x64; Linux arm64 skipped).devtook no file of this change since its base.Headless, no server. Scenes
Question dock/QuestionandQuestion dock/Custom answer; Settings from the app's own fixture file.Question dock/Question, Down, then Enter: the second answer is picked and the dock shows the next question. Before: the answer is picked and the dock stays.Question dock/Custom answer, End: the caret is in the field (its box and ring show). Type "one", Shift+Enter, "two": the field shows two lines and its row is taller than 40. Up twice: the highlight is on the answer above. Before: End highlights the row only, and Shift+Enter adds no line.Question dock/Question: Enter picks and the dock stays; Ctrl+Enter moves on; the button's tip reads "Next Ctrl+⏎"; in the typed answer Enter starts a new line.Not run: a real window; macOS; Linux; a reply sent to a server (the dock's keys end in the same
nextas before).