[GH-ISSUE #809] [HAS PR] feat: clickable text extmarks for expand/collapse interactions #990

Open
opened 2026-03-14 09:12:25 +03:00 by kerem · 0 comments
Owner

Originally created by @tobwen on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/809

Summary

Add first-class clickable text extmark support so downstream TUIs can implement features like expand/edit/collapse summaries.

Scope

  • support click-capable extmark handlers in text buffers
  • preserve click target via the original mousedown offset
  • ignore drag-selection for click handler dispatch
  • keep typeId reindexing correct when extmarks are updated

Verification

  • added targeted tests for typeId update behavior and the drag-selection click regression
  • bun run build:lib passes
  • bun test src/lib/extmarks.test.ts src/renderables/__tests__/Textarea.selection.test.ts segfaults on local Bun 1.3.10

Screenshots / recordings

The closed state currently has no interactivity; video shows the final status.

Image

Originally created by @tobwen on GitHub (Mar 12, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/809 ## Summary Add first-class clickable text extmark support so downstream TUIs can implement features like expand/edit/collapse summaries. ## Scope - support click-capable extmark handlers in text buffers - preserve click target via the original `mousedown` offset - ignore drag-selection for click handler dispatch - keep `typeId` reindexing correct when extmarks are updated ## Verification - added targeted tests for `typeId` update behavior and the drag-selection click regression - `bun run build:lib` passes - `bun test src/lib/extmarks.test.ts src/renderables/__tests__/Textarea.selection.test.ts` segfaults on local Bun `1.3.10` ### Screenshots / recordings The closed state currently has no interactivity; video shows the final status. ![Image](https://github.com/user-attachments/assets/d57bcd41-e879-4268-8d6a-487f85a4d1ea)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#990
No description provided.