Rename pointer API to reflect immediate hit-testing semantics
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bombshell-dev/tty
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bombshell-dev/tty#61 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
bombshell-dev/tty#129 ·
-
question
Difficulty 5/5 Over a week Newbie friendliness 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
Difficulty 3/5 1-2 days Newbie friendliness 68/100
bombshell-dev/tty#83 · 2 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
bombshell-dev/tty#82 ·
All issues in bombshell-dev/tty
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·