Repository navigation
fix(ui): the pointer's cursor follows the official desktop app, element by element - #1105
Merged
Merged
Conversation
…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
marked this pull request as ready for review
November 25, 2026 03:57
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-45forces a list of selectors tocursor: 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 keepsnot-allowed.packages/ui/src/styles/base.css:84setsa { cursor: default }: a link is the arrow unless a rule gives itpointer.packages/app/src/shell/shell.tsx:216makes the shellselect-noneoutside inputs: text is the arrow unless a rule gives ituser-select: text.The rule is not "always the arrow": official's source decides each element, in both directions.
The two reported elements:
packages/session-ui/src/components/message-part.css:1331[data-component="context-tool-group-trigger"] { cursor: default }, insidepackages/ui/src/components/collapsible.css:24message-part.css:1376cursor: pointer, forced todefaultbypackages/desktop/src/renderer/styles.css:34What changes
Removed (ours had it, official does not):
.cursor-grabis reset on Desktop).<a>or<button>with no cursor rule (a notice's name, the usage link, View all providers, Switch model).Kept, because official has it:
pointerand 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.zoom-inon Markdown images.Changed in kind:
ew-resize,ns-resizeandnwse-resize(packages/gui-plugins/src/browser/bar.css:243-271).zoom-in(message-part.css:772).Added (official has it, ours did not):
interface-mode.css:23) and on an upload's cancel (attachments.css:85).not-allowedon 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, commitd593705). 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.Windows shows
col-resizeas 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).cursoranduser-select), agrees with the reading for 60 elements: a plainbuttonand a plain<a>computedefault; the tool-group row and its toggle computedefault; Read more, Execute's rows, the quiet compaction divider and the layout cards computepointer; a disabledbutton-v2computesnot-allowed; Markdown and a user message's text areuser-select: textundercursor: auto(the I-beam).So it stays
scripts/guardrails/cursor-allow.mjs(inscripts/guardrails.sh, so in CI'sguardrailsjob) lists every.cursor(...)call, text link (.link) and selectable text (.selectable) underapps/,crates/andfeatures/againstscripts/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-allowedon the other disabled controls (official has it on every disabled button, field, switch and select): follow-up.bar.css:22): the bar is drawn by a plugin and the plugin contract has no cursor prop.helpon a retry's message andprogresson a pending queued message: Rune has no such cursors.zoom-inand four-way arrows forgrab(Chromium has its own pictures): a Rune change.