Commit Graph

23 Commits

Author SHA1 Message Date
Matthieu B
73c29458fe fix: resolve all test failures, linting errors, and type errors
- 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
2026-03-29 16:20:23 +02:00
Matthieu B
5feaf51337 Enhance wizard step management and UI
- Updated the sub-navigation for the wizard to conditionally display step creation options based on the default state and available bundles.
- Improved the bundles page layout by categorizing steps into pre-invite, post-invite, and additional categories, enhancing user experience.
- Added orphaned step handling to allow users to remove steps that no longer have an associated entry.
- Displayed the associated wizard bundle name in the invite card if applicable.
- Adjusted JavaScript routing for bundle steps in the wizard.
- Modified the development script to set the NODE_ENV to development when installing npm dependencies, ensuring proper handling of devDependencies.
- Updated the subproject reference in the plus directory to indicate a dirty state.
2025-10-26 12:26:26 +01:00
Matthieu B
9b5aa0972a refactor: remove slop from media and new linting rules 2025-10-23 18:33:50 +02:00
Matthieu B
d478686ade refactor: use Flask-SQLAlchemy 3.x get_or_404() pattern and fix line lengths
Replace verbose db.session.get() + abort(404) pattern with the modern
Flask-SQLAlchemy 3.x db.get_or_404() helper method in wizard-related files.

Changes:
- Replaced 7 instances in wizard_admin/routes.py with db.get_or_404()
- Fixed 16 E501 line length violations (>88 chars) by breaking long
  strings and comments across multiple lines
- All changes confined to wizard-related files (in scope for this PR)

Benefits:
- Cleaner, more maintainable code (1 line vs 3 lines)
- Follows Flask-SQLAlchemy 3.x best practices
- Improved code readability with proper line wrapping

Reference: https://flask-sqlalchemy.readthedocs.io/en/stable/api/
2025-10-18 14:01:34 +02:00
engels74
d0df4c6d5d feat: wizard step refactor into pre/post wizard steps
Changes:
  - Pre/post invitation wizard phases
  - Phase-aware routing (/pre-wizard/*, /post-wizard/*)
  - Phase indicator badges (visual categorization)
  - Dynamic completion button behavior
  - Two-column admin layout with category drag-and-drop
  - Invite code management service
  - Enhanced wizard export/import
  - Comprehensive test coverage (17 new test files)
2025-10-16 15:28:48 +02:00
Matthieu B
9af3222d8e fix: and character rendering issues 2025-10-04 12:06:54 +02:00
Matthieu B
fc49da65f6 refactor: fix ruff linting and ty type errors
- Fix invalid parameter defaults: library_id: str | None = None
- Replace try-except-pass with contextlib.suppress()
- Remove unnecessary dict.keys() calls
- Remove unnecessary variable assignments before return
- Combine nested if statements
- Add type ignore comments for intentional shadowing
- Add type ignore comments for SQLAlchemy dynamic attributes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 22:06:15 +02:00
engels74
0f0dedde0a feat: implement wizard step interaction requirement system
Add comprehensive "require interaction" functionality for wizard steps that prevents users from proceeding until they engage with step content.

## Key Features:
- **Database Integration**: New `require_interaction` boolean field in WizardStep model with migration
- **Frontend Gating**: Robust JavaScript system that disables "Next" button until user clicks links/buttons in step content
- **UI Enhancement**: Improved checkbox forms with clear descriptions and visual indicators
- **Event Handling**: Advanced interaction detection with proper HTMX disabling and event capture
- **Admin Interface**: Full integration with wizard configuration forms (main and simple)
- **Export/Import**: Support for require_interaction field in wizard step data operations

## Technical Implementation:
- Disabled button state management with pointer-events and tabindex control
- HTMX attribute manipulation to prevent premature navigation
- Event listener capture phase handling for reliable interaction blocking
- Comprehensive test coverage for interaction scenarios
- Form validation and user experience improvements

## Files Modified:
- Backend: models, routes, forms, services, migration
- Frontend: JavaScript interaction logic, templates, UI components
- Testing: Complete test suite for interaction requirements

This feature ensures users engage with critical wizard content before proceeding, improving onboarding experience and preventing accidental step skipping.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-07 14:46:50 +02:00
Matthieu B
c317e66fa8 fix: update API key hashing to use UTF-8 encoding and improve bundle name handling in export
fix: add requests.exceptions import in Audiobookrequest and Ombi clients
fix: ignore type errors in invitation unit tests for library and server associations
fix: use timezone-aware datetime for export dates in WizardExportImportService
2025-09-05 14:41:37 +02:00
Matthieu B
486e40e202 fixes and closes #784 #772 #795 2025-08-27 22:08:37 +02:00
Matthieu B
036cdd260b fix: Resolve type checker issues
- Add type guards for preset_id and server_type parameters
- Use broader exception handling in client base for requests
- Fix CLIENTS dictionary access with explicit class variable

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 22:22:12 +02:00
Matthieu B
d4dd57ee1e feat: Add comprehensive connections and expiry management system
- Add new connections management system with MediaConnection and DiscordWebhook models
- Implement dynamic server configuration with URL field support
- Add expiry management system with automatic user cleanup
- Create wizard preset system for streamlined server setup
- Add dedicated connections interface in settings with CRUD operations
- Integrate expiry functionality with connection management
- Add proper form validation and error handling
- Update templates and routes for new connection workflow

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 22:21:10 +02:00
Matthieu B
b513e3a2d2 fix and closes #715 2025-07-18 16:16:16 +02:00
Matthieu B
02126de7b8 Add ty dependency and pre-push hook for type checking
- Added `ty` version 0.0.1a14 to dependencies in `pyproject.toml`.
- Updated `.pre-commit-config.yaml` to include a pre-push hook for type checking using `ty`.
- Made minor adjustments in various files to ensure compatibility with type checking.
2025-07-15 21:32:43 +02:00
Matthieu B
7b8f64af7d Fix SQLAlchemy model constructors to accept keyword arguments
- Added __init__ constructors to all SQLAlchemy models
- Fixed pyright 'No parameter named' errors across the codebase
- Fixed various ruff linting issues (SIM108, E741, E402, SIM102, B904, SIM105)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 13:52:15 +02:00
Matthieu B
d6dbd94826 migrate 2025-07-14 15:22:58 +02:00
Matthieu B
be1bdb83f1 added translation strings 2025-07-11 15:29:52 +02:00
Matthieu B
add1aaf8f4 added selectable wizard bundles 2025-07-04 15:33:24 +02:00
Matthieu B
fdded57b74 finishing touches on bundles 2025-07-04 13:03:18 +02:00
Matthieu B
51da1160a3 add custom steps 2025-07-04 12:33:33 +02:00
Matthieu B
98dd3cb79b feat: Add multi-server invite support with Jellyfin integration 2025-07-03 21:43:43 +02:00
Matthieu B
b00ad2d455 Fix and closes #662 of incorrect deletion display 2025-06-30 15:03:37 +02:00
Matthieu B
9ac933ac26 Add wizard step management and enhance asset building 2025-06-25 23:17:46 +02:00