Repository navigation
feat(app): make redesigned question dock opt-in - #59723
Conversation
There was a problem hiding this comment.
I recommend merging, with the three points below. Questions now use the classic cards by default, and the redesigned dock appears only when Settings → Experimental → New question UI is on. The setting is remembered after a reload, and switching it on mid-question keeps the answers already given.
How I checked: the question-dock component suite passes 41/41, the settings unit tests pass, and tsc is clean for app, session-ui and ui. Before/after screenshots of the question story are below.
Public API: unchanged. This adds an app setting general.newQuestionUI (defaults to false), an optional variant prop on DockPrompt, and an "outline" variant on Keybind. All are additive.
Concerns:
-
Hover highlight in the experimental dock: pointer hover no longer moves the highlight, which undoes #59333. The description doesn't mention this (inline comment).
-
MCP elicitation dock: it renders
DockPrompt kind="question"with novariant, so it now always gets the classic question styles, whatever the setting is. Can you confirm that's intended? -
New classic tests: they pin a lot of styling detail (inline comment).
-
packages/app/component-tests/session-question-dock.spec.ts:89: The new classic tests (here and the default-cards test above) mostly pin styling: font sizes and weights, a 12px left offset,transition-duration/easing values, animation lists sampled straight after a synchronousclick(). These will break on any restyle without catching a behaviour bug. Could you cut them down to the behaviour itself: classic cards by default, selection and submit, the long list staying inside the panel, minimize/restore, and the toggle keeping answers?
| <div | ||
| data-slot="question-options-list" | ||
| ref={(el) => (listRef = el)} | ||
| onPointerDown={() => setStore("highlight", false)} |
There was a problem hiding this comment.
Compared with the dock on dev, this drops the pointer-hover highlight (lit, hover(), the onPointerMove/onPointerLeave handlers) and leaves the highlight keyboard-only. That undoes #59333, and the spec was rewritten from "only for hover or the arrow keys" to "never for hover". If it's intentional, please mention it in the description. Otherwise, consider keeping the experimental dock exactly as it is on dev so this PR stays a pure opt-in split.
There was a problem hiding this comment.
Intentional: removing the pointer-following highlight was part of the requested change, including in the experimental dock. Hover must not change the answer targeted by keyboard input. The PR description now explicitly documents this.
|
Follow-up pushed in 37c772c:
Verification: 42 unit tests and 40 repeated focused UI checks pass, along with package typechecks and |
There was a problem hiding this comment.
Nothing in the new commit blocks merging, and it addresses both of my earlier points. The description now says the hover highlight was removed on purpose, in the experimental dock too, and that MCP elicitation keeps the classic look on purpose. The classic tests now check only behaviour (default cards and submit, long list kept inside the panel, minimize/restore, the opt-in toggle) instead of styling values. The classic checkbox now uses the shared check icon instead of an SVG mask.
On the new head, the question-dock component suite passes 39/39, the settings unit tests pass, and tsc is clean for packages/app. The public API is unchanged.
There was a problem hiding this comment.
The new commit only merges dev into the branch; the files this PR changes are identical to the version I last reviewed. On the merged head, the packages/app type check, the settings unit tests and the question-dock component suite (39/39) all pass. The public API is unchanged. Nothing new to raise.
There was a problem hiding this comment.
The new commit only merges dev and resolves the settings conflicts. The PR's own changes are unchanged, and the "New question UI" setting now sits next to dev's "Fold long messages" experiment. On the merged head, the packages/app type check, the settings unit tests and the question-dock component suite (39/39) pass. The public API is unchanged. Nothing new to raise.


Issue for this PR
Related: #51770, #54035. Neither issue is closed by this PR.
Type of change
What does this PR do?
Restore classic question cards by default; keep the redesigned dock under Settings → Experimental → New question UI.
Add right-edge keyboard shortcuts and subtle feedback. Keep long answer lists bounded to the panel, and keyboard/reduced-motion interactions instant.
Removing the pointer-following answer highlight is intentional, including in the experimental dock. Hover must not change the answer targeted by keyboard input.
MCP elicitation intentionally keeps the classic frame regardless of the question UI setting; its fields and submission behavior are unchanged.
How did you verify your code works?
bun run checkand affected package typechecks pass.dev(34/35); unchanged here.Visual
Screenshots / recordings
Before:

After:

Checklist
Added by the opencode bot (AI-generated).
Related: #51770, #54035