Skip to content

feat(app): make redesigned question dock opt-in - #59723

Merged
usrnk1 merged 5 commits into
devfrom
classic-questions
Oct 29, 2026
Merged

usrnk1 merged 5 commits into
devfrom
classic-questions

Conversation

@usrnk1

@usrnk1 usrnk1 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Related: #51770, #54035. Neither issue is closed by this PR.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 check and affected package typechecks pass.
  • 42 app unit tests pass.
  • 40 repeated question UI checks pass (10 repetitions, 2 workers).
  • Full question suite: 38/39 pass locally. The experimental “restores a long list without growing past where it rests” sizing test also fails on dev (34/35); unchanged here.

Visual

<svg xmlns="http://www.w3.org/2000/svg" width="240" height="72" viewBox="0 0 240 72" fill="none">
  <style>
    @keyframes pick { 0%,20%,90%,100% { opacity:0 } 35%,75% { opacity:1 } }
    .picked { animation:pick 3s ease infinite }
    @media (prefers-reduced-motion:reduce) { .picked { animation:none } }
  </style>
  <rect x="8" y="8" width="224" height="56" rx="8" stroke="currentColor" opacity=".25"/>
  <g class="picked" opacity="1">
    <rect x="9" y="9" width="222" height="54" rx="7" fill="currentColor" opacity=".08"/>
    <circle cx="24" cy="28" r="2.5" fill="currentColor"/>
  </g>
  <circle cx="24" cy="28" r="6" stroke="currentColor" opacity=".5"/>
  <text x="40" y="32" font-size="11" fill="currentColor">Answer option</text>
  <rect x="40" y="42" width="120" height="3" rx="1.5" fill="currentColor" opacity=".2"/>
  <rect x="205" y="29" width="14" height="14" rx="2" stroke="currentColor" opacity=".4"/>
  <text x="212" y="39" text-anchor="middle" font-size="9" fill="currentColor" opacity=".7">1</text>
</svg>

Screenshots / recordings

Before:
Question dock before

After:
Classic question dock after

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #51770, #54035

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 no variant, 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 synchronous click(). 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?

Related: #51770, #54035

Before

After

<div
data-slot="question-options-list"
ref={(el) => (listRef = el)}
onPointerDown={() => setStore("highlight", false)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@usrnk1

usrnk1 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in 37c772c:

  • MCP elicitation intentionally keeps the classic frame, independent of the question UI experiment. The PR description now confirms this; its fields and submission behavior are unchanged.
  • Trimmed the new classic tests to default cards, selection/submission, stable footer width, bounded scrolling, instant minimize/restore, and toggle/answer persistence. Removed the font/gutter/shadow/easing assertions and animation sampling.
  • Reused the shared checkbox icon and removed the duplicated SVG asset, CSS timing alias, and redundant persistence unit case.

Verification: 42 unit tests and 40 repeated focused UI checks pass, along with package typechecks and bun run check. The same experimental sizing test still fails locally on both this branch and dev.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@usrnk1
usrnk1 merged commit 7d0f79d into dev Oct 29, 2026
20 checks passed
@usrnk1
usrnk1 deleted the classic-questions branch October 29, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant