refactor(core): remove legacy plebbit terminology

This commit is contained in:
Tommaso Casaburi
2026-04-17 10:48:27 +07:00
parent e366dac25c
commit ee7a5b5778
158 changed files with 626 additions and 836 deletions
+1 -1
View File
@@ -163,6 +163,6 @@ Routes profiled: /route1, /route2, ...
- If `__getReactScanReport` returns null, note "react-scan report unavailable" and rely on commit counts
- If a route has no content or fails to load, note it in Info and move on
- **Always stop tracing and close the browser when done, even on errors** — wrap your workflow in a try/finally mindset: if any step fails, still run `tracing-stop` and `close`
- Board codes (`biz`, `pol`, `g`, etc.) map to subplebbit addresses via the app's directory
- Board codes (`biz`, `pol`, `g`, etc.) map to community addresses via the app's directory
- High commit counts without long tasks = frequent cheap rerenders — still worth fixing for efficiency
- React-scan report pinpoints exact components — prioritize these in recommendations
+2 -2
View File
@@ -55,13 +55,13 @@ AI adds try/catch blocks and null guards everywhere, even on trusted codepaths.
```typescript
// ❌ Slop — bitsocial-react-hooks already handles errors internally
try {
const { feed } = useFeed({ subplebbitAddresses });
const { feed } = useFeed({ communities });
} catch (error) {
console.error('Failed to fetch feed:', error);
}
// ✅ Clean — just use the hook directly
const { feed } = useFeed({ subplebbitAddresses });
const { feed } = useFeed({ communities });
```
### `as any` casts
+1 -1
View File
@@ -160,5 +160,5 @@ playwright-cli -s=prof-3 close 2>/dev/null
- **Per-route collection**: Data resets on each `goto` — the profiler collects before navigating away.
- **addInitScript persistence**: Instrumentation re-injects automatically in each new document.
- **Tracing**: Each subagent produces a `trace.zip` viewable in [Trace Viewer](https://trace.playwright.dev).
- **Board codes**: `biz`, `pol`, `g`, `a`, `v`, etc. map to subplebbit addresses via the directory.
- **Board codes**: `biz`, `pol`, `g`, `a`, `v`, etc. map to community addresses via the directory.
- **Without react-scan**: If `__getReactScanReport` returns null, the profiler falls back to commit counts + render bursts (still useful, just no component names).
@@ -134,7 +134,7 @@ if (typeof window !== 'undefined') {
| useEffect pattern | Replace with |
|-------------------|-------------|
| Fetch data | `useComment`, `useFeed`, `useSubplebbit`, etc. from bitsocial-react-hooks |
| Fetch data | `useComment`, `useFeed`, `useCommunity`, etc. from bitsocial-react-hooks |
| Sync shared state | Zustand store in `src/stores/` |
| Derive values from state | Calculate during render |
| Boolean loading/error flags | `state` field from bitsocial-react-hooks, or state machine in Zustand |