Skip to content

fix(question-dock): reach the answer highlight to the card's right edge - #2384

Open
opencode-agent[bot] wants to merge 1 commit into
devfrom
fix/question-highlight-right-edge
Open

opencode-agent[bot] wants to merge 1 commit into
devfrom
fix/question-highlight-right-edge

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

The composer question dock's answer highlight stopped 26 pt short of the card's right edge, while the left side reached 6 pt from it.

Why: the answers' scroll viewport had w_full() (width 100%) plus ml(-10) mr(-6). A fixed 100% width keeps the parent's width, so the negative margins only shifted the box left. In CSS, margin-inline on an auto-width block widens it on both sides.

Fix (crates/session-view/src/dock/question/composer.rs):

  • Drop w_full() on the viewport so the column stretches it and both negative margins widen it.
  • question-body end padding 16 → 12 pt, matching official (packages/session-ui/src/components/question-prompt.css:23, which question-answer-composer.css only overrides at the start). The highlight now sits 6 pt from both edges, and the × centres over the number badges again.

Before / after

I built both Linux x64 packages (before: #2380's build at 777c2bb, the parent of dev; after: this PR's build) and captured them headless with --scene question-composer --fixture --size 900x600 --script at four keyframes: at rest, pointer over answer 2, answer 2 picked, pointer over answer 3. Gaps come from --tree rects:

Keyframe Before: left / right gap After: left / right gap
t=0.4 s, at rest (answer 1) 6 pt / 26 pt 6 pt / 6 pt
t=1.0 s, hover answer 2 6 pt / 26 pt 6 pt / 6 pt
t=1.6 s, answer 2 picked 6 pt / 26 pt 6 pt / 6 pt
t=2.2 s, hover answer 3 6 pt / 26 pt 6 pt / 6 pt

I couldn't attach the annotated keyframe strips inline here: this agent can't upload GitHub attachments and has no public host for them. They're in the Slack thread that asked for this.

Requested by: @Hona (Hona via Slack)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant