chore: catch up to 5chan — deps, pkc-js RPC, AI workflow, default directory subscriptions#820
Conversation
- @bitsocial/bitsocial-react-hooks 0.1.2 -> 0.1.26 - add @pkcprotocol/pkc-js 0.0.62 and @bitsocial/bso-resolver 0.0.8 (electron RPC) - react/react-dom 19.1.2 -> 19.2.7, @types/react 19.2.16, @types/react-dom 19.2.3 - vite 8.0.5 -> 8.0.16 (dep + resolution) - node-fetch 2 -> 3.3.2, drop @types/node-fetch (v3 ships its own types) - @types/node 20.8.2 -> 20.19.37, fs-extra 11.2.0 -> 11.3.0 - add @electron/rebuild 3.7.2 + electron:rebuild-native script (better-sqlite3 now ships via pkc-js)
- replace start-plebbit-rpc.js with start-pkc-rpc.js + start-pkc-rpc-core.js
(5chan template, same 9138 port and auth-key handling)
- add pkc-rpc-options.js with BSO name resolvers via @bitsocial/bso-resolver
- add pkc-paths.js: data dir moves from EnvPaths('plebbit') / .plebbit to
EnvPaths('pkc') / .pkc, with a one-time rename of the legacy plebbit data
dir so existing users keep their communities and accounts
- main.js, start-ipfs.js, log.js now resolve data/log paths through pkc-paths
- preload.mjs exposes window.defaultPkcOptions (pkcRpcClientsOptions) and
window.pkcRpcAuthKey via pkc-named IPC channels
- electron:before:delete-data clears both .pkc and legacy .plebbit - android icons temp dir renamed to /tmp/seedit-android-icons - forge.config.js excludes both .pkc and .plebbit from packages - knip.jsonc drops @plebbit/plebbit-js entries now that the electron RPC imports @pkcprotocol/pkc-js directly
- window.defaultPlebbitOptions -> window.defaultPkcOptions (p2p. subdomain) - account.plebbitOptions/plebbitRpcClientsOptions -> pkcOptions/ pkcRpcClientsOptions in settings views and account import utils - account.plebbit -> account.pkc when stripping the client instance from account export/editor JSON - rpc settings data path now read from pkcRpcSettings.pkcOptions.dataPath - account import keeps a shim that upgrades legacy plebbitOptions exports - drop unused catch binding in start-pkc-rpc.js (oxlint)
Adopt the reworked hook entry points: Claude Code hooks now live in .claude/settings.json (settings-format with $CLAUDE_PROJECT_DIR paths), the obsolete .claude/hooks.json is removed, and .cursor/hooks.json is updated to the compact format. Hook scripts are unchanged.
Port the reworked agent descriptors across .claude, .cursor, and .codex: tools: frontmatter for read-only agents, browser-session guidance, untrusted page-content rules, machine-path removal, and yarn doctor/knip verification guidance. seedit adaptations: correct the Android appId to seedit.android (the old copies wrongly said fivechan.android), use a seedit-test-api35 AVD name, rewrite test-apk around the direct catbox.moe FileUploaderPlugin (seedit has no WebView upload automation or instrumentation test suite), replace 5chan board/catalog route examples with /s/<community-address> routes, and point react-scan wiring at vite.config.js instead of the 5chan-only src/lib/react-scan.ts.
…om 5chan
The shared hook implementations now parse both Cursor ({file_path}) and
Claude/Codex ({tool_input: {file_path}}) stdin shapes, normalize absolute
paths to repo-relative, emit hookSpecificOutput additionalContext on
PostToolUse so reminders reach the model, honor stop_hook_active to avoid
stop loops, skip verification on a clean tree, and exit 2 (blocking) on
verify failure. sync-git-branches keeps bitsocialnet/seedit and gains the
unmerged-PR output check.
…r seedit AGENTS.md: document the harness-specific hook entry points (.claude/ settings.json, .cursor/hooks.json, .codex/hooks.json), add the ai-workflow:check router row and command, browser-session confirmation rules for playwright verification, the translate-skill router row, and reworked AI Tooling Rules ordering. seedit keeps its own project overview, changelog-based maintenance rules, and stays without DESIGN.md/blotter/low-spec/android-usb content. Playbooks: rewrite hooks-setup.md around the new entry points and shared script behavior, add the committed skills/subagents index to skills-and-tools.md, and note the canonical commit/issue-format skills in commit-issue-format.md (without 5chan's required-scope rule, which seedit does not use).
Add scripts/validate-ai-workflow.mjs and the ai-workflow:check script. Fix the one drift it found: seedit's .claude and .cursor copies of the profile-browsing skill disagreed on the dev-server probe URL and the Portless note.
…isadaptations Port generic improvements: stale main->master branch names in deslop and you-might-not-need-an-effect, invalid rg --type tsx flag in fix-merge-conflicts, the reworked verified/update-in-place readme skill, the Chesterton's Fence rule in refactor-pass, the independent-subagent- verification rule in review-and-merge-pr, harness-neutral wording in inspect-elements/implement-plan/translate. Correct seedit misadaptations left over from the original copy: test-apk now uses appId seedit.android, a seedit AVD, and the direct catbox.moe FileUploaderPlugin flow instead of 5chan's WebView upload automation and instrumentation suite; profile-browsing drops 5chan board-code routes for /s/<community-address>. Kept seedit-flavored: commit-format (no required scope), release and release-description (no blotter), doctor-vs-repo-standard verification wording in implement-plan and review-and-merge-pr.
…cript Port 5chan's directory machinery adapted to seedit terminology: per-code candidate community lists, ranking/winner selection, directory codes as subscription entries, legacy default migration transform, and a vendored mirror of bitsocialnet/lists/seedit-directories with a sync:directories script.
…lists Add hooks that fetch per-code candidate lists from the lists repo (1h localStorage cache, in-flight dedup, vendored fallback), pick the highest-ranked online winner with offline rotation, expand account.subscriptions directory codes at read time, and derive the default communities for /s/all from the union of all directory winners. Rework the one-time auto-subscribe into the directory migration: drop the dead legacy default communities and subscribe the 10 directory codes under a new per-account localStorage guard.
/s/<code> resolves like a community page via the directory winner while /s/<address> keeps working; the home feed expands directory-code subscriptions into winner addresses without flashing the empty state; the subscribe button targets the code on directory routes with a 'subscribe to this community only' pin action; subscription lists render directory entries as s/<code> with a (directory) marker and the resolved community as subtitle.
Vitest coverage for isDirectoryCode (reserved words, dots, unknown codes), candidate ranking and offline rotation, subscription expansion dedupe, list normalization with defaults, and the legacy migration transform including idempotence.
… and __PROFILING__ flag Replace the @react-scan/vite-plugin-react-scan wiring with 5chan's manual dev-only src/lib/react-scan.ts, imported in the entry file. It exposes window.__getReactScanReport() and window.__ELEMENT_SOURCE__ (element-source helpers the inspect-elements skill already referenced) and honors window.__PROFILING__ to hide the toolbar during automated profiling. Update profile-browsing SKILL.md and profiler agent copies to match.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThis PR updates AI workflow docs and hooks, renames Electron’s plebbit stack to PKC, removes react-scan’s Vite plugin in favor of runtime bootstrapping, and adds directory-code subscriptions with vendored offline data and route-aware UI updates. ChangesAI Agent Tooling and Workflow Documentation
Estimated code review effort: 4 (Complex) | ~45 minutes Electron PKC Rebrand
Estimated code review effort: 5 (Critical) | ~90 minutes React-scan Runtime Bootstrap
Estimated code review effort: 2 (Simple) | ~10 minutes Directory-based Community Subscriptions
Estimated code review effort: 5 (Critical) | ~90 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CommunityView
participant useResolvedCommunityAddress
participant useDirectoryWinners
participant useDirectoryList
User->>CommunityView: navigate to /s/<directoryCode>
CommunityView->>useResolvedCommunityAddress: resolve identifier
useResolvedCommunityAddress->>useDirectoryWinners: get winner for code
useDirectoryWinners->>useDirectoryList: fetch directory list
useDirectoryList-->>useDirectoryWinners: list (cache/localStorage/GitHub)
useDirectoryWinners-->>useResolvedCommunityAddress: winnerAddress
useResolvedCommunityAddress-->>CommunityView: resolved communityAddress
CommunityView-->>User: render directory-aware community view
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (3)
scripts/agent-hooks/react-pattern-review.sh (1)
31-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract shared path-normalization helper across hook scripts.
The repo-relative path normalization (strip
$repo_rootprefix, reject other absolute paths) is now implemented three times with slightly different shapes: here asnormalize_file_path, inline informat.sh(lines 22-27), and inline inyarn-install.sh(lines 19-26). Since these are shared, repo-managed scripts (per path instructions forscripts/**), consolidating into one sourced helper (e.g.scripts/agent-hooks/_lib.sh) would prevent future drift between harness-parsing behaviors.As per path instructions,
scripts/**: "Keep shell helpers thin. When logic becomes stateful or cross-platform, prefer a Node script."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/agent-hooks/react-pattern-review.sh` around lines 31 - 51, The repo-relative path normalization logic is duplicated across multiple hook scripts, including normalize_file_path in react-pattern-review.sh and the inline equivalents in format.sh and yarn-install.sh. Extract this shared behavior into a single reusable helper (for example, a sourced scripts/agent-hooks/_lib.sh) and update each script to call that helper so absolute-path rejection and repo_root stripping stay consistent across all harness parsers.Source: Path instructions
src/lib/react-scan.ts (1)
12-23: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueDuplicate "not ready" error stubs.
resolveBySelectorandresolveAtPoint(Lines 16-21) re-implement the same{ error: 'element-source is not ready yet.' }shape already defined bynotReady(Lines 8-10) instead of reusing it.♻️ Proposed fix
const elementSourceApi: any = { ready: false, error: null, resolve: notReady, - resolveBySelector: async () => ({ - error: 'element-source is not ready yet.', - }), - resolveAtPoint: async () => ({ - error: 'element-source is not ready yet.', - }), + resolveBySelector: notReady, + resolveAtPoint: notReady, formatStack: () => '', };🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/react-scan.ts` around lines 12 - 23, The `elementSourceApi` object in `react-scan.ts` duplicates the same “not ready” error payload in `resolveBySelector` and `resolveAtPoint` instead of reusing the existing `notReady` helper. Update those methods to return the shared `notReady` result so the error shape stays centralized and consistent with `resolve`.src/lib/utils/directory-codes.ts (1)
5-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider deriving
SEEDIT_DIRECTORY_CODESfrom the defaults data instead of hardcoding twice.
SEEDIT_DIRECTORY_CODESduplicates the key set already present inseedit-directories-defaults.json'sdirectoriesobject. If a new directory is added to the vendored/remote defaults without updating this array (or vice versa),isDirectoryCodewill silently reject a valid code (or accept a code with no matching data), and the corresponding/s/<code>route will never resolve. Deriving the list fromvendoredDirectoryDefaults.directorieskeys at module load would remove this drift risk.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/lib/utils/directory-codes.ts` around lines 5 - 15, SEEDIT_DIRECTORY_CODES is hardcoded separately from the defaults data, which can drift from the actual directory keys used by isDirectoryCode. Update directory-codes.ts to derive SEEDIT_DIRECTORY_CODES from vendoredDirectoryDefaults.directories at module load, then keep DIRECTORY_CODES_SET built from that derived list so the route checks always match the current defaults. Use the existing isDirectoryCode helper and RESERVED_COMMUNITY_ROUTE_WORDS as-is, but ensure the directory code source of truth comes from the defaults object rather than a duplicated literal array.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/agents/test-apk.md:
- Around line 39-40: The logcat command reference is out of sync with the
workflow and is missing Capacitor logs, which can hide plugin lifecycle issues.
Update the table entry in test-apk.md so the Logcat (upload) example matches
Step 4 by including Capacitor:* alongside FileUploaderPlugin:* in the adb logcat
command, keeping the reference consistent with the upload test instructions.
In @.codex/skills/fix-merge-conflicts/SKILL.md:
- Line 59: The leftover-conflict-marker scan is too narrow because the final
`rg` in the merge-conflict workflow only checks ts and json files, so markers in
other text-based files can be missed. Update the scan command in the
fix-merge-conflicts workflow to search all relevant source/docs/config file
types used by the repo, including Markdown, YAML, JS/TSX, and similar text
files, while keeping the same conflict-marker patterns.
In @.cursor/agents/profiler.md:
- Line 83: The example in profiler.md uses the route without the leading slash,
which makes the documented path relative instead of an app route. Update the
example to use the full `/s/...` form consistently, matching the route shape
used elsewhere; specifically adjust the `ROUTE` placeholder example so it shows
`/s/all` or `/s/<community-address>` rather than `s/all`.
In `@docs/agent-playbooks/skills-and-tools.md`:
- Around line 5-35: The “Committed Skills Index” in skills-and-tools.md now says
context7, vercel-react-best-practices, and find-skills are already committed and
should be preferred, but the lower “Recommended Skills” entries still tell
agents to install those same skills with npx skills add. Update the
documentation by removing or merging the redundant installation subsections for
Context7, Vercel React Best Practices, and Find Skills, or clearly label them as
alternate/upstream sources so the guidance is not contradictory. Use the
existing skill names and section headings to locate the conflicting content,
then regenerate the mirrored llms output after the source edit.
In `@scripts/sync-directories.js`:
- Around line 64-76: The GitHub-sourced filename handling in getRemoteFiles is
missing a path-traversal defense, so a malicious entry.name could still flow
into the write path and raw URL. Add a basename/sanitization guard when building
fileNames from contents so only safe flat JSON filenames are accepted before
they reach fetchWithTimeout and the later join(OUTPUT_DIR, fileName) write step,
and reject any name containing path separators or traversal segments.
In `@src/components/sidebar/sidebar.module.css`:
- Around line 51-56: The .directoryNotice rule uses deprecated word-wrap, which
triggers stylelint’s property-no-deprecated check. Update the sidebar.module.css
styling to use overflow-wrap instead, keeping the same breaking-word behavior so
the Sidebar directory notice still wraps long text correctly and yarn lint
passes.
In `@src/hooks/use-directory-list.ts`:
- Around line 204-247: The initial state in useDirectoryLists is being seeded
only inside useEffect, so the first render shows empty listsByCode/loadingByCode
and breaks the synchronous vendored-fallback behavior expected by
useDirectoryWinners. Move the cache/localStorage/vendored lookup into
synchronous render-time initialization, ideally by reusing
computeInitialDirectoryListsState(directoryCodesKey) from useDirectoryList as
the lazy useState initializer or a useMemo-fed initializer. Keep the effect
focused on the async fetch work only, so directoryCodesKey changes don’t briefly
flash empty state before the lists are populated.
In `@src/lib/react-scan.ts`:
- Around line 2-77: The outer import('react-scan') chain in react-scan.ts can
reject without being handled, causing an unhandled promise rejection if the
chunk fails to load. Add a .catch() to the top-level import chain around
scan/getReport initialization, and make sure the failure is surfaced through the
existing react-scan bootstrap path (for example by setting an error on
__ELEMENT_SOURCE__ or logging it) similarly to the inner element-source import
handling.
In `@src/views/communities/communities.module.css`:
- Around line 185-190: The .directoryServedBy CSS rule uses the deprecated
word-wrap property, which triggers Stylelint’s property-no-deprecated check.
Update the communities.module.css style block to use overflow-wrap instead,
keeping the same wrapping behavior and leaving the rest of the
.directoryServedBy declarations unchanged.
---
Nitpick comments:
In `@scripts/agent-hooks/react-pattern-review.sh`:
- Around line 31-51: The repo-relative path normalization logic is duplicated
across multiple hook scripts, including normalize_file_path in
react-pattern-review.sh and the inline equivalents in format.sh and
yarn-install.sh. Extract this shared behavior into a single reusable helper (for
example, a sourced scripts/agent-hooks/_lib.sh) and update each script to call
that helper so absolute-path rejection and repo_root stripping stay consistent
across all harness parsers.
In `@src/lib/react-scan.ts`:
- Around line 12-23: The `elementSourceApi` object in `react-scan.ts` duplicates
the same “not ready” error payload in `resolveBySelector` and `resolveAtPoint`
instead of reusing the existing `notReady` helper. Update those methods to
return the shared `notReady` result so the error shape stays centralized and
consistent with `resolve`.
In `@src/lib/utils/directory-codes.ts`:
- Around line 5-15: SEEDIT_DIRECTORY_CODES is hardcoded separately from the
defaults data, which can drift from the actual directory keys used by
isDirectoryCode. Update directory-codes.ts to derive SEEDIT_DIRECTORY_CODES from
vendoredDirectoryDefaults.directories at module load, then keep
DIRECTORY_CODES_SET built from that derived list so the route checks always
match the current defaults. Use the existing isDirectoryCode helper and
RESERVED_COMMUNITY_ROUTE_WORDS as-is, but ensure the directory code source of
truth comes from the defaults object rather than a duplicated literal array.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0cb4540e-8868-4fd6-96eb-28b4747f2de9
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (124)
.claude/agents/browser-check.md.claude/agents/code-quality.md.claude/agents/plan-implementer.md.claude/agents/profiler.md.claude/agents/react-doctor-fixer.md.claude/agents/react-patterns-enforcer.md.claude/agents/test-apk.md.claude/hooks.json.claude/settings.json.claude/skills/deslop/SKILL.md.claude/skills/fix-merge-conflicts/SKILL.md.claude/skills/implement-plan/SKILL.md.claude/skills/inspect-elements/SKILL.md.claude/skills/profile-browsing/SKILL.md.claude/skills/readme/SKILL.md.claude/skills/refactor-pass/SKILL.md.claude/skills/review-and-merge-pr/SKILL.md.claude/skills/test-apk/SKILL.md.claude/skills/translate/SKILL.md.claude/skills/you-might-not-need-an-effect/SKILL.md.codex/agents/browser-check.toml.codex/agents/code-quality.toml.codex/agents/plan-implementer.toml.codex/agents/profiler.toml.codex/agents/react-doctor-fixer.toml.codex/agents/react-patterns-enforcer.toml.codex/agents/test-apk.toml.codex/config.toml.codex/skills/deslop/SKILL.md.codex/skills/fix-merge-conflicts/SKILL.md.codex/skills/implement-plan/SKILL.md.codex/skills/inspect-elements/SKILL.md.codex/skills/profile-browsing/SKILL.md.codex/skills/readme/SKILL.md.codex/skills/refactor-pass/SKILL.md.codex/skills/review-and-merge-pr/SKILL.md.codex/skills/test-apk/SKILL.md.codex/skills/you-might-not-need-an-effect/SKILL.md.cursor/agents/browser-check.md.cursor/agents/code-quality.md.cursor/agents/plan-implementer.md.cursor/agents/profiler.md.cursor/agents/react-doctor-fixer.md.cursor/agents/react-patterns-enforcer.md.cursor/agents/test-apk.md.cursor/hooks.json.cursor/skills/deslop/SKILL.md.cursor/skills/fix-merge-conflicts/SKILL.md.cursor/skills/implement-plan/SKILL.md.cursor/skills/inspect-elements/SKILL.md.cursor/skills/profile-browsing/SKILL.md.cursor/skills/readme/SKILL.md.cursor/skills/refactor-pass/SKILL.md.cursor/skills/review-and-merge-pr/SKILL.md.cursor/skills/test-apk/SKILL.md.cursor/skills/translate/SKILL.md.cursor/skills/you-might-not-need-an-effect/SKILL.md.gitignoreAGENTS.mddocs/agent-playbooks/commit-issue-format.mddocs/agent-playbooks/hooks-setup.mddocs/agent-playbooks/skills-and-tools.mdelectron/log.jselectron/main.jselectron/pkc-paths.jselectron/pkc-rpc-options.jselectron/preload.mjselectron/start-ipfs.jselectron/start-pkc-rpc-core.jselectron/start-pkc-rpc.jselectron/start-plebbit-rpc.jsforge.config.jsknip.jsoncpackage.jsonpublic/llms-full.txtpublic/llms.txtpublic/translations/en/default.jsonscripts/agent-hooks/format.shscripts/agent-hooks/react-pattern-review.shscripts/agent-hooks/sync-git-branches.shscripts/agent-hooks/verify.shscripts/agent-hooks/yarn-install.shscripts/sync-directories.jsscripts/validate-ai-workflow.mjssrc/components/sidebar/sidebar.module.csssrc/components/sidebar/sidebar.tsxsrc/components/topbar/topbar.tsxsrc/data/seedit-directories/seedit-askseedit-directory.jsonsrc/data/seedit-directories/seedit-aww-directory.jsonsrc/data/seedit-directories/seedit-directories-defaults.jsonsrc/data/seedit-directories/seedit-funny-directory.jsonsrc/data/seedit-directories/seedit-gaming-directory.jsonsrc/data/seedit-directories/seedit-interestingasfuck-directory.jsonsrc/data/seedit-directories/seedit-memes-directory.jsonsrc/data/seedit-directories/seedit-news-directory.jsonsrc/data/seedit-directories/seedit-pics-directory.jsonsrc/data/seedit-directories/seedit-todayilearned-directory.jsonsrc/data/seedit-directories/seedit-videos-directory.jsonsrc/data/vendored-directory-lists.tssrc/hooks/use-auto-subscribe.tssrc/hooks/use-default-subscriptions.tssrc/hooks/use-directory-list.tssrc/hooks/use-directory-winners.tssrc/hooks/use-expanded-subscriptions.tssrc/hooks/use-now-seconds.tssrc/hooks/use-resolved-community-address.tssrc/index.tsxsrc/lib/react-scan.tssrc/lib/utils/account-import-utils.tssrc/lib/utils/community-freshness-utils.tssrc/lib/utils/directory-codes.test.tssrc/lib/utils/directory-codes.tssrc/lib/utils/directory-list-utils.test.tssrc/lib/utils/directory-list-utils.tssrc/lib/utils/legacy-default-subscriptions.test.tssrc/lib/utils/legacy-default-subscriptions.tssrc/views/communities/communities.module.csssrc/views/communities/communities.tsxsrc/views/community/community.tsxsrc/views/home/home.tsxsrc/views/settings/account-data-editor/account-data-editor.tsxsrc/views/settings/account-settings/account-settings.tsxsrc/views/settings/plebbit-options/plebbit-options.tsxvite.config.js
💤 Files with no reviewable changes (4)
- .claude/hooks.json
- electron/start-plebbit-rpc.js
- vite.config.js
- knip.jsonc
| ``` | ||
|
|
||
| Note the output of each eval — you need it for the final analysis. Replace `ROUTE` with the actual path (e.g., `all`, `biz/catalog`). | ||
| Note the output of each eval — you need it for the final analysis. Replace `ROUTE` with the actual path (e.g., `s/all`, `s/<community-address>`). |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use the full /s/... route form in the example.
The example drops the leading /, so copied commands would navigate to a relative path (s/all) instead of the app route (/s/all). Please align it with the route shape used elsewhere.
Suggested fix
- Replace ROUTE with the actual path (e.g., `s/all`, `s/<community-address>`).
+ Replace ROUTE with the actual path (e.g., `/s/all`, `/s/<community-address>`).📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Note the output of each eval — you need it for the final analysis. Replace `ROUTE` with the actual path (e.g., `s/all`, `s/<community-address>`). | |
| Note the output of each eval — you need it for the final analysis. Replace `ROUTE` with the actual path (e.g., `/s/all`, `/s/<community-address>`). |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.cursor/agents/profiler.md at line 83, The example in profiler.md uses the
route without the leading slash, which makes the documented path relative
instead of an app route. Update the example to use the full `/s/...` form
consistently, matching the route shape used elsewhere; specifically adjust the
`ROUTE` placeholder example so it shows `/s/all` or `/s/<community-address>`
rather than `s/all`.
| .directoryNotice { | ||
| margin-top: 2px; | ||
| font-size: 11px; | ||
| color: var(--text); | ||
| word-wrap: break-word; | ||
| } |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Replace deprecated word-wrap with overflow-wrap.
Stylelint flags this as an error (property-no-deprecated), which will fail yarn lint.
🩹 Proposed fix
.directoryNotice {
margin-top: 2px;
font-size: 11px;
color: var(--text);
- word-wrap: break-word;
+ overflow-wrap: break-word;
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .directoryNotice { | |
| margin-top: 2px; | |
| font-size: 11px; | |
| color: var(--text); | |
| word-wrap: break-word; | |
| } | |
| .directoryNotice { | |
| margin-top: 2px; | |
| font-size: 11px; | |
| color: var(--text); | |
| overflow-wrap: break-word; | |
| } |
🧰 Tools
🪛 Stylelint (17.14.0)
[error] 55-55: Expected "word-wrap" to be "overflow-wrap" (property-no-deprecated)
(property-no-deprecated)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/components/sidebar/sidebar.module.css` around lines 51 - 56, The
.directoryNotice rule uses deprecated word-wrap, which triggers stylelint’s
property-no-deprecated check. Update the sidebar.module.css styling to use
overflow-wrap instead, keeping the same breaking-word behavior so the Sidebar
directory notice still wraps long text correctly and yarn lint passes.
Source: Linters/SAST tools
…ent setAccount failure
…r scan, dedupe committed skills guidance
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/skills/fix-merge-conflicts/SKILL.md:
- Line 59: The merge-marker scan in the fix-merge-conflicts skill currently
misses dotfiles because rg skips hidden and ignored files. Update the scan
command in the SKILL.md entry that uses rg so it includes hidden files and
ignored paths (or replace it with git grep), and make the same change in all
three fix-merge-conflicts/SKILL.md copies so leftover conflict markers in
.claude/, .codex/, and .cursor/ are detected.
In @.codex/skills/fix-merge-conflicts/SKILL.md:
- Line 59: The conflict-marker scan in the merge-conflicts skill currently uses
rg in a way that skips hidden repo directories, so unresolved markers under
tooling dotfolders can be missed. Update the scan command in SKILL.md to include
hidden files (and optionally ignored files if needed) or switch to git grep, and
keep the existing marker pattern so the check still finds conflict markers
across .codex, .cursor, and .claude.
In @.cursor/skills/fix-merge-conflicts/SKILL.md:
- Line 59: The marker scan in the merge-conflict skill currently misses
repo-managed hidden directories because the rg-based check ignores dotfiles.
Update the scan command in SKILL.md to include hidden and ignored files, or
replace it with git grep, so unresolved conflict markers are detected under
.cursor/, .codex/, and .claude/ as well; keep the change localized to the
conflict-marker search instruction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ef2cae7b-e1b3-4d72-b95a-ab2d6f0a8127
📒 Files selected for processing (16)
.claude/agents/test-apk.md.claude/skills/fix-merge-conflicts/SKILL.md.codex/skills/fix-merge-conflicts/SKILL.md.cursor/agents/test-apk.md.cursor/skills/fix-merge-conflicts/SKILL.mddocs/agent-playbooks/skills-and-tools.mdelectron/pkc-paths.jspublic/llms-full.txtscripts/sync-directories.jssrc/components/sidebar/sidebar.module.csssrc/data/seedit-directories/seedit-pics-directory.jsonsrc/hooks/use-auto-subscribe.tssrc/hooks/use-directory-list.tssrc/lib/react-scan.tssrc/lib/utils/directory-codes.test.tssrc/views/communities/communities.module.css
💤 Files with no reviewable changes (2)
- docs/agent-playbooks/skills-and-tools.md
- public/llms-full.txt
✅ Files skipped from review due to trivial changes (1)
- src/data/seedit-directories/seedit-pics-directory.json
🚧 Files skipped from review as they are similar to previous changes (10)
- src/views/communities/communities.module.css
- src/components/sidebar/sidebar.module.css
- .claude/agents/test-apk.md
- src/lib/utils/directory-codes.test.ts
- electron/pkc-paths.js
- .cursor/agents/test-apk.md
- src/hooks/use-auto-subscribe.ts
- src/lib/react-scan.ts
- scripts/sync-directories.js
- src/hooks/use-directory-list.ts
|
|
||
| ```bash | ||
| rg '<<<<<<<|=======|>>>>>>>' --type ts --type tsx --type json | ||
| rg -n '^(<{7} |={7}$|>{7} )' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '--- file excerpt ---\n'
cat -n .codex/skills/fix-merge-conflicts/SKILL.md | sed -n '45,75p'
printf '\n--- rg default hidden-file behavior probe ---\n'
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
mkdir -p "$tmpdir/.hidden" "$tmpdir/visible"
printf '<<<<<<\n' > "$tmpdir/.hidden/conflict.txt"
printf '<<<<<<\n' > "$tmpdir/visible/conflict.txt"
echo 'default rg:'
rg -n '^(<{7} |={7}$|>{7} )' "$tmpdir" || true
echo
echo '--hidden rg:'
rg -n --hidden '^(<{7} |={7}$|>{7} )' "$tmpdir" || true
echo
echo '--hidden --no-ignore rg:'
rg -n --hidden --no-ignore '^(<{7} |={7}$|>{7} )' "$tmpdir" || trueRepository: bitsocialnet/seedit
Length of output: 248
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the relevant section of the skill file
cat -n .codex/skills/fix-merge-conflicts/SKILL.md | sed -n '50,66p'
echo
echo '--- rg hidden-file probe ---'
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
mkdir -p "$tmpdir/.hidden" "$tmpdir/visible"
printf '<<<<<<<\n' > "$tmpdir/.hidden/conflict.txt"
printf '<<<<<<<\n' > "$tmpdir/visible/conflict.txt"
echo '[default]'
rg -n '^(<{7} |={7}$|>{7} )' "$tmpdir" || true
echo
echo '[--hidden]'
rg -n --hidden '^(<{7} |={7}$|>{7} )' "$tmpdir" || true
echo
echo '[--hidden --no-ignore]'
rg -n --hidden --no-ignore '^(<{7} |={7}$|>{7} )' "$tmpdir" || trueRepository: bitsocialnet/seedit
Length of output: 658
🏁 Script executed:
#!/bin/bash
set -euo pipefail
tmpdir="$(mktemp -d)"
trap 'rm -rf "$tmpdir"' EXIT
mkdir -p "$tmpdir/.hidden" "$tmpdir/visible"
# Match the exact regex from the skill file
printf '<<<<<<< \n' > "$tmpdir/.hidden/conflict.txt"
printf '<<<<<<< \n' > "$tmpdir/visible/conflict.txt"
echo '[default]'
rg -n '^(<{7} |={7}$|>{7} )' "$tmpdir" || true
echo
echo '[--hidden]'
rg -n --hidden '^(<{7} |={7}$|>{7} )' "$tmpdir" || true
echo
echo '[--hidden --no-ignore]'
rg -n --hidden --no-ignore '^(<{7} |={7}$|>{7} )' "$tmpdir" || trueRepository: bitsocialnet/seedit
Length of output: 463
Include hidden files in the conflict-marker scan. .codex/skills/fix-merge-conflicts/SKILL.md:59 rg skips dotfiles by default, so this check misses unresolved markers in .codex/, .cursor/, and .claude/. Add --hidden (and --no-ignore if you want to ignore .gitignore too) or use git grep so the scan covers those repo-managed tooling dirs.
🧰 Tools
🪛 SkillSpector (2.3.7)
[warning] 76: [RP1] null: npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
Remediation: Pin the version: npx @scope/server@1.2.3
(MCP Rug Pull (RP1))
[warning] 13: [EA2] Autonomous Decision Making: Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
Remediation: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
(Excessive Agency (EA2))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.codex/skills/fix-merge-conflicts/SKILL.md at line 59, The conflict-marker
scan in the merge-conflicts skill currently uses rg in a way that skips hidden
repo directories, so unresolved markers under tooling dotfolders can be missed.
Update the scan command in SKILL.md to include hidden files (and optionally
ignored files if needed) or switch to git grep, and keep the existing marker
pattern so the check still finds conflict markers across .codex, .cursor, and
.claude.
Source: Coding guidelines
|
|
||
| ```bash | ||
| rg '<<<<<<<|=======|>>>>>>>' --type ts --type tsx --type json | ||
| rg -n '^(<{7} |={7}$|>{7} )' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Locate the skill file and inspect the relevant section with line numbers.
git ls-files '.cursor/skills/fix-merge-conflicts/SKILL.md'
wc -l .cursor/skills/fix-merge-conflicts/SKILL.md
sed -n '45,75p' .cursor/skills/fix-merge-conflicts/SKILL.md
# Check whether the repo contains the hidden tooling directories mentioned in the comment.
git ls-files '.cursor/**' '.codex/**' '.claude/**' | sed -n '1,120p'Repository: bitsocialnet/seedit
Length of output: 7646
Include hidden repo-managed files in the marker scan.
rg skips dotfiles by default, so this check can miss unresolved markers in .cursor/, .codex/, and .claude/. Add --hidden --no-ignore or switch to git grep so the scan covers the repo-managed tooling dirs too.
🧰 Tools
🪛 SkillSpector (2.3.7)
[warning] 76: [RP1] null: npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
Remediation: Pin the version: npx @scope/server@1.2.3
(MCP Rug Pull (RP1))
[warning] 13: [EA2] Autonomous Decision Making: Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
Remediation: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
(Excessive Agency (EA2))
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.cursor/skills/fix-merge-conflicts/SKILL.md at line 59, The marker scan in
the merge-conflict skill currently misses repo-managed hidden directories
because the rg-based check ignores dotfiles. Update the scan command in SKILL.md
to include hidden and ignored files, or replace it with git grep, so unresolved
conflict markers are detected under .cursor/, .codex/, and .claude/ as well;
keep the change localized to the conflict-marker search instruction.
Source: Coding guidelines
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4fd3ce9. Configure here.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.claude/agents/react-doctor-fixer.md (1)
41-76: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAdd an explicit
yarn doctorstatus.The report only records build/lint/type-check as PASS/FAIL, so a failed
yarn doctorrun is indistinguishable from a clean run that still emits diagnostics. Add a dedicated doctor PASS/FAIL field alongside the existing summary.Proposed tweak
### Verification - **Build/lint/type-check:** PASS/FAIL +- **React doctor:** PASS/FAIL - **Original issue resolved:** YES/NO🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.claude/agents/react-doctor-fixer.md around lines 41 - 76, The React Doctor Fix Report currently summarizes build/lint/type-check but does not explicitly report the outcome of yarn doctor, making doctor failures ambiguous. Update the reporting logic in the react-doctor-fixer flow so the final structured report includes a dedicated “doctor” PASS/FAIL field alongside the existing Verification summary, using the same output parsing and status handling already present around the verification commands and report assembly. Ensure the report distinguishes a clean doctor run from one with diagnostics, and keep the new field aligned with the existing “Build/lint/type-check” status format.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.claude/agents/react-doctor-fixer.md:
- Around line 41-76: The React Doctor Fix Report currently summarizes
build/lint/type-check but does not explicitly report the outcome of yarn doctor,
making doctor failures ambiguous. Update the reporting logic in the
react-doctor-fixer flow so the final structured report includes a dedicated
“doctor” PASS/FAIL field alongside the existing Verification summary, using the
same output parsing and status handling already present around the verification
commands and report assembly. Ensure the report distinguishes a clean doctor run
from one with diagnostics, and keep the new field aligned with the existing
“Build/lint/type-check” status format.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1e6754c5-427b-413b-9fb8-dfab90fe6f90
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (15)
.claude/agents/react-doctor-fixer.md.claude/agents/react-patterns-enforcer.md.claude/skills/fix-merge-conflicts/SKILL.md.codex/agents/react-doctor-fixer.toml.codex/agents/react-patterns-enforcer.toml.codex/skills/fix-merge-conflicts/SKILL.md.cursor/agents/react-doctor-fixer.md.cursor/agents/react-patterns-enforcer.md.cursor/skills/fix-merge-conflicts/SKILL.mdelectron/start-ipfs.jspackage.jsonsrc/components/sidebar/sidebar.module.csssrc/components/sidebar/sidebar.tsxsrc/components/topbar/topbar.tsxsrc/views/settings/plebbit-options/plebbit-options.tsx
✅ Files skipped from review due to trivial changes (2)
- .codex/agents/react-patterns-enforcer.toml
- .cursor/agents/react-patterns-enforcer.md
🚧 Files skipped from review as they are similar to previous changes (8)
- src/components/sidebar/sidebar.module.css
- .claude/agents/react-patterns-enforcer.md
- electron/start-ipfs.js
- src/components/sidebar/sidebar.tsx
- src/components/topbar/topbar.tsx
- .cursor/agents/react-doctor-fixer.md
- src/views/settings/plebbit-options/plebbit-options.tsx
- package.json
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/hooks/use-auto-subscribe.ts (1)
3-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid the
dist/deep import here.accountsStoreandaccountsDatabaseare internal package modules, so this hook should use the package’s public export surface instead of binding todist/...paths.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/hooks/use-auto-subscribe.ts` around lines 3 - 4, The hook is importing internal package modules through deep `dist/` paths, which should be replaced with the package’s public export surface. Update the imports in use-auto-subscribe.ts so accountsStore and accountsDatabase are resolved from the package entrypoint/barrel export rather than from `@bitsocial/bitsocial-react-hooks/dist/`... paths, keeping the rest of the hook logic unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/hooks/use-auto-subscribe.ts`:
- Around line 3-4: The hook is importing internal package modules through deep
`dist/` paths, which should be replaced with the package’s public export
surface. Update the imports in use-auto-subscribe.ts so accountsStore and
accountsDatabase are resolved from the package entrypoint/barrel export rather
than from `@bitsocial/bitsocial-react-hooks/dist/`... paths, keeping the rest of
the hook logic unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ce0a5f22-7ca0-4eb5-ac56-d540975eb774
📒 Files selected for processing (4)
.claude/agents/react-doctor-fixer.md.codex/agents/react-doctor-fixer.toml.cursor/agents/react-doctor-fixer.mdsrc/hooks/use-auto-subscribe.ts
✅ Files skipped from review due to trivial changes (2)
- .codex/agents/react-doctor-fixer.toml
- .claude/agents/react-doctor-fixer.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .cursor/agents/react-doctor-fixer.md
|
Addressed the latest review feedback in
Triage note on CodeRabbit's remaining nitpick: the suggested public import replacement is not available in Local verification: |

Summary
Brings seedit up to parity with 5chan across four workstreams:
Dependency & protocol catch-up
@bitsocial/bitsocial-react-hooks0.1.2 → 0.1.26, add@pkcprotocol/pkc-js0.0.62 +@bitsocial/bso-resolver@electron/rebuild@plebbit/plebbit-jsto pkc-js (start-pkc-rpc.js), fixing desktop RPC that was broken on master (renderer already read pkc-named globals the old RPC never set).plebbit→.pkcdata-dir migration so existing desktop users keep their communitiesAI workflow sync (from 5chan's hooks rework)
.claude/settings.json; obsolete.claude/hooks.jsonremovedyarn ai-workflow:checkdrift validator ported and adapted (incl. fixing test-apk config that referenced 5chan'sfivechan.androidinstead ofseedit.android)Default subscriptions as directories
account.subscriptionsbitsocialnet/lists/seedit-directories/(GitHub fetch → localStorage 1h TTL → vendored fallback,yarn sync:directories); if the winner goes offline the next-ranked community serves the directory — subscriptions are never rewritten by the app/s/<code>directory routes; subscribe button targets the code on directory pages with a "subscribe to this community only" pin action;/s/allnow derives from the directories.bsonames pending text records, publicKey fallback in the lists)Dev profiling
__PROFILING__flag ported from 5chanVerification
yarn build,yarn type-check,yarn lint,yarn test --run(33/33),yarn ai-workflow:checkall pass; headless smoke test of the pkc RPC websocket server.Note
Low Risk
Documentation and contributor AI config only; no application runtime, auth, or data-path changes in this diff. Risk is misaligned agent instructions if parity drifts—mitigated by the new ai-workflow:check script reference in AGENTS.md.
Overview
Syncs
.claude,.cursor, and.codexagent/skill/playbook content with seedit and 5chan’s hook rework, plus tighterAGENTS.mdpolicy.Hooks: Claude moves from removed
.claude/hooks.jsonto.claude/settings.json(SessionStart/PostToolUse/Stop);.gitignoretrackssettings.jsoninstead ofhooks.json. Cursor hook entries use./.cursor/hooks/...paths (timeouts dropped in the snippet).Verification & quality: Code-quality, plan-implementer, react-doctor-fixer, and react-patterns agents (and Codex TOML mirrors) now call
yarn doctorfor React UI work andyarn knipwhen manifests/imports change; react-doctor-fixer recenters onyarn doctoroutput, not generic “validated issues.”Browser/profiler:
browser-checkandprofilerdocument Portlesshttps://seedit.localhost, default isolatedplaywright-clisessions with explicit consent for live browser state, and treat page/DOM/console/network as untrusted UGC. Profiling examples use/s/alland/s/<community-address>instead of board-code routes.Android
test-apk: Replacesfivechan.android, hardcoded paths, and nonexistent instrumentation/WebView upload automation withseedit.android, env-based SDK paths, manualadbflows, andFileUploaderPlugin→ catbox.moe—mirrored in.claude/.cursor/.codexskills.Skills & playbooks:
readmeskill shrinks from Rails boilerplate to repo-verified Yarn/Vite/Capacitor/Electron docs;deslop/ effect skills usemaster; merge-conflict check usesgit grepfor markers;review-and-merge-prrequires independent subagent verification;refactor-passadds Chesterton’s Fence.AGENTS.mdaddsyarn ai-workflow:check, translate skill routing, non-draft PRs for bots, harness-specific hook entry points, and expanded browser-session rules.Reviewed by Cursor Bugbot for commit f8d3dfc. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Bug Fixes
Chores