mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
refactor(core): remove legacy plebbit terminology
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user