aidenybai / aidenybai/react-grab

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

Ouverte
#317 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
7.6k
Forks
340
Merge moyen
5 h 12 min
PR mergées (30 j)
6

Description

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."

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.