aidenybai / aidenybai/react-grab

Feature: text-range grab + accumulate multiple grabs into one list

Aperta
#317 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
7.6k
Fork
340
Merge medio
5h 12m
PR unite (30g)
6

Descrizione

react-grab's element-level grab is great for "this component is broken, fix it." But review sessions often have several smaller asks across the same view — copy fixes, prose polish, accessibility flags — and the current single-grab → single-paste flow forces a context switch on every item. Two additions would close the gap.

## 1. Text-range grab

The current grab targets the nearest element. Often what's wanted is a *span of text* inside a paragraph rather than the whole element — "this sentence is awkward" instead of "this `

` is awkward." When a non-collapsed text selection exists, ⌘C could output:

```
"the selected passage"
in BlogPost at app/blog/[slug]/page.tsx:42
```

— the text, the file, the line range from the source map, ready to paste.

## 2. Accumulate-as-list

Instead of clipboard-replacing on each grab, optionally collect them into a list visible in a small floating panel. Each grab adds a row; clicking **Copy list** at the end produces one structured block:

```
## Items

1. in LoginForm:46 — label is misleading
2. "this sentence is awkward" in BlogPost:42
3.

in Header:12 — needs better margin
```

One focused paste instead of several context-switches per session. Optional categorisation by colour or tag if you want to lean into the review-session metaphor.

## Reference

A recent PR on GRVYDEV/marky implements this exact pattern (selection → colour → accumulated list → copy as agent-ready block) for a markdown viewer: https://github.com/GRVYDEV/marky/pull/9. The shape — text-range anchoring, multi-item buffer, per-list export — translates cleanly to react-grab's surface (live browser DOM rather than static markdown).

Together, (1) and (2) turn react-grab from "tag one thing for the agent" into "do a 5-minute review pass and send the whole list in one paste."

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.