aidenybai / aidenybai/react-grab

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

未關閉
#317 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
7.6k
分支
340
平均合併
5 小時 12 分鐘
30 天內合併 PR
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 摘要。