Skip to content

Commit 74248ae

Browse files
author
Sébastien Henau
committed
setup projects releases and what to focus on
1 parent ed2e177 commit 74248ae

File tree

1 file changed

+126
-0
lines changed

1 file changed

+126
-0
lines changed

.claude/docs/projects.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Projects
2+
3+
## Project 1: Core SDK hardening
4+
5+
Make `@flareapp/js` robust and feature-complete with what every competitor ships. This is the foundation everything else
6+
builds on — every framework package inherits its gaps.
7+
8+
**Error capture**
9+
10+
- [ ] Switch from `window.onerror =` to `addEventListener('error')` / `addEventListener('unhandledrejection')`
11+
- [ ] Error cause chain traversal: follow `error.cause` recursively, capture linked errors
12+
- [ ] Handle non-Error promise rejections: wrap strings/numbers/objects into a proper error
13+
14+
**Context collection**
15+
16+
- [ ] `setUser({ id, name, email, ...custom })` and `clearUser()` API
17+
- [ ] Device/browser/OS context: parse user agent into structured data (browser name+version, OS name+version, device
18+
type) — use `navigator.userAgentData` where available, fall back to UA string parsing
19+
- [ ] Screen/viewport context: `screen.width/height`, `innerWidth/innerHeight`
20+
- [ ] Additional context: `navigator.language`, timezone (`Intl.DateTimeFormat`), `navigator.onLine`
21+
22+
**Automatic breadcrumbs** (evolve the existing "glows" system)
23+
24+
- [ ] Breadcrumb infrastructure: typed breadcrumb entries with category/timestamp, circular buffer, coexist with
25+
manual `glow()` API
26+
- [ ] Console interception: monkey-patch `console.log/warn/error/info/debug`, record as breadcrumbs
27+
- [ ] DOM click tracking: global click listener, generate readable selector (tag + id/class/text)
28+
- [ ] Navigation/History tracking: patch `pushState`/`replaceState`, listen to `popstate`
29+
30+
**Reliability & filtering**
31+
32+
- [ ] Client-side rate limiting: configurable max errors per minute
33+
- [ ] Error deduplication: hash by message + top stack frames, suppress repeats within a window
34+
- [ ] Retry logic for report submission: exponential backoff on network failure (adapt pattern from vite plugin's
35+
`postWithRetry`)
36+
- [ ] `sampleRate` config option (0.0-1.0)
37+
38+
**Config**
39+
40+
- [ ] `enabled` toggle
41+
- [ ] `release` — track the user's app version
42+
- [ ] `ignoreErrors` — array of strings/regexes to suppress known noise
43+
- [ ] `allowUrls` / `denyUrls` — filter errors by script origin
44+
45+
**Release**
46+
47+
- [ ] Release @flareapp/js
48+
- [ ] Write announcement post
49+
50+
**Deferred from Project 1** (next sprint):
51+
52+
- XHR/Fetch request breadcrumbs — monkey-patching both `XMLHttpRequest` and `fetch` reliably is the single most
53+
complex item (streams, cloning, abort controllers, CORS). Worth its own focused effort.
54+
- `sendBeacon()` fallback for page unload — useful but not table stakes.
55+
56+
---
57+
58+
## Project 2: Enhanced React package
59+
60+
Make `@flareapp/react` competitive. Current implementation is 28 lines with no fallback UI.
61+
62+
- [ ] Fallback UI: implement `getDerivedStateFromError` so the boundary renders a fallback instead of unmounting
63+
- [ ] Configurable fallback: accept a component (`fallback={<ErrorPage />}`) or render prop
64+
(`fallback={(error, reset) => ...}`)
65+
- [ ] `onError` callback prop
66+
- [ ] `onReset` callback prop for error recovery flows
67+
- [ ] Capture the erroring component's display name (not just the raw stack string)
68+
- [ ] Release @flareapp/react
69+
- [ ] Write announcement post
70+
71+
**Deferred:** Component props capture, React Router integration, Redux/Zustand state capture.
72+
73+
---
74+
75+
## Project 4: Svelte package
76+
77+
New `@flareapp/svelte` package. Svelte/SvelteKit is increasingly popular and has no good lightweight error tracker.
78+
79+
- [ ] Create `@flareapp/svelte` package in the monorepo (package.json, tsconfig, tsdown build config)
80+
- [ ] Svelte error boundary component or `handleError` wrapper
81+
- [ ] SvelteKit integration: `handleError` server/client hooks
82+
- [ ] Capture component context (name, props where available)
83+
- [ ] Release @flareapp/svelte
84+
- [ ] Write announcement post
85+
86+
**Deferred:** SvelteKit routing breadcrumbs.
87+
88+
---
89+
90+
## Project 5: Turbopack sourcemap support
91+
92+
Currently Vite-only. The vite plugin's `FlareApi` (HTTP client, retry, compression) is mostly framework-agnostic —
93+
main work is abstracting away Vite's hook system.
94+
95+
- [ ] Extract shared sourcemap upload core from `@flareapp/vite` (API client, upload logic, retry, compression)
96+
- [ ] Create `@flareapp/turbopack` package: Turbopack/Next.js sourcemap upload plugin
97+
- [ ] Release @flareapp/turbopack (and updated @flareapp/vite if API changed)
98+
- [ ] Write announcement post
99+
100+
**Deferred:** Webpack plugin, Rollup plugin, esbuild plugin.
101+
102+
---
103+
104+
## Project 7: Documentation
105+
106+
Update docs after all features ship. Do this last so docs reflect the final state.
107+
108+
- [ ] Update frontend docs on flareapp.io
109+
- [ ] Split "JavaScript" docs into separate sections: JavaScript, React, Vue, Svelte
110+
- [ ] Review existing docs for clarity and completeness
111+
- [ ] Update spatie/flare-client-js internal docs (monorepo workflow, version tagging, local dev setup)
112+
- [ ] Release + announce
113+
114+
---
115+
116+
## Deferred projects
117+
118+
### Project 3: Vue enhancements
119+
120+
TypeScript rewrite is done. Remaining work (component props, Vue Router integration, Pinia state capture) deferred to
121+
next sprint.
122+
123+
### Project 6: Node.js and other environments
124+
125+
Verify Flare works in Node.js, Electron, React Native. Deferred because scope is unpredictable — could be quick if
126+
things already work, could balloon if they don't.

0 commit comments

Comments
 (0)