Commit Graph

1803 Commits

Author SHA1 Message Date
Tommaso Casaburi
cc31ca7a74 fix(dev): restore dev home page render 2026-04-28 14:04:06 +07:00
Tommaso Casaburi
0da6e32dec fix(default-subscriptions): unblock home when default list is empty
When use-default-subscriptions resolves to [] (the expected case
while seedit-default-subscriptions.json is empty or 404s), the
auto-subscribe effect was early-returning before removing the
account from the checking set. That kept isCheckingSubscriptions
true forever and prevented the "no subscriptions" empty state
from ever rendering on home.

Fix by ensuring removeCheckingAccount is always called once the
auto-subscribe pass completes, even when there is nothing to
auto-subscribe to.
2026-04-27 19:27:00 +07:00
Tommaso Casaburi
f56594cc32 chore: drop old plebbit list, rename to use-default-subscriptions
Rename the hook file and exports from use-default-subplebbits to
use-default-subscriptions. Switch the fetch URL from
plebbit/lists default-multisub.json to bitsocialnet/lists
seedit-default-subscriptions.json.

A 404 from the new (not-yet-populated) list gracefully resolves
to empty defaults so new users see an empty subscription feed
(like a fresh Reddit account). The list will be populated later.
2026-04-27 19:26:58 +07:00
Tommaso Casaburi
c5348a0aa1 fix(community-rebrand): address Cursor Bugbot and CodeRabbit findings
- Use getCommunityIdentifier in every useCommunity / useCommunityStats
  call site so hash-style (publicKey) community addresses are routed
  to the correct CommunityIdentifier branch instead of always being
  treated as { name }.
- Move the create-community redirect in community-settings.tsx out
  of the render body and into useEffect to avoid the "cannot update
  a component while rendering" warning and re-fire on every render.
- useMemo Object.keys(accountCommunities) in mod.tsx so feedOptions
  and the three useFeed calls receive a stable communityAddresses
  array.
- Simplify the tautological logo-avatar guard in header.tsx.
- (Verified flattenCommentsPages import resolves; left as-is.)
- (Comment import in mod.tsx confirmed from @bitsocial/...)
2026-04-27 18:51:49 +07:00
Tommaso Casaburi
c5cb66ec0c refactor: rename subplebbit → community throughout UI layer
Cosmetic rename of local variables, prop names, type names, CSS classes,
function names, and code comments from the legacy `subplebbit` terminology
to `community` across components, hooks, stores, views, and utilities.

API protocol keys (e.g. `subplebbitAddress:` in publish options) are
intentionally preserved. A new `getCommentCommunityAddress` dual-read
helper in `comment-utils.ts` reads `communityAddress` first and falls
back to the legacy `subplebbitAddress` field for backward compat.

Renamed hook files:
- use-is-nsfw-subplebbit.ts → use-is-nsfw-community.ts
- use-is-broadly-nsfw-subplebbit.ts → use-is-broadly-nsfw-community.ts
2026-04-27 16:15:47 +07:00
Tommaso Casaburi
309c553c5a refactor: rename subplebbit -> community across seedit
Apply the broader subplebbit -> community rebrand on top of the
package switch:

- Rename hook usages (useSubplebbit -> useCommunity, useSubplebbits
  -> useCommunities, useSubplebbitStats -> useCommunityStats,
  useSubplebbitsStates -> useCommunitiesStates,
  useAccountSubplebbits -> useAccountCommunities,
  usePublishSubplebbitEdit -> usePublishCommunityEdit,
  usePlebbitRpcSettings -> usePkcRpcSettings) and types (Subplebbit
  -> Community, PublishSubplebbitEditOptions ->
  PublishCommunityEditOptions).
- Rename seedit identifiers (variables, types, store names) from
  subplebbit/Subplebbit to community/Community.
- git mv view directories, store files, hook files, and CSS modules
  from subplebbit-* to community-*. Update all imports.
- Rename the React Router :subplebbitAddress route param to
  :communityAddress (path /s/ unchanged).
