Keep form-based invitation screens open on account creation failures so users can see errors without replaying the welcome animation.
Centralize join form template context, preserve theming across invite routes, and add regression coverage for validation and E2E flows.
When multiple users accept the same unlimited invite code, the user lookup
after a successful join used `filter_by(code=...).first()`, which always
returned the first user who ever used that code on the server — not the
user who just signed up. Subsequent users were never inserted into
invitation_users, so the home page card only ever showed the first acceptee.
Fix: look up the newly created user by username (unique per server) so each
acceptance is correctly attributed.
Add a regression test that asserts all users appear in invite.users after
multiple acceptances of an unlimited invite.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix 55 test failures caused by missing request contexts and incorrect
session_transaction() usage across 8 test files
- Fix ruff import sorting errors and unused imports
- Fix 122 type errors: rename method override parameters to match base
classes, add None guards for fetchone()/datetime, widen dict type
annotations, add type: ignore for SQLAlchemy stub limitations
- Add [tool.ty.rules] config to suppress unsupported-base warnings
- Fix _ variable shadowing gettext in wizard routes
- Add noqa: ARG002 for unused method arguments required by base class
Security:
- Fix XSS in HTMX responses by replacing f-string HTML with Jinja partials
- Fix TLS verify_cert not being applied (add Tls config to ldap3 Server)
- Fix password_hash NOT NULL conflict for LDAP-only admin accounts
- Fix should_create_ldap_user defaulting to True for existing invitations
Correctness:
- Fix DN reconstruction fragility using escape_rdn for special characters
- Fix connection leaks with try/finally in all LDAPClient methods
- Fix sync interval logic (check FLASK_ENV not WIZARR_ENABLE_SCHEDULER)
- Only register LDAP sync job when LDAP is actually configured
- Make find_user_dn and service_connection public API methods
Cleanup:
- Squash 5 incremental LDAP migrations into single 20251226_add_ldap_support
- Remove duplicate imports/queries in auth routes
- Replace f-string logging with %s formatting
- Extract inline HTML to Jinja template partials
Overrides cachelib's _remove_expired to delete empty/truncated session
files that cause endless "Exception raised while handling cache file"
warnings. Also cleans up corrupt files at startup.
Fixes#1180
- Added a preview link for bundles in the wizard settings page. closes#1048
- Enhanced the wizard steps template to handle bundle preview mode.
- Updated JavaScript to generate URLs for bundle preview and runtime modes.
- Improved test coverage for password reset token generation by asserting token creation.
This commit implements two improvements to the combo wizard invitation flow:
1. Badge Display Fix: Added the "pre-invite" / "post-invite" category badge
above wizard steps in combo invites. This badge was already present in
single-invite pages but was missing from combo invites.
2. URL Refactoring: Cleaned up combo wizard URLs to match the pattern used
by single-invite wizards:
- Before: /wizard/combo/0?category=pre_invite → /j/<code> → /wizard/combo/0?category=post_invite
- After: /wizard/combo/pre_invite → /j/<code> → /wizard/combo/post_invite
This makes combo URLs consistent with single-invite URLs
(/wizard/pre-wizard → /wizard/post-wizard) by removing the step index
from the path and using path-based category routing.
Changes include:
- Pass step_phase to template for badge display
- Update routes to use path-based categories instead of query parameters
- Update templates and JavaScript to handle new URL structure
- Fix form method attributes and template formatting
Migration Changes:
- Renamed migration file from 20251004 to 20251005
- Updated down_revision from fd5a34530162 to 08a6c8fb44db
- Ensures migration runs after upstream notification events migration
- Fixes migration chain branching issue
- Removed incorrect merge migration (1e83c67d9785)
Migration chain is now:
fd5a34530162 (disabled attribute) → 08a6c8fb44db (notification events)
→ 20251005_add_category_to_wizard_step (wizard category)
Wizard Refactoring:
- Enhanced uniqueness constraint for WizardStep from (server_type, position)
to (server_type, category, position)
- Ensures steps in different categories (pre_invite vs post_invite) can have
the same position indexing without conflict
- Updated wizard state management documentation to explicitly list and
describe data-* attributes used in steps.html template
Code Quality:
- Applied djlint formatting to 8 template files to minimize rebase conflicts
- Applied ruff format and ruff check --fix (no changes needed)
- Removed redundant requirement comments from spec-driven development
- Fixed case sensitivity in test assertion (POST vs post)
- Updated test references from 20251004 to 20251005 to match corrected
migration revision ID
- Added `identity_resolution.py` for resolving Wizarr users and identities.
- Created `ingestion.py` to handle recording and updating activity events.
- Introduced `maintenance.py` for cleanup and session management tasks.
- Developed `queries.py` for read-oriented operations on activity sessions.
- Implemented background tasks in `activity.py` for scheduled maintenance.
- Added tests for activity services and blueprint to ensure functionality.
- Replace raw SQL UPDATE statements with metadata caching system
- Add smart User model properties for allow_downloads/allow_live_tv
- Properties check server-specific keys (allowSync, EnableContentDownloading, etc.)
- Fix all media server clients: Plex, Jellyfin, Emby, AudiobookShelf, Navidrome, RomM, Kavita, Komga
- Remove problematic raw SQL from admin routes
- Eliminates concurrent transaction conflicts causing "database is locked" errors
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fix test database isolation by cleaning WizardStep data before tests run
- Remove unused imports and fix import ordering
- Replace setattr with direct attribute assignment
- Use contextlib.suppress for cleaner exception handling
- Fix nested if statement in wizard_export_import.py
Fixes the failing CI checks for PR #817.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>