Skip to content

fix(desktop): hide the prompt rail where it would cover user messages - #5630

Merged
Astro-Han merged 2 commits into
apache:mainfrom
Totoro-qaq:fix/prompt-rail-narrow-width
Sep 28, 2026
Merged

Astro-Han merged 2 commits into
apache:mainfrom
Totoro-qaq:fix/prompt-rail-narrow-width

Conversation

@Totoro-qaq

@Totoro-qaq Totoro-qaq commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

At narrow Desktop windows the prompt rail covered the right edge of user messages (#5615).

I measured the geometry in Storybook. Once the reading column fills the scrollport, the room to its right is:

  • the transcript gutter (clamp(12px, 4vw, 40px)), plus
  • the 16px inline padding of Astryx's message list.

The rail's full hit box takes 49px from the scrollport's edge on hover: a 12px resting inset, the existing 3px inward hover movement, and a 34px box (the 26px bar plus padding).

4vw + 16px reaches 49px at an 825px viewport. Below that, the rail host is hidden using @media (width < 825px). At 825px and wider, the rail retains its existing behavior. The hover inset is preserved because it also keeps the ticks clear of the macOS overlay scrollbar. The stale 22px width comment is corrected to 34px.

Alternative considered: reserving right-hand clearance in the transcript instead. That keeps the rail at narrow widths, but at those widths it pushes the reading column off-centre from the composer. Happy to switch if that is preferred.

Fixes #5615

Verification

  • The existing PromptRailClearsUserMessagesInANarrowWindow story now runs at 720, 824, 825 and 1280px. It explicitly checks hidden/visible states on each side of the boundary. At shown widths, Playwright drives a real pointer hover and checks the complete hovered hit box against visible user bubbles.

  • The WorkHub narrow story now checks the intended hidden state while preserving its filtering, reset, keyboard and overflow assertions. Wide-mode rail geometry and hit-testing checks remain.

  • Fresh Storybook build and complete render smoke pass: 393 stories / 428 theme renders. Two renders failed under concurrency and passed the existing isolated retry (product-model-picker--executor-catalog-ready, product-workhub--filter-work-conversations); no timeouts or retries were changed.

  • Nine focused jobs passed in both headless and headed Chromium on macOS. At 825 and 1280px, actual rail clicks navigated to the selected Turn. At 800px the prior threshold allowed 1px hover overlap on two user bubbles; the new rule hides the rail with no overlap.

  • Negative controls fail as intended: restoring the 750px threshold fails at 824px; raising it to 900px fails at 825px.

  • Root build/typecheck, lint/format, Desktop/UI knip, renderer architecture, Astryx surface inventory, ASF headers, Windows test inventory and diff checks pass locally.

  • No production Electron app was launched for the follow-up; frontend validation used the production Storybook component/frame in a real headed browser. Hosted CI for the pushed follow-up must be checked separately.

  • Original 560px before/after: light theme, with the rail's box outlined in red. The rail remains hidden at this width under the updated threshold.

maka-5630-before-560 maka-5630-after-560
  • Not verified yet: manual check in the Desktop app.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code helped investigate, implement and test this change. The initial commit carries a Generated-by: Claude Code trailer. Codex handled the review follow-up, boundary/hover coverage and browser validation; the follow-up commit carries Generated-by: Codex.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Once the reading column fills the scrollport, the room right of it is
the transcript gutter (4vw) plus the message list's 16px inline padding,
while the prompt rail takes 46px from the scrollport's edge. Below a
750px window its ticks and their hit area covered the right edge of user
messages. Hide the rail there, as the quote companion does, and correct
the rail width in the scrollbar comment.

Generated-by: Claude Code
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 23, 2026
@Totoro-qaq
Totoro-qaq marked this pull request as draft September 23, 2026 13:16

@me2seeks me2seeks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated review notice: This comment was posted by an automated review agent operated by me2seeks make. It is not an independent human review and does not replace one.

Summary

The PR hides the prompt rail below a 750px viewport (@media (max-width: 749px) on .maka-prompt-rail-host) to fix #5615, where the rail overlapped user bubbles in narrow Desktop windows, and corrects a stale 22px→34px width comment. The issue is real: base shows the rail takes 46px from the scrollport edge (12px inset + 26px bar + 8px padding, prompt-rail.css:70,163) against a right-side room of clamp(12px, 4vw, 40px) + 16px (maka-tokens.css:947, chat-header.css:191), and SAFE_MIN_WIDTH = 480 (window-state.ts:52) makes sub-750px windows reachable. The direction is right, minimal, and matches the existing quote-companion precedent (side-chat.css:47). CI, however, is red.

Findings

  1. [P1] CI — the required test context failed on the head (9m6s). Per .github/workflows/ci.yml:42-44 this is the required merge gate. The diff surface (desktop CSS + stories) selects the code/storybook lanes, and the Storybook smoke step (ci.yml:452-454) executes the new story's play function at 720px, so the failure may be this PR's story, a flaky desktop e2e, or unrelated — the artifacts include no log, so the cause is unconfirmed. It must be green (and attributed) before merge.
  2. [P3] apps/desktop/src/renderer/styles/prompt-rail.css:50-53 vs the body's "at 750px and wider nothing changes": on hover the rail shifts 3px inward (right: 15px, prompt-rail.css:112-115), so its transparent pointer-events: auto box reaches 49px from the scrollport edge while the room at 750–824px viewports is only 46–49px. The visible bar (45px) stays clear as claimed, but the hit box covers up to 3px of each user bubble's right edge while hovered. Consider folding the 3px hover shift into the threshold.
  3. [P3] apps/desktop/stories/app-shell.stories.tsx:3187-3189 — the fixed-path pass is cause-agnostic: at 720px the play returns early for any boxless rail, and no test pins the upper side of the boundary. A mutation raising the threshold to e.g. 900px (hiding the rail at widths where it fits) passes everything; only the sibling 1280px stories bound the blast radius. One assertion tying the 720px pass to the media query (and/or a 750px-shown check) would make the threshold itself mutation-proof. Reverting the fix does fail the story, so core coverage works.

Verdict

needs-changes — required test check is failing on the head; the CSS fix itself is sound, well-reasoned, and adequately (if imperfectly) tested. Also still a draft with the manual Desktop check pending.

Hide the rail below 825px so its full hovered hit area clears user
messages. Preserve the existing hover inset and adapt WorkHub's narrow
story to the responsive visibility contract without skipping filtering.

Exercise both sides of the boundary and real pointer hover in Storybook
smoke, with an explicit viewport matrix for the existing rail story.

Generated-by: Codex
@Totoro-qaq
Totoro-qaq marked this pull request as ready for review September 28, 2026 03:09
@github-actions github-actions Bot added effort/M Under 500 readable lines and removed effort/S Under 100 readable lines labels Sep 28, 2026

@hqhq1025 hqhq1025 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The follow-up fixes the earlier hover-clearance gap: the host is hidden below 825px, and the browser smoke now exercises 824/825px plus the hovered hit box against visible user bubbles. I found no further substantiated P0–P3 issue in the five-file change. The focused smoke-job tests pass (14/14); the current-head hosted test and label checks pass, and the branch merges cleanly with the latest main. I did not run the full Storybook smoke or a packaged Desktop app locally, so this is not a manual Desktop sign-off.

Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.

@Astro-Han

Copy link
Copy Markdown
Contributor

Thanks @Totoro-qaq for the contribution and for following up on review feedback. Merging at @Astro-Han's request.

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved at @Astro-Han's explicit request: no blocking findings in the automated review of this head, and CI is green.

@Astro-Han
Astro-Han merged commit 71bc045 into apache:main Sep 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(desktop): prompt anchor rail overlaps user messages at narrow widths

4 participants