- Update English translation values for community-related strings.
- Drop src/lib/bitsocial-react-hooks-compat.ts (no longer needed
  now that @bitsocial/bitsocial-react-hooks exposes the community
  names natively).
- Add src/hooks/use-community-identifier.ts and
  src/lib/utils/address-utils.ts as small adapters for the new
  CommunityIdentifier shape and short-address utility.
- Fix src/hooks/use-default-subplebbits.ts to import Community
  instead of Subplebbit (PR #813 will rename the file in a
  follow-up; tiny merge conflict expected on that one file).

Build, lint, and type-check all pass.
2026-04-27 14:38:23 +07:00
Tommaso Casaburi
8d017a1ab7 refactor: switch import scope from @bitsocialnet to @bitsocial
Mechanical scope rename across src/. Build is intentionally broken
at this commit — Phase 3 renames the symbols (useSubplebbit ->
useCommunity, etc.) to match the new package's API.
2026-04-27 13:47:45 +07:00
Tommaso Casaburi
c8ce0c83a3 chore(deps): switch to @bitsocial/bitsocial-react-hooks@0.1.2
- Drop the @bitsocialnet/bitsocial-react-hooks tarball install in favor
  of the canonical @bitsocial/bitsocial-react-hooks@0.1.2 from npm.
- Remove kubo direct dep (now bundled inside pkc-js via the hooks).
- Bump i18next 23 -> 25, react-i18next 13 -> 16,
  i18next-http-backend 2 -> 3, @vitejs/plugin-react 4 -> 6 to
  match 5chan.
- Remove the obsolete scripts/patch-bitsocial-react-hooks-esm.cjs
  postinstall hook (only patched the old tarball layout).
