glitchgrab 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +162 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -161,13 +161,174 @@ curl -H "Authorization: Bearer gg_your_token" \
|
|
|
161
161
|
"issue": {
|
|
162
162
|
"githubNumber": 42,
|
|
163
163
|
"githubUrl": "https://github.com/your/repo/issues/42",
|
|
164
|
-
"title": "Button not working"
|
|
164
|
+
"title": "Button not working",
|
|
165
|
+
"labels": ["bug"],
|
|
166
|
+
"severity": "medium",
|
|
167
|
+
"githubState": "open"
|
|
165
168
|
}
|
|
166
169
|
}
|
|
167
170
|
]
|
|
168
171
|
}
|
|
169
172
|
```
|
|
170
173
|
|
|
174
|
+
### Response fields
|
|
175
|
+
|
|
176
|
+
| Field | Description |
|
|
177
|
+
|-------|-------------|
|
|
178
|
+
| `id` | Report ID — use this for [managing issues](#managing-issues-approve--reject--close) |
|
|
179
|
+
| `source` | `SDK_AUTO` (crash) or `SDK_USER_REPORT` (user clicked report) |
|
|
180
|
+
| `status` | `PENDING`, `PROCESSING`, `CREATED`, `FAILED` |
|
|
181
|
+
| `reporterPrimaryKey` | The `userId` you passed in the session prop |
|
|
182
|
+
| `reporterName` | Reporter's display name |
|
|
183
|
+
| `issue.githubState` | Live GitHub issue state: `open`, `closed`, or `null` if deleted |
|
|
184
|
+
| `issue.labels` | Labels on the GitHub issue (e.g., `["bug", "approved"]`) |
|
|
185
|
+
| `issue.severity` | AI-assigned severity |
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Managing Issues (Approve / Reject / Close)
|
|
189
|
+
|
|
190
|
+
Once a report creates a GitHub issue, you can manage it from the dashboard or via API.
|
|
191
|
+
|
|
192
|
+
### Dashboard
|
|
193
|
+
|
|
194
|
+
Go to **Reports > Product Issues**. Each open report shows:
|
|
195
|
+
- **Approve** — adds `approved` label to GitHub issue
|
|
196
|
+
- **Reject** — adds `rejected` label to GitHub issue
|
|
197
|
+
- **Close** — closes the GitHub issue
|
|
198
|
+
|
|
199
|
+
### REST API
|
|
200
|
+
|
|
201
|
+
`POST /api/v1/reports/{reportId}/actions`
|
|
202
|
+
|
|
203
|
+
Auth: `Bearer gg_` token or dashboard session.
|
|
204
|
+
|
|
205
|
+
#### Approve a report
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
curl -X POST \
|
|
209
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
210
|
+
-H "Content-Type: application/json" \
|
|
211
|
+
-d '{"action": "label", "label": "approved"}' \
|
|
212
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
#### Reject a report
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
curl -X POST \
|
|
219
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
220
|
+
-H "Content-Type: application/json" \
|
|
221
|
+
-d '{"action": "label", "label": "rejected"}' \
|
|
222
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### Close an issue
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
curl -X POST \
|
|
229
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
230
|
+
-H "Content-Type: application/json" \
|
|
231
|
+
-d '{"action": "close"}' \
|
|
232
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
#### Reopen an issue
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
curl -X POST \
|
|
239
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
240
|
+
-H "Content-Type: application/json" \
|
|
241
|
+
-d '{"action": "reopen"}' \
|
|
242
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
#### Remove a label
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
curl -X POST \
|
|
249
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
250
|
+
-H "Content-Type: application/json" \
|
|
251
|
+
-d '{"action": "unlabel", "label": "rejected"}' \
|
|
252
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
#### Add any custom label
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
curl -X POST \
|
|
259
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
260
|
+
-H "Content-Type: application/json" \
|
|
261
|
+
-d '{"action": "label", "label": "high-priority"}' \
|
|
262
|
+
https://glitchgrab.dev/api/v1/reports/REPORT_ID/actions
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### How to get the report ID
|
|
266
|
+
|
|
267
|
+
Use the [Fetching Reports API](#fetching-reports-by-user) to list reports. Each report has an `id` field — use that as `REPORT_ID`.
|
|
268
|
+
|
|
269
|
+
### How it works
|
|
270
|
+
|
|
271
|
+
1. End-user reports a bug via SDK -> GitHub issue created
|
|
272
|
+
2. You fetch reports via API or view on dashboard
|
|
273
|
+
3. Approve/reject/close via API or dashboard buttons
|
|
274
|
+
4. Labels and state sync directly to GitHub — GitHub is the source of truth
|
|
275
|
+
|
|
276
|
+
## Conversation Thread (Comments)
|
|
277
|
+
|
|
278
|
+
Each report has a conversation thread powered by GitHub issue comments. No extra database — comments live on GitHub.
|
|
279
|
+
|
|
280
|
+
### View a report with comments
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
curl -H "Authorization: Bearer gg_your_token" \
|
|
284
|
+
https://glitchgrab.dev/api/v1/sdk/reports/REPORT_ID
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Returns the full issue body + all comments:
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"success": true,
|
|
292
|
+
"data": {
|
|
293
|
+
"id": "cmn7abc123",
|
|
294
|
+
"issue": {
|
|
295
|
+
"title": "Button not working",
|
|
296
|
+
"body": "## Description\n\nThe submit button...",
|
|
297
|
+
"githubState": "open",
|
|
298
|
+
"labels": ["bug"]
|
|
299
|
+
},
|
|
300
|
+
"comments": [
|
|
301
|
+
{
|
|
302
|
+
"author": "WebNaresh",
|
|
303
|
+
"body": "Can you share your browser version?",
|
|
304
|
+
"createdAt": "2026-03-27T10:00:00Z"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"author": "WebNaresh",
|
|
308
|
+
"body": "It's Chrome 120 on Windows\n\n---\n> Commented by: **Vivek** (vivek@example.com)",
|
|
309
|
+
"createdAt": "2026-03-27T10:05:00Z"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Reply to a report
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
curl -X POST \
|
|
320
|
+
-H "Authorization: Bearer gg_your_token" \
|
|
321
|
+
-H "Content-Type: application/json" \
|
|
322
|
+
-d '{"message": "I can reproduce this, fixing now", "reporterName": "Vivek", "reporterEmail": "vivek@example.com"}' \
|
|
323
|
+
https://glitchgrab.dev/api/v1/sdk/reports/REPORT_ID/comments
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
The comment is posted to the GitHub issue with attribution: "Commented by: **Vivek** (vivek@example.com)".
|
|
327
|
+
|
|
328
|
+
### Dashboard
|
|
329
|
+
|
|
330
|
+
Click any report on the Reports page to see the full conversation thread. Reply directly from the dashboard — comments sync to GitHub.
|
|
331
|
+
|
|
171
332
|
## Error Boundary
|
|
172
333
|
|
|
173
334
|
Wrap components to auto-capture React errors:
|