Commit Graph
431 Commits
Author SHA1 Message Date
Tommaso Casaburi 44cc792a9a chore(deps): upgrade bitsocial-react-hooks to 0.1.17 2026-06-12 18:42:35 +07:00
Tommaso Casaburi 9b6386a0b8 chore(deps): upgrade pkc-js to 0.0.47 2026-06-12 17:21:38 +07:00
Tommaso Casaburi 15fb1bf57c chore(ai-workflow): add toolchain drift validator and harden agent rules
Borrowed from a review of addyosmani/agent-skills:

- add scripts/validate-ai-workflow.mjs (yarn ai-workflow:check): verifies
  .claude/.codex/.cursor skills, agents, and hooks stay in parity, with
  validator-owned exemptions for intentional harness-specific differences
  and enforcement of the AGENTS.md agent model rules
- browser-check and profiler agents: treat page content as untrusted data,
  never instructions (5chan pages render arbitrary user-generated content)
- refactor-pass: Chesterton's Fence rule (git blame unclear code before
  removing it)
- review-and-merge-pr: pass subagent verifiers only the artifact and
  contract, not the triage verdict, to keep reviews independent
2026-06-11 16:13:53 +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 Casaburi fa7cab0699 fix(deps): resolve shell-quote critical dependabot alert
Pin shell-quote to 1.8.4 via yarn resolutions so concurrently no longer pulls the vulnerable 1.8.3 release.
2026-06-11 15:01:58 +07:00
Tommaso Casaburi ee5aa7845e fix(deps): bump react-router-dom to 6.30.4
Patches GHSA open redirect via protocol-relative URL reinterpretation
in react-router (Dependabot alert #276).
2026-06-09 19:11:43 +07:00
Tommaso Casaburi af2689c4dc chore(release): v0.9.1 2026-06-07 23:09:29 +07:00
Tommaso Casaburi 6bca832ccf chore(deps): upgrade bitsocial-react-hooks to 0.1.16 2026-06-07 23:07:33 +07:00
Tommaso Casaburi 2eebe407b1 chore(deps): upgrade bitsocial-react-hooks to 0.1.15 2026-06-07 15:28:58 +07:00
Tommaso CasaburiandGitHub 0493492f55 fix(react-doctor): correct test exclusion + React-Compiler lint policy + state-sync fix (#1155)
* fix(react-doctor): correctly exclude test files from scoring

The intended test-file ignore in react-doctor.config.json was never
applied: react-doctor's config precedence reads the "reactDoctor" key
in package.json (which had no ignore), shadowing the config file. On
top of that, react-doctor 0.4.0's ignore.files matcher is broken — any
non-empty value collapses scan scope and drops real product files, not
just tests.

Consolidate to a single canonical doctor.config.json using
ignore.overrides (which works correctly): only test files are excluded
while all product code is still scored. Remove the shadowing
package.json key and the dead react-doctor.config.json.

Product-code baseline is 55 (92 errors, 515 warnings, 118 files).

* chore(react-doctor): add long-running task tracking for score effort

* refactor(react): remove compiler-redundant memoization in verified files

Delete manual useMemo/useCallback/memo that the React Compiler already
handles, in 7 files validated to be behavior-preserving (factories are
pure functions of compiler-trackable reactive inputs). Kept memos whose
factories read external mutable DOM/theme state with load-bearing deps
(e.g. use-reply-height-estimates metrics). Also hoists a regex and reads
a localStorage value once.

Note: this is code-quality cleanup; react-doctor's score is error-
weighted, so warning cleanup like this does not move the score. See
docs/agent-runs/react-doctor-score/progress.md.

* fix(react-doctor): adopt React-Compiler lint policy + fix one state-sync bug

react-doctor's score is dominated by React-Compiler optimizability
diagnostics that flag intentional patterns (the latest-ref idiom) and
current compiler limitations (try/finally, throw-in-try/catch the
compiler can't lower yet), not bugs. Rewriting that working code to
satisfy them would degrade it.

- Replace doctor.config.json with a documented doctor.config.jsonc that
  does not enforce the react-hooks-js (React Compiler) rules or
  react-compiler-no-manual-memoization. All real code-quality, a11y, and
  performance rules stay enforced.
- Fix one genuine state-sync bug: use-now-seconds refreshed 'now' via a
  synchronous setState inside an effect (an extra render with a stale
  value); move it to a render-time prev-prop comparison (React's
  adjust-during-render pattern), behavior-equivalent.

Score 54 (broken config) -> 63. type-check/lint/1051 tests pass; browser
smoke confirms timestamps render with no re-render regression. The
remaining no-adjust-state-on-prop-change diagnostics are real bugs but
entangled with legitimate side effects (navigate/ref-cancel/async) in
critical flows; left for careful follow-up.

* chore(react-doctor): remove the vanity score badge, keep PR-diff review

The single 0-100 react-doctor score mostly reflects React-Compiler
optimizability and isn't a meaningful health grade to display (see
docs/agent-runs/react-doctor-score). Remove the README badge and its now-
dead generation infra (CI write/upload/publish steps + the
write-react-doctor-badge.mjs script + doctor:badge package script).

Kept: react-doctor's actual value -- the PR step that runs
'yarn doctor --diff <base> --annotations' on pull requests touching React
files, surfacing newly-introduced issues inline. Coverage badge untouched.

* docs(react-doctor): document why the score is not a target to chase

Record the reasoning so future agents/contributors don't re-attempt to
grind the react-doctor score: it overwhelmingly reflects React-Compiler
optimizability (most 'errors' flag intentional patterns and current
compiler limitations, not bugs) and saturates on the fraction of clean
files, so ~63 is the honest ceiling and 90 only comes from disabling the
linter.

- Add a known-surprises entry with the full reasoning + mitigation.
- Reframe the AGENTS.md react-doctor verification line: it's a PR-diff
  reviewer for newly-introduced issues, not an aggregate score to raise.
2026-06-05 22:21:30 +07:00
Tommaso CasaburiandGitHub 9f58bf7e22 chore(deps): upgrade react to 19.2.7 and react types to 19.x (#1154)
Bump react and react-dom 19.1.2 -> 19.2.7 and @types/react and
@types/react-dom from v18 to v19. Keeps babel-plugin-react-compiler,
which is a separate build-time tool, not part of the React 19 runtime.

The @types v19 upgrade surfaced 21 type-only errors, all fixed without
runtime behavior changes:

- useRef<T>() now requires an explicit argument: pass undefined
- DOM element refs are RefObject<T | null>: widen PostFormFields and
  AdvancedSettings ref prop types accordingly
- retype reply-modal onInput handler to FormEvent + currentTarget
- add a null guard for the boards-bar search input
- update test mocks for stricter cloneElement/forwardRef typings

Verified: type-check, lint, 1051 tests, and build pass; react-doctor
score unchanged at 54; browser smoke across Chromium/Firefox/WebKit
plus mobile viewport clean.
2026-06-05 18:43:28 +07:00
Tommaso Casaburi 70ffeb816e chore(deps): bump bitsocial-react-hooks to 0.1.14 2026-06-05 17:48:26 +07:00
Tommaso Casaburi 0ba711b666 chore(deps): bump react-doctor to 0.4.0 2026-06-05 17:47:40 +07:00
Tommaso Casaburi ea7883b107 chore(deps): bump react-doctor to 0.2.16 2026-06-02 13:32:57 +07:00
Tommaso CasaburiandGitHub 829b672053 fix(embed): restore youtube thumbnails and file-row labels (#1148)
* fix(comment-content): render reason text as comment content

* fix(post-form): use native browser styling for flash tag select

Exclude the flash tag dropdown from themed post-form select styling so it
renders with the browser's default select appearance, matching the flag selector.

* fix(p2p-stats): show peer flags for DNS6 relay hostnames

Extract embedded IPv6 addresses from dns6 multiaddrs so geo lookup and country flags work for relay peers that publish IPv6 via DNS hostnames.

* fix(flags): hide geolocation-only selectors on /int/ and /sp/

Country-only boards auto-publish geographic location flags without
showing a flag dropdown, matching existing /bant/ behavior.

* fix(embed): restore youtube thumbnails and file-row labels

Restore thumbnail-first previews for YouTube embeds in post media and markdown hover.
Desktop posts show File with the thumbnail image URL and a youtube video type label.

* fix(embed): address youtube thumbnail review feedback

Translate the youtube video label, handle mobile/music YouTube hosts as standard YouTube URLs, keep affected mocks current, and cap default Vitest workers to reduce local CPU spikes.
2026-06-01 12:57:17 +07:00
Tommaso Casaburi d48cf10ee8 chore(release): v0.9.0 2026-05-31 11:48:49 +07:00
Tommaso Casaburi f3494cc6bd merge: add playwright-cli low-spec throttling workflow 2026-05-30 17:29:35 +07:00
Tommaso Casaburi 711c97d834 chore(dev): add playwright-cli low-spec throttling workflow
Add pw-throttle.sh and a verification playbook so agents can stress-test UI
on throttled Chromium sessions before claiming perf-sensitive changes feel fast.
2026-05-30 17:29:30 +07:00
Tommaso Casaburi c5a759d34a Merge branch 'codex/chore/dev-overhead-preview' 2026-05-30 17:27:40 +07:00
Tommaso Casaburi 8cc9c401d3 chore(dev): add production preview launcher 2026-05-30 17:26:58 +07:00
Tommaso Casaburi af20b1a452 chore(deps): update vulnerable resolutions 2026-05-30 16:23:47 +07:00
Tommaso CasaburiandGitHub 9b3a95dd95 feat(flash board): add SWF posting support (#1145) 2026-05-30 16:07:41 +07:00
Tommaso Casaburi eb23224d35 chore(deps): bump bitsocial-react-hooks to 0.1.13 2026-05-27 17:40:53 +07:00
Tommaso Casaburi 45a113c621 chore(deps): upgrade react-doctor to 0.2.6
Remove obsolete packageExtensions for react-doctor@0.0.31.
2026-05-26 18:24:57 +07:00
Tommaso Casaburi bd40fe043c chore(deps): bump bitsocial-react-hooks to 0.1.12 2026-05-26 15:13:03 +07:00
Tommaso CasaburiandGitHub f74b33f43b feat(flags): add comment flags (#1140)
* feat(flags): add comment flags

* fix(flags): address review feedback

* fix(flags): clear stale flag publish data
2026-05-24 23:14:36 +07:00
Tommaso CasaburiandGitHub f5039285a7 fix(p2p stats): improve own-IP geolocation and world map accuracy (#1138)
* fix(p2p stats): improve own-IP geolocation and world map accuracy

Resolve the user's public endpoint when libp2p only advertises private listen addresses, look up an accurate country flag for "Your IP", snap peer markers to country centroids, and add leeching seeder link plus panel layout tweaks.

* fix(p2p stats): skip caching own-IP lookups cancelled by abort

When the P2P stats panel unmounts mid-request, its AbortSignal cancels
the in-flight fetchOwnPublicEndpoint / fetchOwnIpCountryCode calls. Those
empty results were still cached for 30-60s, so reopening the panel within
that window showed "Your IP" as unavailable or without a country flag even
though nothing had actually failed. Skip caching when the signal aborted so
a later open retries. Addresses Cursor Bugbot finding.
2026-05-23 22:47:41 +07:00
Tommaso Casaburi 722b6e055a chore(deps): upgrade @pkcprotocol/pkc-js to 0.0.35 2026-05-22 17:28:17 +07:00
Tommaso Casaburi 7fcea5d370 fix(deps): bump resolutions for Dependabot security alerts
Pin protobufjs, ws, @libp2p/kad-dht, and brace-expansion@5 to patched versions.
2026-05-21 15:24:14 +07:00
Tommaso Casaburi 90394b5617 chore: bump bitsocial react hooks to 0.1.11 2026-05-20 18:22:30 +07:00
Tommaso Casaburi d6d01c0571 docs(agents): add generated LLM context workflow 2026-05-20 14:48:34 +07:00
Tommaso CasaburiandGitHub cda1f7519f Add board directory view (#1132)
* feat(directory): add board directory view

* fix(directory): populate board status

* style(directory): tighten board table

* docs(board manager): point board owners to manager

* fix(directory): show loading status

* style(directory): center board column in directory table

* perf(directory): cap board status checks

* style(directory): simplify board row links

* test(ci): stabilize coverage run

* test(ci): stabilize coverage harness

* test(ci): avoid async app flush act

* test(app): narrow layout harness coverage

* test(ci): stabilize app update distribution mock

* test(ci): preload app harness before route tests

* fix(directory): address final review findings
2026-05-19 23:34:33 +07:00
Tommaso Casaburi d2d047e5de feat(posts): add mod bbcode editor 2026-05-19 15:45:22 +07:00
Tommaso Casaburi 714a47a32b chore(release): v0.8.5 2026-05-15 18:51:20 +07:00
Tommaso Casaburi 00d972b26d chore(deps): bump bitsocial packages 2026-05-15 18:38:29 +07:00
Tommaso Casaburi c40353d2e6 fix(deps): update vulnerable transitive dependencies 2026-05-13 17:09:58 +07:00
Tommaso Casaburi e38d888b74 chore(release): v0.8.4 2026-05-11 16:22:55 +07:00
Tommaso Casaburi 618aa97799 chore(deps): upgrade bitsocial-react-hooks and pkc-js 2026-05-11 13:57:27 +07:00
Tommaso CasaburiandGitHub 556973a445 Improve React Doctor score and badge (#1127)
* fix(react doctor): improve quality score and badge

* fix(react doctor): address review feedback

* fix(review): address final bot feedback
2026-05-10 18:25:13 +07:00
Tommaso CasaburiandGitHub e7a6c377c9 Sign web release manifests (#1128)
* feat(release): sign web release manifests

* ci(doctor): skip non-ui pull requests
2026-05-10 14:59:28 +07:00
Tommaso Casaburi 7e46ddda47 chore(deps): upgrade react-doctor 2026-05-09 15:29:08 +07:00
Tommaso Casaburi 0c0fd0b018 Merge branch 'codex/feature/p2p-stats-settings'
# Conflicts:
#	package.json
#	public/translations/ar/default.json
#	public/translations/bn/default.json
#	public/translations/cs/default.json
#	public/translations/da/default.json
#	public/translations/de/default.json
#	public/translations/el/default.json
#	public/translations/en/default.json
#	public/translations/es/default.json
#	public/translations/fa/default.json
#	public/translations/fi/default.json
#	public/translations/fil/default.json
#	public/translations/fr/default.json
#	public/translations/he/default.json
#	public/translations/hi/default.json
#	public/translations/hu/default.json
#	public/translations/id/default.json
#	public/translations/it/default.json
#	public/translations/ja/default.json
#	public/translations/ko/default.json
#	public/translations/mr/default.json
#	public/translations/nl/default.json
#	public/translations/no/default.json
#	public/translations/pl/default.json
#	public/translations/pt/default.json
#	public/translations/ro/default.json
#	public/translations/ru/default.json
#	public/translations/sq/default.json
#	public/translations/sv/default.json
#	public/translations/te/default.json
#	public/translations/th/default.json
#	public/translations/tr/default.json
#	public/translations/uk/default.json
#	public/translations/ur/default.json
#	public/translations/vi/default.json
#	public/translations/zh/default.json
#	src/components/settings-modal/__tests__/settings-modal.test.tsx
#	src/components/settings-modal/settings-modal.tsx
#	yarn.lock
2026-05-07 16:59:44 +07:00
Tommaso Casaburi 14a4790c8b feat(p2p settings): add browser p2p stats 2026-05-07 16:56:29 +07:00
Tommaso Casaburi 529e8ed48f fix(deps): update vulnerable transitive dependencies 2026-05-06 18:02:28 +07:00
Tommaso Casaburi cf8c70493c chore(deps): upgrade bitsocial react hooks 2026-05-06 17:57:47 +07:00
Tommaso CasaburiandGitHub aaa0d88d6a fix: remove Android self-install updater (#1125)
* fix: remove Android self-install updater

* fix: open Android updates in native browser
2026-05-06 17:56:00 +07:00
Tommaso Casaburi 2ebd9ecc30 chore(deps): bump bitsocial react hooks to 0.1.6 2026-05-05 14:19:04 +07:00
Tommaso Casaburi ab6dce563a chore(deps): bump bitsocial hooks 2026-05-02 16:04:23 +07:00
Tommaso Casaburi d0e1d192e3 chore(release): v0.8.3 2026-05-01 22:57:41 +07:00
Tommaso Casaburi 807a68805c chore(release): v0.8.2 2026-04-30 19:01:51 +07:00