- Update AGENTS.md package scope reference.
2026-04-27 13:46:41 +07:00
Tommaso Casaburi
1efff4fed7 fix(hooks): preserve account communities on updates
Wrap setAccount in the compat layer so seedit keeps internal account fields during partial updates, and extend the install-time hooks patching to normalize legacy account communities data and guard role-sync lookups.
2026-03-31 19:36:12 +07:00
Tommaso Casaburi
6040835a94 feat(hooks): migrate seedit to bitsocial-react-hooks
Swap the app to the latest bitsocial-react-hooks commit, add a local compatibility shim for the legacy subplebbit API surface, and keep the in-flight account-history improvements that now use hook-side paging/filtering.
2026-03-31 19:29:45 +07:00
Tommaso Casaburi
015c49c9c7 chore: sync AI workflow with 5chan 2026-03-19 16:12:22 +08:00
plebeius
05afd1ce29 refactor: extract timeout management into useScheduledReset hook 2026-01-30 12:00:27 +08:00
plebeius
216a6a322a Update sidebar.tsx 2026-01-29 18:56:03 +08:00
plebeius
a8e30474ff fix(notifications): avoid null platform 2026-01-29 14:49:05 +08:00
plebeius
d65e2d43b7 refactor: migrate from electron-builder to Electron Forge and use kubo npm package
Migrated build system from electron-builder to Electron Forge with new configuration in forge.config.js. Replaced manual IPFS binary downloads with kubo npm package, updating start-ipfs.js to resolve binaries from node_modules. Simplified CI workflows to use new build scripts and verification helpers. Added scripts to find and verify executables in Forge output directory.
2026-01-29 14:39:27 +08:00
plebeius
3ff4f3ae66 fix: improve timeout and interval cleanup to prevent memory leaks
Refactored timeout and interval management across components to use refs for proper cleanup. Fixed memory leak in use-time-filter hook by tracking interval lifecycle. Improved error handling type safety in error-display component.
2026-01-28 17:29:34 +08:00
plebeius
edfceaeee3 chore(deps): update React types and react-markdown for React 19
Updated @types/react and @types/react-dom from 18.x to ^19.1.2 to match React 19. Upgraded react-markdown from 8.0.6 to ^10.1.0 for React 19 compatibility. Fixed TypeScript errors across components including useRef initial values, ref type mismatches, JSX namespace issues, and react-markdown component prop types.
2026-01-28 15:55:15 +08:00
plebeius
83a6055d6e add analytics to seedit.app 2026-01-27 18:01:58 +08:00
plebeius
7fc8758341 style(post): update share link domain to seedit.app 2026-01-27 17:12:40 +08:00
plebeius
1d6ab6f221 feat(search-bar): add same community alert 2026-01-27 16:49:30 +08:00
plebeius
a61e26d57c Replace "p/" route prefix with "s/" for community routes 2026-01-16 17:44:09 +01:00
plebeius
edd75dc19e rebrand 2026-01-16 17:27:30 +01:00
plebeius
27b4c3d98c update links for rebrand 2026-01-16 17:21:37 +01:00
plebeius
1ce08b388b fix: add leading slashes to sort links in header for all/mod/domain views 2026-01-15 19:16:05 +01:00
plebeius
9c662882d3 Update domain.tsx 2026-01-15 19:15:46 +01:00
plebeius
9cdb57ebca fix lint warnings 2026-01-15 19:09:03 +01:00
plebeius
87183af08b Refactor Plebbit.getShortAddress usage to accept object 2026-01-03 19:37:54 +01:00
plebeius
0693c9f7e1 Update index.tsx 2026-01-03 19:10:58 +01:00
plebeius
29f31b4966 update translations 2025-10-24 17:35:47 +02:00
plebeius
ccb104d910 fix(plebbit options): correct pubsub providers property name mismatch 2025-10-23 21:48:39 +02:00
plebeius
4b076ced70 fix(settings): some plebbit options weren't loading because their naming changed 2025-10-23 21:43:37 +02:00
plebeius
cc524d4595 Remove 'anti-spam' wording from challenge UI 2025-10-12 22:38:27 +02:00
plebeius
ac7bb7c436 feat(challenge modal): improve iframe challenge confirmation message 2025-10-12 22:27:36 +02:00
plebeius
0bdcb4b985 fix(challenge-modal): add allow-same-origin to iframe sandbox 2025-10-11 17:11:38 +02:00
plebeius
d66fc83a68 fix(challenge): update challenge iframe type 2025-10-11 17:01:58 +02:00
plebeius
af4695299d better wording 2025-10-08 00:06:13 +02:00
plebeius
2e1262232c fix(challenge-modal): prevent stale closures in keyboard event handler 2025-10-07 23:55:01 +02:00
plebeius
56b5555b4a feat(challenges): handle iframe challenges in regular challenge flow 2025-10-07 23:49:19 +02:00
plebeius
c7090741d4 refactor(challenge): remove redundant challenge error interaction 2025-10-07 23:34:54 +02:00
plebeius
3ca6b47a83 fix(media-utils): avoid mutating memoized link info
clone link media info before overriding thumbnail fields to ensure cached memoized objects stay immutable per call
2025-10-04 18:15:57 +02:00
plebeius
f768a800af fix(media-utils): ignore blacklisted thumbnails
some sites don't show thumbnails, so the backend-side thumbnail fetching needs to be  disabled, or it might fetch non-thumbnails such as emojis
2025-10-04 18:01:18 +02:00
plebeius
7603ba990c fix(challenge): adjust padding and improve error log 2025-10-04 16:04:47 +02:00
plebeius
5f14d03aa4 use more user-friendly wording 2025-10-03 18:35:46 +02:00
plebeius
acf0130467 fix(challenge-modal): tighten iframe handling, fix styling 2025-10-03 18:08:08 +02:00
plebeius
759e1389f3 fix type error 2025-10-02 22:50:45 +02:00
plebeius
888bfbbe50 fix spacing 2025-10-02 22:50:06 +02:00
plebeius
f23c16c833 refactor(challenge-modal): normalize hook usage across challenge modes 2025-10-02 17:06:00 +02:00
plebeius
8dd91b48e1 Update challenge-modal.tsx 2025-10-01 17:08:04 +02:00
plebeius
e06ac3f412 refactor(challenge-modal): sync iframe parent data and theme updates 2025-10-01 17:07:27 +02:00
plebeius
911e2f51ce remove inline styling 2025-10-01 17:05:17 +02:00