Skip to content

fix(ui): the pointer's cursor follows the official desktop app, element by element - #1105

Merged
Hona merged 3 commits into
devfrom
cursor-fix/align-official
Nov 25, 2026
Merged

Hona merged 3 commits into
devfrom
cursor-fix/align-official

Conversation

@Hona

@Hona Hona commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

The pointer's cursor over each element now follows the official desktop app. Hovering a tool-group row such as "Ran 2 commands", or its collapse toggle, no longer turns the arrow into a hand.

Why

Our app set a hand on nearly every control (190 of our own .cursor(Cursor::Pointer) calls) and a grab cursor on a drag handle. The official desktop app does not:

  • packages/desktop/src/renderer/styles.css:1-45 forces a list of selectors to cursor: default !important: "Desktop controls and drag handles use the default cursor; the pointer cursor is reserved for links." It is :not(:disabled), so a disabled control keeps not-allowed.
  • packages/ui/src/styles/base.css:84 sets a { cursor: default }: a link is the arrow unless a rule gives it pointer.
  • packages/app/src/shell/shell.tsx:216 makes the shell select-none outside inputs: text is the arrow unless a rule gives it user-select: text.

The rule is not "always the arrow": official's source decides each element, in both directions.

The two reported elements:

element official decided by
a tool-group row ("Ran 2 commands") arrow packages/session-ui/src/components/message-part.css:1331 [data-component="context-tool-group-trigger"] { cursor: default }, inside packages/ui/src/components/collapsible.css:24
its collapse / expand toggle arrow message-part.css:1376 cursor: pointer, forced to default by packages/desktop/src/renderer/styles.css:34

What changes

