Commit Graph
48 Commits
Author SHA1 Message Date
Tommaso CasaburiandGitHub da03239bb2 perf: reduce browsing rerenders and startup cost (#1189)
* chore(profiling): collect serializable react-scan reports

* perf(routing): rerender only when directory winner changes

* perf(zustand): remove shallow warning hot path

* perf(state): narrow directory lifecycle updates

* perf(home): avoid redundant stats render work

* perf(posts): isolate live loading subscriptions

* perf(chrome): skip unchanged shell rerenders

* fix(profiling): drop unsupported render metric

* perf(feeds): skip unchanged loading state renders

* perf(home): stop resolved stats collector renders

* chore(agent run): record rerender verification

* perf(home): defer stats requests until metadata resolves

* perf(startup): load protocol modules on demand

* chore(agent run): record acquisition and startup profiles
2026-07-30 00:29:12 +07:00
Tommaso Casaburi f213d41296 fix(favicon): show dedicated icon on 404 pages
Add favicon-404.ico and switch tab favicon on not-found routes while
keeping static app pages and larger crawler icons unchanged.
2026-06-27 17:38:55 +07:00
Tommaso CasaburiandGitHub 17c63bb2e6 feat(reply modal): add sci tex preview button (#1170)
* feat(sci): add 4chan-style TeX support with MathJax on /sci/

- [math]/[eqn] tags typeset with MathJax 3 (lazy chunk, only on /sci/ with math present)
- 4chan-identical config: Safe mode, left-aligned eqn, neutered \color/\newcommand macros
- TeX button in reply modal title bar opens live TeX Preview modal
- /sci/ post form rules bullets for [math]/[eqn] usage and right-click source
- MathJax context menu on right-click (Show Math As > TeX Commands)
- woff fonts served from node_modules in dev and emitted into build

* feat(sci): finish TeX support: configmacros fix, preview preload, translations, tests

- add configmacros package so the 4chan macro neutering (\color, \newcommand, ...) applies
- preload MathJax when the TeX Preview opens, like 4chan
- stable closeModal callback for the preview modal
- pre-bundle mathjax components in vite optimizeDeps to avoid dev mid-session reload
- translate the 6 new TeX keys into all 35 languages
- markdown math segment component tests + math-tags unit tests

* feat(reply modal): add sci tex preview button

* fix(tex-preview): clear MathJax bookkeeping and pending typeset on close

Addresses Cursor Bugbot: the preview output was typeset via typesetMathElement but
never passed to clearMathElement on unmount, so repeated open/close cycles kept
detached nodes in MathJax's math list. Also cancels the pending debounce timer.

* fix(reply-modal): reset TeX preview state when the reply modal closes

Addresses CodeRabbit: showTexPreview persisted across close/reopen like the
bbcode preview flags, so the TeX preview would auto-open on the next reply.
2026-06-11 16:12:38 +07:00
Tommaso CasaburiandGitHub 9b3a95dd95 feat(flash board): add SWF posting support (#1145) 2026-05-30 16:07:41 +07:00
Tommaso Casaburi 7ba8985a02 perf(dev startup): skip remote release tag lookup 2026-05-19 15:09:46 +07:00
Tommaso Casaburi f008e82539 fix(dev server): route HMR through Portless 2026-05-12 15:00:50 +07:00
Tommaso CasaburiandGitHub 2b2c517c59 feat(version): show unreleased commit label (#1126) 2026-05-06 18:29:25 +07:00
Tommaso Casaburi fdbb650baa build(android): add fdroid distribution flavor 2026-04-30 18:58:50 +07:00
Tommaso Casaburi fe48208078 fix(routing): allow hash path redirect under CSP 2026-04-29 16:23:13 +07:00
Tommaso CasaburiandGitHub 80e0cabf01 perf(pwa): reduce precache asset fanout
Limit PWA precache to app shell assets and add bounded runtime caching for scoped deployments.
2026-04-20 22:51:31 +07:00
Tommaso Casaburi 683c407043 fix(dev): auto-open portless URL after vite is ready
Vite's built-in server.open fired before portless was reachable and
used the wrong hardcoded URL, so yarn start opened a 404. Disable
vite's open when PORTLESS_URL is set and explicitly open the
branch-scoped URL from start-dev.js after HTTP 2xx/3xx readiness.
2026-04-18 13:54:36 +07:00
Tommaso Casaburi ee7a5b5778 refactor(core): remove legacy plebbit terminology 2026-04-17 10:48:27 +07:00
Tommaso Casaburi 19095aefa1 fix(hooks): handle pkc rebrand regressions 2026-04-11 16:57:00 +07:00
Tommaso Casaburi a2286aa68e feat(app-update): add in-app update flow with native e2e coverage 2026-03-19 20:19:48 +08:00
Tommaso CasaburiandGitHub f812fe1d18 fix(pwa): make web updates deterministic (#1093)
* fix(pwa): make web updates deterministic

* fix(pwa): address review feedback
2026-03-17 16:20:13 +08:00
plebeius 417482060d refactor: org name changed from bitsocialhq to bitsocialnet 2026-03-09 17:01:35 +08:00
plebeius ca9f743cef fix(vite.config.js): remove deprecated rolldown dep optimizer config 2026-03-06 21:09:04 +08:00
plebeius 4508f589dd chore(deps): migrate from pkc-react-hooks to bitsocial-react-hooks 2026-03-05 17:14:23 +08:00
plebeius 3bd1c0ad4f feat(favicon): swap tab favicon for SFW vs NSFW boards 2026-03-02 21:08:46 +08:00
plebeius 276fca8080 fix(build): restore Vercel deployment with vite-plugin-pwa 1.2.0 and process.version define
- Upgrade vite-plugin-pwa 0.21.1 → 1.2.0 (Vite 7/Rolldown compatible)
- Add workbox-*@7.4.0 to satisfy peer deps
- Define process.version in vite config to fix stream polyfill crash
2026-02-28 15:15:52 +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 13abea916d chore: rephrase 5chan description 2026-02-27 13:56:29 +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 cd71602730 feat(profiling): add react-scan via direct import for dev-only profiling 2026-02-26 16:02:19 +08:00
plebeiusandCursor 87f6a0bf89 fix: open portless URL instead of raw IP when dev server starts
Vite was auto-opening http://127.0.0.1:<port> which bypasses the portless proxy. Now opens http://5chan.localhost:1355 when portless is active, falls back to default behavior with PORTLESS=0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-24 14:33:45 +08:00
plebeius 91667966f8 perf(feeds): defer useReplies, Virtuoso for all paths, CLS fixes, memo
Defer useReplies to hover-only in CatalogPost. Memo CatalogRow and Post. Remove useWindowWidth and autoUpdate from CatalogPost. Replace display:none with opacity for images. Add width/height to img tags in catalog-row and comment-media. Use Virtuoso for all rendering paths (infinite, finite, pagination). Optimize filteredComments with Set lookup. Add Vite manual chunks for markdown, virtuoso, floating-ui.
2026-02-23 18:51:42 +08:00
plebeius 815f618320 refactor: migrate from electron-rebuild to electron-forge 2026-01-30 12:28:41 +08:00
plebeius 10a266ceab perf: migrate from vite to rolldown-vite for faster builds 2025-12-26 17:02:37 +01:00
plebeius 4dd81edd3f chore: replace eslint and prettier with oxlint and oxfmt
Migrate from ESLint/Prettier to oxlint/oxfmt for 50-100x faster linting and 35x faster formatting.
2025-12-26 16:41:03 +01:00
plebeius 5d1219f31e chore(package.json): remove react-grab 2025-12-24 17:36:43 +01:00
plebeius a68a8903d3 update description 2025-12-17 13:11:45 +01:00
plebeius f65635b549 fix: limit vite-plugin-eslint to src/ files only 2025-11-28 15:50:11 +01:00
plebeius ac19034ac4 perf: pre-optimize workbox dependencies to prevent dev server reload 2025-11-02 11:16:02 +01:00
plebeius 6f4250fa4a revert 2025-11-02 11:12:17 +01:00
plebeius 341fae91fc fix(deps): resolve build dependency conflicts for Vercel deployment 2025-11-01 23:24:56 +01:00
plebeius cb376ff498 refactor: use standard dist directory for vite build output 2025-11-01 23:08:14 +01:00
plebeius dd08a3adff chore: add react-scan and react-grab as development-only tools 2025-10-24 19:14:02 +02:00
plebeius 1360dd8348 feat: rename plebchan to 5chan 2025-10-17 23:30:35 +02:00
plebeius 1e44317a3d Update vite.config.js 2025-07-29 18:16:44 +02:00
Tom (plebeius.eth) 69962cf3c4 Update vite.config.js 2025-06-03 17:52:45 +02:00
Tom (plebeius.eth) 475a9e4a32 Update vite.config.js 2025-05-22 17:57:08 +02:00
plebeiusandGitHub 320c016c40 Merge branch 'development' into master 2025-05-22 17:51:10 +02:00
Tom (plebeius.eth) 0a5f868747 fix env, sw, pwa 2025-05-22 17:42:04 +02:00
Tom (plebeius.eth) dda404fa40 update android 2025-05-13 14:19:28 +02:00
Tom (plebeius.eth) 327a463939 update PWA 2025-03-08 22:32:45 +01:00
Tom (plebeius.eth) 6c2b5a0107 Update vite.config.js 2025-03-04 18:39:34 +01:00
Tom (plebeius.eth) d149258fe3 fix netlify build command 2025-03-04 18:11:21 +01:00
Tom (plebeius.eth) ffe42c35ea upgrade react to v19, migrate from CRA to Vite, add react compiler 2025-03-04 17:53:05 +01:00