Skip to content

mouse-override icon: document in layout spec, switch glyph to CursorTextIcon#154

Merged
nedtwigg merged 2 commits into
mainfrom
fix/layout-spec-mouse-icon
Jun 20, 2026
Merged

mouse-override icon: document in layout spec, switch glyph to CursorTextIcon#154
nedtwigg merged 2 commits into
mainfrom
fix/layout-spec-mouse-icon

Conversation

@dormouse-bot

@dormouse-bot dormouse-bot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

What

Two related changes to the mouse-reporting override indicator in the pane header.

1. Document the override icon in the layout spec. The pane-header section of docs/specs/layout.md omitted the mouse-reporting override icon entirely — it was absent from both the "Elements from left to right" list and the responsive-tier breakdown. The icon has lived in the header for a while (defined in docs/specs/mouse-and-clipboard.md), but #148 made its tier behavior concrete: it now drops at the minimal tier (showMouseIcon && tier !== 'minimal' in TerminalPaneHeader.tsx). That change updated the code without updating layout.md, leaving the placement/tier spec — which AGENTS.md designates as the source of truth for header element placement and sizing — incomplete.

2. Switch the override glyph to CursorTextIcon. While the override is active, the No-Mouse indicator previously rendered Phosphor's SelectionSlashIcon; it now renders CursorTextIcon. This is a user-visible runtime change to the glyph shown when an override is in effect. The mouse-and-clipboard.md and layout.md specs are updated to match.

Changes

Docs (docs/specs/layout.md, docs/specs/mouse-and-clipboard.md):

  • Add the mouse-reporting override icon to the header element list, in its actual position (after the flexible gap, before the split icons).
  • Cross-reference docs/specs/mouse-and-clipboard.md for its visual states/behavior, mirroring how the bell and TODO pill point at alert.md.
  • Update the three tier descriptions: the icon is visible in the full and compact tiers and hidden in minimal, and it only appears at all when the inside program requests mouse reporting.
  • Update the No-Mouse icon's Phosphor name from SelectionSlashIcon to CursorTextIcon.

Runtime (lib/src/components/wall/TerminalPaneHeader.tsx):

  • Replace SelectionSlashIcon with CursorTextIcon for the override indicator (import + render site).

Verification

Cross-checked against the source: the render order in lib/src/components/wall/TerminalPaneHeader.tsx places the icon between the flexible (flex-1 overflow-hidden) region and the tier === 'full' split/zoom block, gated on tier !== 'minimal'; tier thresholds (>280 full, >160 compact, else minimal) match the ResizeObserver callback. Terminology (CursorClickIcon / CursorTextIcon, "Mouse icon") matches mouse-and-clipboard.md. Build & Test is green.

The icon swap has no automated test; it's a single-glyph substitution with no behavioral branch beyond the existing inOverride conditional.

…ment list and tiers

The pane-header spec omitted the mouse-reporting override icon from both
the element list and the responsive-tier breakdown. #148 made its tier
behavior concrete (hidden at the minimal tier) without updating the spec.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 38704ca
Status: ✅  Deploy successful!
Preview URL: https://f3fd848a.mouseterm.pages.dev
Branch Preview URL: https://fix-layout-spec-mouse-icon.mouseterm.pages.dev

View logs

Replace SelectionSlashIcon with CursorTextIcon in the pane-header
override indicator and update the layout and mouse-and-clipboard specs
to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@dormouse-bot dormouse-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The docs additions check out: I traced the render order in TerminalPaneHeader.tsx and the override-icon block (showMouseIcon && tier !== 'minimal') sits after the flexible-gap region and before the tier === 'full' split block — matching the new element-list position and the per-tier visibility now spelled out in layout.md. The SelectionSlashIconCursorTextIcon swap is consistent: no SelectionSlashIcon references remain anywhere, CursorTextIcon is already imported/used in MobileTerminalUi.tsx, and Build & Test is green.

One scope observation: the second commit (refactor(mouse): use CursorTextIcon…, 38704ca) changes the glyph users actually see when an override is active — a user-visible runtime change — but the PR title (docs(layout):) and the body ("Changes (docs only)" / "documentation-only change with no runtime behavior") predate it and now describe only the first commit. On a squash-merge that would file the icon change under docs. Worth refreshing the title/body to cover the icon refactor so the merged history reflects both concerns.

@dormouse-bot dormouse-bot changed the title docs(layout): document the mouse-override icon in the pane-header spec mouse-override icon: document in layout spec, switch glyph to CursorTextIcon Jun 19, 2026
@dormouse-bot

Copy link
Copy Markdown
Collaborator Author

Addressed the scope observation from the review: refreshed the PR title and description so they cover the CursorTextIcon glyph swap (a user-visible runtime change) alongside the layout-spec docs, rather than describing only the first commit as "docs only". The merged history will now reflect both concerns.

@nedtwigg nedtwigg merged commit d74f347 into main Jun 20, 2026
9 checks passed
@nedtwigg nedtwigg deleted the fix/layout-spec-mouse-icon branch June 20, 2026 14:24
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.

2 participants