aidenybai / aidenybai/react-grab

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

オープン
#317 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
7.6k
フォーク
340
平均マージ
5時間 12分
マージ済み PR(30日)
6

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。