Skip to content

V1.3.0#101

Merged
csd113 merged 26 commits into
mainfrom
v1.3.0
Jun 27, 2026
Merged

V1.3.0#101
csd113 merged 26 commits into
mainfrom
v1.3.0

Conversation

@csd113

@csd113 csd113 commented Jun 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

csd113 added 26 commits May 27, 2026 22:39
- Hardened oversized image and video auto-compression so processed media is re-statted and validated before post finalization.
- Fixed cases where compressed media could still exceed board/site upload limits and leave broken posts, stale DB references, or orphaned files.
- Improved cleanup for failed upload-processing paths, including stale staged uploads after new-thread poll validation failures.
- Fixed misleading upload-limit messages for very small configured limits.
- Improved browser-side auto-compression reliability for extension-only or blank-MIME uploads.
- Added submit-time guards, clearer failure text, inline “Auto-compressed X to Y” status messages, stronger image retry behavior, and more reliable video recording retries.
- Fixed Chromium/WebKit video compression timeouts by attaching a hidden muted 1px `<video>` element during browser capture and removing it during cleanup.
- Added ignored opt-in Playwright coverage for oversized image/video compression success paths and negative failure paths.
Prepare for the 1.3.0 release: update the changelog header, bump the package version in Cargo.toml, refresh documentation references (README, SETUP), and adjust test/template strings in src/templates/admin.rs to reflect the new version.
- Fixed non-image media upload regressions affecting small audio files, including FLAC and other supported audio formats.
- Fixed audio/video validation so supported audio types are preserved correctly and invalid media is rejected safely.
- Fixed MKV/Matroska video detection so valid `.mkv` uploads work when video uploads are enabled.
- Fixed WebM audio MIME handling so `audio/webm` is not persisted as `video/webm`.
- Fixed failed media upload cleanup to avoid stale staged files, partial outputs, thumbnails, or DB rows.
- Removed unintended manual textarea resizing handles from RustChan forms.
Introduce a first-run / reopenable setup wizard and persistent setup state.

- Add db/setup.rs: tracks setup state, markers (complete/reopen), helpers to reopen/mark complete, and tests.
- Add handlers/setup.rs: full setup wizard endpoints (GET/review/finish) with form parsing, validation, CSRF, and DB writes to create initial board/admin and apply site settings.
- Extend config: add behind_proxy and https_cookies options and a SetupRuntimeSettingsUpdate + update_settings_file_setup_runtime helper to persist runtime toggles.
- Wire setup into handlers and admin UI: expose setup module, include setup_status in admin snapshot/templates, and add admin endpoint to reopen setup.
- Minor visibility changes for admin session/CSRF helper functions and adjustments to static/admin.css/templates to support the UI.

These changes enable guided initial configuration, allow admins to reopen the wizard safely, and persist runtime-related settings to the config file.
Add native PDF upload size support and related setup flow and settings refactors.

- Database: add max_pdf_size column (default 157_286_400) and include it in schema migrations, board creation/updating, and test assertions.
- DB mapping: update board row mapping and SQL parameter indices to include max_pdf_size and shift subsequent columns.
- Handlers: thread/post/upload handlers and multipart parsing now accept and enforce max_pdf_size; tests added/updated to cover PDF limits and renamed-file checks.
- Setup flow: introduce pending admin hash token stored in a secure cookie to avoid echoing the admin password on the review page; validate and consume the token during setup finish. Add admin_close_setup endpoint and close_reopened_setup DB helper to clear reopen markers.
- Config: refactor settings file update to return anyhow::Result with atomic tempfile persist and provide a new SetupSettingsFileUpdate struct to persist setup-owned settings in one atomic rewrite; preserve a wrapper that logs on error for compatibility.
- Templates/forms: update setup form and copy to expose PDF limit field and avoid showing raw admin password.
- Misc: various test adjustments to account for the new PDF field and setup behavior.

These changes ensure PDFs have dedicated size limits, improve atomic settings persistence, and make the first-run setup safer by avoiding password echoing.
Squash the pre-release migration ladder into a single 1.3.0 baseline: fresh installs create and stamp the baseline schema directly and preexisting databases that match are marked as 1.3.0. Replace numeric legacy versioning with a textual BASELINE_SCHEMA_VERSION and update read/stamp logic to manage the baseline. Implement thorough structural schema verification (object/table/column/index/foreign-key shape, required SQL fragments, quick_check/foreign_key_check) and expose helpers to verify/normalize the database schema; DB health snapshots now include a schema check. Add site-setting backed acknowledgement for failed background jobs and adjust admin counters/queries so acknowledged failures are excluded, plus tests for the new behavior. Documentation (CHANGELOG, README, SETUP) and admin/handler/template plumbing updated to reflect the new baseline and admin tooling.
Refine admin and public UI text, accessibility, and form handling. Update Tor status/help strings to be more actionable. Add public URL help text and a copy button, and improve diagnostics labels. Harden modals, panels and menus with aria attributes, hidden/inert states and ids (backup, compress, confirm, report, health job panels, catalog thread menus, nsfw dialog, theme picker, mobile menu, etc.). Add form labels/ids for captcha, thread/reply fields and upload inputs; refactor upload size/accept logic into helpers and produce clearer mobile labels and hints. Improve thread nav layout and media controls with ARIA, simplify edit-overlay visibility logic, and add various admin CSS improvements (buttons, grid spacing, responsive tweaks, disabled state styling, and checkbox sizing).
Add structured handling for expected post validation errors by introducing handled_post_error_status and using it in thread and board posting handlers so responses use proper HTTP status codes (422/415/413) for inline and XHR errors. Update CSRF handling in set_theme to skip check for empty csrf param and adjust related tests. Wire classify_upload_error into upload parsing paths. Add ADTS AAC validation (validate_adts_aac_bytes + file-based wrapper) and invoke it for audio/aac uploads to reject malformed AAC streams; include tests and fixtures for malformed/valid ADTS frames. Add multipart/parser tests to ensure PDF size limits are inclusive and that parser counts file payload (not just multipart overhead). Misc test updates to assert new statuses and behaviors.
@csd113
csd113 merged commit 773533d into main Jun 27, 2026
5 checks passed
@csd113
csd113 deleted the v1.3.0 branch June 27, 2026 01:51
@csd113
csd113 restored the v1.3.0 branch June 27, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant