Skip to content

view!: selectable text and inline links - #99

Draft
1bye wants to merge 5 commits into
mainfrom
codex/view-text-links-87
Draft

1bye wants to merge 5 commits into
mainfrom
codex/view-text-links-87

Conversation

@1bye

@1bye 1bye commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Paragraphs and headings can opt into text selection with select-text or a literal class="select-text". <a href> works inside and outside paragraphs, with named Link nodes, retained keyboard focus, Enter activation, and pointer targets over the actual wrapped text runs. Dragging selects without following the link, and copy preserves painted text and whitespace.

Single-slash app paths use the current window's router. HTTP(S), mailto and tel use open_url; protocol-relative URLs, whitespace/control characters, backslashes and other schemes are rejected on native and Web. Link and selection styling use the existing semantic primary/selection tokens. Base owns selection; its small adapter and copy changes are recorded in vendor/gpui-base/RAKE-PATCH.md.

Adds the link-name lint and generated guides, parser/href/interaction regressions, a selectable linked paragraph and standalone link in the view example, and updates docs/view.md.

Closes #87

Validation:

  • Worktree-built rake-app-cli; all 49 lint unit tests passed, including the new rule and generated-artifact checks.
  • cargo test -p rake-view-syntax --lib: 27 passed.
  • cargo test -p rake-ui --features test-support --lib: 12 passed, including key-up duplication, wrapped-row activation, drag-versus-click, styled-run copy, whitespace, and visible-only truncated copy.
  • Scoped native rake-view --features devtools build and worktree CLI Web build passed. No toolchain/package installs; an existing matching wasm-bindgen binary was used.
  • Ran the example on this Mac and drove it through rake ctl: accessible names, managed focus, Tab focus in a rendered capture, focus background, pointer/keyboard dispatch, theme switching, and exact 92-character native clipboard contents.
  • Rendered the Web bundle in light and dark; verified wrapped-row clicks, one activation per Enter, drag suppression, and exact copy payloads for Command-C and Control-C. Browser URL/clipboard API calls were intercepted for assertions.
  • rake format on changed Rust files and --check passed; worktree-built rake lint checked 787 files with zero diagnostics. Full workspace builds were left to CI.

Limits of verification:

  • Browser clipboard readback timed out; the exact navigator.clipboard.writeText payload was verified instead. Native clipboard readback passed.
  • The existing Web canvas DOM accessibility snapshot exposes its IME input rather than the GPUI semantic tree. Native and Rake inspection Link roles/names were verified; browser screen-reader behavior is not established.
  • The root-only view example uses external links. App-path classification and route callback dispatch are tested, but real router history changes were not manually exercised through a link.

The target directory was deleted after builds. The worktree and verification logs remain locally. This PR is draft and must not be merged automatically.

🤖 Generated with Claude Code

1bye and others added 5 commits November 21, 2026 09:29
Closes #87

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

view!: selectable text and inline links

1 participant