Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Rename pointer API to reflect immediate hit-testing semantics

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
typescript
Domain
api

Research direction

Start by tracing the current pointer render option, internal setPointer/getPointerOverIds pair, and Clay_SetPointerState through reduce and the BeginLayout/EndLayout flow. The change is done when the API clearly represents immediate hit-testing and no longer relies on hidden state or frame-behind naming.

Written by the indexing model from the issue text.

Description

Problem

setPointer in the render options suggests it's setting state for a future render, but Clay_SetPointerState actually performs immediate hit-testing against the current layout tree. The data flow is hidden behind a misleading name.

Proposal

Replace the current pointer render option and internal setPointer/getPointerOverIds pair with something like:

term.hitTest(x, y, down): PointerEvent[]

This makes the semantics clear: you pass coordinates in, you get element IDs out. No hidden state, no frame-behind confusion.

Context

Clay_SetPointerState walks the layout tree immediately and populates pointerOverIds. In our single-render() API it's called after reduce (which wraps BeginLayout/EndLayout), so it always tests against the frame that was just built. This is correct but non-obvious from the current naming.

Dominant language
TypeScript
Stars
42
Forks
2
Avg merge
2d 5h
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bombshell-dev/tty

All issues in bombshell-dev/tty

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.