Removed (ours had it, official does not):

  • The hand on 190 controls: tool rows and their toggles, tabs and their close buttons, sidebar rows, menus and picker options, composer buttons, Settings controls, panel toolbars, file tree rows.
  • The grab cursor on the queue's drag handle (official's .cursor-grab is reset on Desktop).
  • The hand over five plain links official draws as an <a> or <button> with no cursor rule (a notice's name, the usage link, View all providers, Switch model).

Kept, because official has it:

  • The hand on 17 controls whose CSS says pointer and which Desktop's reset does not name: a user message's Read more, Execute's call rows, a long Read group, a quote that expands, the quiet compaction divider, the question dock's custom-answer mark, About's version, a notice's License, Console's toggle and links, Retry after a failed save. Official is not consistent here; ours copies it as it is.
  • Every resize edge (sidebar, side panel, file trees, the splitter between panes, the terminal's edge), the I-beam in fields and over selectable text, the hand on links in messages and Settings, zoom-in on Markdown images.

Changed in kind:

  • The browser's device grips take official's ew-resize, ns-resize and nwse-resize (packages/gui-plugins/src/browser/bar.css:243-271).
  • A tool's image takes zoom-in (message-part.css:772).

Added (official has it, ours did not):

  • The hand on the layout and navigation cards (interface-mode.css:23) and on an upload's cancel (attachments.css:85).
  • not-allowed on a disabled Send (packages/ui/src/actions/submit.css:79).

The run

Before: the published 0.0.0-dev-484. After: this PR's CI build (Windows x64, commit d593705). A real window; the pointer is moved onto each element (found by its key path in the build's own tree, with the element on top at the point checked there) and the cursor the window's own thread set is read once the pointer has rested on it.

  • 92 stops over the session (timeline, composer, header, tab strip), an open tool group, the session menu, the model picker, the composer's add menu, the side panel, Review, Files, the browser pane, the terminal, Home, Settings, the sidebar and the new-session page.
  • Before: 50 of 92 differed from official. After: 1 differs (the browser's address bar, below), and for 1 official is not settled (an answered question's text).
  • Dragging still works on both builds (headless, the same input): the sidebar's edge, the side panel's edge, Review's and Files' file-tree edges each move by the drag; a dragged tab changes place; typing into the prompt lands.
element before after official
timeline: tool-group row (the "Ran 2 commands" kind; here "Edited stream.ts, backoff.ts · 1 command") hand arrow arrow
timeline: that row's collapse / expand toggle (the arrow) hand arrow arrow
timeline: tool-group row "Explored 2 files, 1 search" hand arrow arrow
timeline: its collapse / expand toggle hand arrow arrow
timeline: an open tool group's Shell row (a command that ran) hand arrow arrow
timeline: Thought row hand arrow arrow
timeline: subagent row hand arrow arrow
timeline: Copy response hand arrow arrow
timeline: assistant text (selectable) I-beam I-beam I-beam
timeline: user message text I-beam I-beam I-beam
composer: the prompt field I-beam I-beam I-beam
composer: Choose model hand arrow arrow
composer: Send (disabled: the prompt is empty) arrow not-allowed not-allowed
model picker: a model row hand arrow arrow
session menu: an item (Rename) hand arrow arrow
tab strip: New session hand arrow arrow
sidebar: Home row hand arrow arrow
sidebar: its resize edge resize (left-right) resize (left-right) col-resize
side panel: its resize edge resize (left-right) resize (left-right) col-resize
Review: file tree's resize edge resize (left-right) resize (left-right) col-resize
Files: file tree's resize edge resize (left-right) resize (left-right) col-resize
Files: a file tree row hand arrow arrow
Settings: Back to app hand arrow arrow
Settings: Help & feedback link hand arrow arrow
Settings: a layout card (Side tabs) arrow hand hand
Home: a session row hand arrow arrow
new session: the wordmark egg's grip arrow arrow arrow
browser pane: the address bar arrow arrow I-beam

Windows shows col-resize as its left-right resize cursor. The full table (every call, official's line for each, the Chromium check of official's style sheets) is kept with the run's files.

A static page with official's own style sheets, read in a headless Chromium 159 (getComputedStyle(el).cursor and user-select), agrees with the reading for 60 elements: a plain button and a plain <a> compute default; the tool-group row and its toggle compute default; Read more, Execute's rows, the quiet compaction divider and the layout cards compute pointer; a disabled button-v2 computes not-allowed; Markdown and a user message's text are user-select: text under cursor: auto (the I-beam).

So it stays

scripts/guardrails/cursor-allow.mjs (in scripts/guardrails.sh, so in CI's guardrails job) lists every .cursor(...) call, text link (.link) and selectable text (.selectable) under apps/, crates/ and features/ against scripts/cursor-allow.txt: path | kind | count | the official line that justifies it. A call that is not listed, a count that differs and a stale line all fail, so a new cursor needs a line that names official's source.

Not in this change

  • not-allowed on the other disabled controls (official has it on every disabled button, field, switch and select): follow-up.
  • The I-beam over the browser's address bar (bar.css:22): the bar is drawn by a plugin and the plugin contract has no cursor prop.
  • help on a retry's message and progress on a pending queued message: Rune has no such cursors.
  • On Windows, Rune shows the arrow for zoom-in and four-way arrows for grab (Chromium has its own pictures): a Rune change.
  • macOS and Linux were not run. By reading: the same requests reach each platform's own cursors; removing a request leaves the arrow on all three.

Hona added 3 commits November 25, 2026 12:48
…nt by element

The hand goes from every control that official shows with the arrow (Desktop's cursor reset, packages/desktop/src/renderer/styles.css: the pointer cursor is reserved for links), and stays where official keeps it. The queue's drag handle loses its grab cursor, the browser's device grips take official's ew / ns / nwse-resize, tool images take zoom-in, and the layout cards and an upload's cancel gain the hand official has.
…ial line that justifies it

scripts/guardrails/cursor-allow.mjs checks each .cursor(...) call, text link and selectable text under apps/, crates/ and features/ against scripts/cursor-allow.txt (path, kind, count, reason). A disabled Send takes official's not-allowed cursor.
@Hona
Hona marked this pull request as ready for review November 25, 2026 03:57
@Hona
Hona merged commit b95c520 into dev Nov 25, 2026
7 checks passed
@Hona
Hona deleted the cursor-fix/align-official branch November 25, 2026 03:57
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