Commit Graph
159 Commits
Author SHA1 Message Date
plebeius 4508f589dd chore(deps): migrate from pkc-react-hooks to bitsocial-react-hooks 2026-03-05 17:14:23 +08:00
plebeius 822b6c937a fix(posts): default to hiding user IDs when pseudonymityMode is undefined 2026-03-03 18:38:00 +08:00
plebeius 75b66516fe refactor(replies): remove pinned-thread special handling for reply preview 2026-03-01 18:36:12 +08:00
plebeius e556a9e662 chore(deps): replace plebbit/plebbit-react-hooks with bitsocialhq/pkc-react-hooks
bitsocialhq/pkc-react-hooks is a fork of plebbit-react-hooks that we're maintaining temporarily as an attempt to modernize the original repository using AI tools, possibly merging changes back into plebbit-react-hooks, which should also be rebranded to pkc-react-hooks eventually, under the org pkcprotocol.
2026-02-28 15:02:56 +08:00
plebeius 549300f20d feat: show file/image labels instead of link when requirePostLinkIsMedia is truthy 2026-02-27 14:42:46 +08:00
plebeius 6ac9ac0ee7 fix(media): reserve stable post media space before thumbnails resolve 2026-02-26 17:27:54 +08:00
plebeius 4bdee0362d perf(bundle): replace plebbit-js imports with local utility, split chunks, fix CLS and rerenders
Eliminate direct @plebbit/plebbit-js (8.7MB) imports from all UI components by replacing
Plebbit.getShortAddress() with a local get-short-address utility. Add Vite manual chunks for
plebbit-js, plebbit-react-hooks, and react-spring/use-gesture. Fix catalog CLS by matching
skeleton to wrapper dimensions. Lazy-load ChallengeModal and ReplyModal. Add failed-URL cache
to useFetchGifFirstFrame, optimize useHide selector, and memoize useFeed options in mod-queue.
2026-02-26 16:42:36 +08:00
plebeius 9253bad7a5 fix(board-replies): include pending and mod-queue account comments in 5-reply preview 2026-02-26 15:19:25 +08:00
plebeius 216073aee3 fix(quotes): scope post-number lookup by subplebbit, OP quote always navigates to thread
- numberToCid scoped by subplebbit address to fix wrong preview in /all/
- OP quote click navigates to thread page instead of highlighting card
2026-02-26 15:08:33 +08:00
plebeius e241125aac fix(backlinks): hide backlinks from pending replies without comment number 2026-02-25 15:57:13 +08:00
plebeius e51f5b968c refactor(react-doctor): raise score from 79 to 90 2026-02-24 15:15:44 +08:00
plebeius a13c72f888 perf: defer board reply fetching and remove nested mobile backlink fetch
Split useReplies in post-desktop.tsx and post-mobile.tsx into preview/full modes so board cards avoid full REPLIES_PER_PAGE fetches by default. Added replies-preview-utils.ts and switched mobile backlinks to use precomputed directRepliesByParentCid map instead of per-reply useReplies.
2026-02-22 16:53:01 +08:00
plebeius f521bdbe33 fix(posts): Board link in multiboard views (/all/, /subs/, /mod/) 2026-02-22 15:02:31 +08:00
plebeius ebb5ae464f fix(post): ensure OP user ID tooltip shows at least 1 post in board view 2026-02-20 14:46:41 +08:00
plebeius 21d214685d fix(post): show Pending for user ID when reply pending on pseudonymity boards 2026-02-20 14:38:18 +08:00
plebeius 981940731b refactor: remove NFT avatar functionality
Removes avatar-settings component, avatar-visibility store, and all
avatar rendering from posts. Strips avatar from account JSON, renames
NFT gateway label to media IPFS gateway, removes Polygon RPC and
hide-avatars toggle. Deletes 6 avatar-related translation keys.
2026-02-19 17:40:10 +08:00
plebeius e0ed510fc6 perf(react-doctor): fix compiler-blocking patterns, raise score 72→81
Replace sync setState-in-effect with keyed remount and render-derived patterns in app, error-display, topbar-edit-modal, catalog-filters; use useCurrentTime() instead of Date.now() in hot paths; fix conditional hooks, passive scroll listeners, lodash path imports.
2026-02-18 15:31:01 +08:00
plebeius dedf18e199 perf(replies): progressive render, 500 replies/page, content-visibility
Set repliesPerPage to 500 to avoid Virtuoso pagination sort drift. Add useProgressiveRender with startTransition batching and CSS content-visibility for long reply lists.
2026-02-15 18:46:49 +08:00
plebeius 44847b7e95 fix(post): refresh author ID tooltip count when replies change 2026-02-15 14:07:12 +08:00
plebeius 14c6bf8f3a fix(replies): make thread replies update instantly for pending and confirmed states
Aligned 5chan’s flat thread reply behavior with plebones by using `useReplies` in flat-old mode with appending account comments and rendering from `updatedReplies` when available. Reply rows now subscribe to `useAccountComment` by `index`, so pending replies transition to confirmed automatically after challenge verification without requiring manual update or refresh.
2026-02-13 19:42:38 +08:00
plebeius 98f7a52e9b fix(post-status): base pending and failed labels on cid and state
Pending now means cid is missing, failed now means state is 'failed'.
2026-02-13 17:48:27 +08:00
plebeius 3d2dbbf75c perf: remove reply backlink subscription churn
Replaced per-reply useReplies subscriptions in backlink rendering with a precomputed directRepliesByParentCid map from thread-level filteredReplies. Also optimized quote link rendering in comment-content with scoped store subscription, reduced edit menu state churn, and improved DOM lookups with memoization to keep all backlink rendering data-local and eliminate repeated backend-state-driven reference churn during board scroll.
2026-02-12 20:00:32 +08:00
plebeius 7821f9cd82 perf(post-rendering): reduce quoted backlink rerenders via scoped store subscription
Replaced duplicated quotedByMap construction with useQuotedByMap() hook that subscribes only to post numbers referenced in each thread. Updated registerComments() to skip no-op writes, eliminating unnecessary numberToCid identity changes during feed scrolling.
2026-02-12 18:41:21 +08:00
plebeius ad41a78974 feat(post-page): enable Update button to refresh replies, add Auto alert translation
Update button calls useReplies().reset() for manual refresh. Auto button
shows translated informational alert. Register reply feed reset in Post
desktop/mobile when on post page.
2026-02-12 17:44:26 +08:00
plebeius 25375612a9 fix(post): show OP backlinks in board feed cards 2026-02-11 19:06:29 +08:00
plebeius 18cea185e7 refactor: replace default lodash imports with named imports
Replaced `import _ from 'lodash'` with specific named imports (`capitalize`, `lowerCase`, `debounce`, `startCase`) across 18 files. This reduces bundle size and improves tree-shaking efficiency.
2026-02-11 19:01:09 +08:00
plebeius d862550132 fix(post): render OP backlinks from replies quoting OP 2026-02-11 18:52:10 +08:00
plebeius 716c782d1a fix: scroll OP quote to thread card on same-route click 2026-02-11 18:43:39 +08:00
plebeius 702816f99b fix: include manual post-number quotes in reply backlinks
Backlink map generation now merges protocol-level quotedCids with parsed >>number references from reply content. Manual quotes are resolved through numberToCid from usePostNumberStore and deduplicated using Set. Centralized QUOTE_NUMBER_REGEX in url-utils to keep markdown conversion and backlink detection aligned.
2026-02-10 16:53:34 +08:00
plebeius c4b6c77d4c feat: render >>{number} as interactive quote links with hover preview
Added bidirectional `usePostNumberStore` for post number ↔ CID mapping, populated from thread views. Preprocesses `>>{number}` into markdown links, renders them via `NumberQuoteLink` and `ReplyQuotePreview`, and deduplicates against `quotedCids` when both refer to the same post.
2026-02-10 16:23:06 +08:00
plebeius 9d17213e66 fix(post): improve user ID display with domain detection and length limits 2026-02-10 14:06:43 +08:00
plebeius 4a96f88efd feat: add copy user ID menu item and rename copy link to copy direct link
Add 'Copy user ID' button to both desktop and mobile post menus, allowing users to copy the full author address. This provides a way to verify authenticity against the 8-char display ID. Also rename 'Copy link' to 'Copy direct link' for clarity. Update security comments to reflect the new approach and add translations for all 35 languages.
2026-02-10 13:45:55 +08:00
plebeius 24d329a329 fix: shorten rendered user ID display from 12 to 8 characters 2026-02-10 13:23:46 +08:00
plebeius c7c8c46557 feat(post): add backlinks for quotedCids 2026-02-09 19:56:07 +08:00
plebeius c1b0d13bb7 feat(posts): support pseudonymityMode per-reply hiding
Hide user ID display in posts and replies when subplebbit.features.pseudonymityMode is 'per-reply'. Uses useSubplebbitField to avoid unnecessary rerenders.
2026-02-09 16:22:18 +08:00
plebeius 63ee8aa168 refactor: rebrand default subplebbits to 5chan directories 2026-01-28 16:51:27 +08:00
plebeius fa4ec6da40 feat(mod-queue): improve compact view and add pending approval features
- Update excerpt format to show both title and content (title: content)
- Add Type and Image columns to compact view (desktop and mobile)
- Show parent post above replies in feed view
- Add approve/reject buttons to post page for pending posts when user is mod
- Translate pending approval string across all languages
- Reorder columns: No., Excerpt, Submitted, Type, Image, Actions
- Right-align Type and Image columns in desktop view
2026-01-26 16:31:15 +08:00
plebeius 28873478a2 fix(post): include pending replies in useReplies calls 2026-01-26 15:36:39 +08:00
plebeius 14e8c92fa0 feat(mod-queue): add view mode selection and integrate with post components 2026-01-25 16:29:15 +08:00
plebeius b8e3a0202a fix(replies): reply permalink didn't auto-scroll to deep replies 2026-01-19 16:02:45 +01:00
plebeius 4b0402996f Change 'CID:' label to 'No.' in post info components 2026-01-18 18:13:35 +01:00
plebeius c0c6e9ee31 perf(feeds): use hasMore instead of length check for conditional virtualization 2026-01-13 17:01:51 +01:00
plebeius fa32833b2a perf(components): prevent rerenders from updatingState
Use Zustand selectors with custom equality functions to only subscribe to specific fields needed by components, avoiding unnecessary rerenders when transient state like updatingState changes. Extract offline indicators into separate components to isolate rerenders. Memoize card components in catalog and popular threads views.
2026-01-02 16:42:16 +01:00
plebeius c094786f97 pass threadNumber to reply modal store 2025-12-28 22:16:38 +01:00
plebeius bf2c7ae61b refactor: use post number instead of shortCid in reply modal and quote previews 2025-12-28 11:53:02 +01:00
plebeius 2b8d6f4fce perf: only virtualize replies when count exceeds first page size 2025-12-27 18:25:35 +01:00
plebeius 882b7b4a99 feat: add infinite scroll for replies 2025-12-27 18:07:23 +01:00
plebeius 6e9202a604 implement useReplies 2025-12-27 17:47:17 +01:00
plebeius 76845412e8 feat: implement post numbers 2025-12-24 18:07:14 +01:00
plebeius e56ba3d050 add comment 2025-12-24 18:06:56 +01:00