Commit Graph
84 Commits
Author SHA1 Message Date
Tommaso Casaburi bbc696dcec ci: make coverage badge publishing advisory 2026-07-03 14:24:38 +07:00
Tommaso Casaburi f53bd0f6e5 ci(release): make React Doctor check advisory
The release preflight ran yarn doctor --diff against the previous tag as a
hard gate, but many error-level diagnostics flag intentional patterns rather
than bugs (e.g. resetting preview state when the reply modal closes, mirroring
long-accepted code). Mark the step continue-on-error so it still runs and posts
annotations without blocking a release.
2026-06-13 18:25:53 +07:00
Tommaso CasaburiandGitHub 85b782e934 feat(electron): sign and notarize mac release builds (#1171)
* feat(electron): sign and notarize mac release builds when Apple credentials are present

* fix(electron): work around codesign PID parsing for digit-leading app name in @electron/notarize

codesign interprets a bare '5chan.app' argument as process ID 5, so
@electron/notarize 2.5.0's pre-upload signature check fails with 'No such
process'. Backport the './' basename prefix from electron/notarize#245 as
a yarn patch until forge depends on notarize >= 3.x.

* docs(agent-playbooks): record codesign PID parsing surprise for digit-leading app name

* fix(ci): keep mac signing env consistent with certificate availability
2026-06-13 15:26:31 +07:00
Tommaso CasaburiandGitHub 6cb28b0e4f fix(youtube thumbnails): prefer best available image
Prefer the best available YouTube thumbnail, fall back cleanly when high-resolution images are unavailable, and keep the React Doctor PR gate scoped to newly introduced issues.
2026-06-13 13:39:22 +07:00
Tommaso Casaburi 6c660c01cd ci(release): run react doctor against previous tag 2026-06-07 23:13:45 +07:00
Tommaso CasaburiandGitHub aa5a985201 ci(react-doctor): add official PR-review Action, drop redundant CLI step (#1156)
Adds the official react-doctor GitHub Action (millionco/react-doctor@v1),
which posts inline review comments + a sticky summary for issues a PR
INTRODUCES (diffed against the merge-base) -- more visible than the
previous CLI '--annotations' markers.

Removes the now-redundant react-doctor steps from ci.yml (the
detect-changes/diff-annotations/skip steps and the push-time full scan)
so react-doctor runs once per PR, not twice. It reads doctor.config.jsonc,
so the React-Compiler rules we don't enforce stay suppressed.
2026-06-05 22:34:29 +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 029939089f fix(flags): align board flag rendering (#1142)
* fix(flags): align board flag rendering

* ci: run react doctor on changed pr files
2026-05-27 16:06:13 +07:00
Tommaso Casaburi 3e8508e9ad chore(release): deploy web release to Vercel 2026-05-11 17:31:32 +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 fdbb650baa build(android): add fdroid distribution flavor 2026-04-30 18:58:50 +07:00
Tommaso Casaburi 3524c1c01e fix(release): cache Windows release dependencies 2026-04-23 13:32:49 +07:00
Tommaso Casaburi 82476d8586 fix(release): restore Android signing keystore 2026-04-23 13:08:20 +07:00
Tommaso Casaburi ee7a5b5778 refactor(core): remove legacy plebbit terminology 2026-04-17 10:48:27 +07:00
Tommaso Casaburi 85e81aae2e fix(release): normalize asset names 2026-03-21 12:41:32 +08:00
Tommaso Casaburi 5ce0e797c7 fix(release): include version in DMG artifact names 2026-03-20 21:53:07 +08:00
Tommaso Casaburi 4ec74bc85e fix(ci): cache yarn after corepack in windows packaging 2026-03-20 18:32:43 +08:00
Tommaso Casaburi 1bec1fd549 Update ci.yml 2026-03-20 18:08:05 +08:00
Tommaso Casaburi 4d5ee595e4 fix(ci): windows job was hanging 2026-03-20 17:32:24 +08:00
Tommaso Casaburi 50301fb4e8 fix(ci): avoid husky during yarn install 2026-03-19 15:02:12 +08:00
Tommaso Casaburi da62c27180 fix(ci): drop legacy yarn install flags 2026-03-19 14:54:17 +08:00
Tommaso Casaburi 91e5131d29 fix(ci): remove setup-node yarn cache 2026-03-19 14:47:35 +08:00
Tommaso Casaburi f342179f1a chore(tooling): migrate 5chan to Yarn 4 2026-03-19 13:41:03 +08:00
Tommaso Casaburi 2de723a076 fix(ci): publish coverage badge via GitHub Pages 2026-03-17 20:24:12 +08:00
Tommaso CasaburiandGitHub 2c276f05eb fix(ci): scope Electron native rebuilds (#1099) 2026-03-17 18:22:56 +08:00
Tommaso CasaburiandGitHub c9bd6258b2 fix(electron): restore packaged desktop app loading (#1095)
* fix(electron): restore packaged desktop app loading

Rebuild and verify Electron native modules before packaging and use the Vite base URL for packaged asset preloads.

* test(preload-utils): cover non-root base urls
2026-03-17 17:04:47 +08:00
Tommaso CasaburiandGitHub b2946e8b2e fix(ci): publish coverage badge from badges branch (#1091)
* fix(ci): publish coverage badge from badges branch

* fix(ci): address badge review findings
2026-03-17 16:10:55 +08:00
Tommaso Casaburi d08becf4b2 chore(readme): add dynamic coverage badge 2026-03-16 20:55:01 +08:00
plebeius 3401ec147f fix(ci): URL-encode asset filenames and allow release updates
Spaces in Electron Forge filenames (e.g. "5chan Setup.exe") broke
markdown download links in the release body. Also add allowUpdates
to finalize-release so it succeeds when a release already exists.
2026-03-10 18:55:28 +08:00
plebeius 10cd99545e fix(ci): prevent partial releases when a build job fails
Restructure the release workflow so build jobs upload workflow artifacts
instead of creating GitHub releases directly. A single finalize-release
job downloads all artifacts and creates the release only when every
platform build succeeds. Also removes the unused gradle bundle step
from the Android job and adds retry logic to gradlew assembleRelease.
2026-03-10 12:21:37 +08:00
plebeius e46c7dd169 ci: add smoke-gated quality checks to the main pipeline
Replaced test.yml with ci.yml, added a built-app smoke runner in scripts/smoke-web-app.js, and inserted a release preflight so tags run the same core checks before packaging.
2026-03-08 12:41:52 +08:00
plebeius ca2e024c73 fix(release): harden release workflow installs 2026-03-01 14:02:48 +08:00
plebeius cdd6be915e fix(release): restore 5chan html zip artifact in tag releases 2026-02-10 12:38:12 +08:00
plebeius b30eb150d0 fix(release): remove duplicate architecture suffixes from artifact names
Remove unnecessary rename steps that were adding duplicate architecture suffixes to AppImage and ZIP filenames. Electron Forge already includes architecture in AppImage filenames, and ZIPs include it in the darwin-arch pattern.
2026-01-30 16:52:58 +08:00
plebeius eec5ba559c fix release workflow 2026-01-30 16:23:08 +08:00
plebeius 01bda3bffb fix(release): resolve build failures for v0.6.3
Fix Android Capacitor compatibility by downgrading tar to 6.2.1. Add Windows-specific icon file for Squirrel installer. Update electron-forge to 7.8.0 and change DMG format to ULFO for macOS Sequoia compatibility. Add retry logic for transient SSL errors on Mac Intel runners.
2026-01-30 15:26:17 +08:00
plebeius 50ee10cbc9 fix: resolve PR 877 issues - route params, artifact paths, and build configs
Fix route parameter name in use-initial-theme hook (communityAddress -> boardIdentifier), correct release workflow artifact paths (dist -> out/make), add BUILD_ARCH env var for Linux arm64 builds, fix macOS app name dev check, and update capacitor webDir to match vite output.
2026-01-30 14:33:45 +08:00
plebeius 01aac36cfa fix electron builds 2026-01-30 13:21:41 +08:00
plebeius 815f618320 refactor: migrate from electron-rebuild to electron-forge 2026-01-30 12:28:41 +08:00
plebeius 431e171049 Add Bonfida import fix script and improve release workflow 2026-01-30 11:50:20 +08:00
plebeius 3335f6ff76 fix(ci): use setup-python action for macos release build 2026-01-26 16:41:04 +08:00
plebeius 1818435b17 fix macos runner image 2026-01-25 17:14:52 +08:00
plebeius eda8b5ed86 fix(android): release build fails due to tar v7 incompatibility with Capacitor CLI 2026-01-25 17:02:07 +08:00
plebeius 3cac7810ae Delete notifications.yml
using https://github.com/mhkafadar/notifine instead
2026-01-25 14:00:22 +08:00
plebeius 5f85a0ac15 fix(ci): update macos runner image 2026-01-25 13:39:41 +08:00
plebeius 91cd84819d Update test.yml 2026-01-14 15:03:22 +01:00
plebeius 46f0f494e9 fix(ci): macOS test builds fail with hdiutil "Resource busy" error 2026-01-14 14:36:13 +01:00
plebeius 96a3068928 fix(ci): remove redundant electron-rebuild from build scripts 2026-01-13 16:00:07 +01:00
plebeius 5eceba0134 refactor(ci): remove useless job 2025-12-03 12:51:13 +01:00