- Added handling for ProtectedError when deleting accounts with linked invoices, estimates, or recurring invoices.
- Updated account deletion response message to include all related billing records.
- Modified date filtering in various views to ensure inclusivity of the end day by using `created_at__date`.
- Introduced tests for date filtering edge cases and account deletion scenarios with billing records.
- Updated package version to 1.4.0 in uv.lock.
- Cleaned up admin.py by removing unnecessary dictionary wrapping for fields.
- Adjusted migration files to maintain consistent formatting and removed redundant lines.
- Updated models.py and tests to remove unnecessary blank lines and improve readability.
- Enhanced error handling in the analytics API to properly forward upstream status and messages.
- Added comprehensive tests for the analytics proxy to ensure correct status and body forwarding.
- Updated contributing guidelines to clarify the use of ruff for code style enforcement.
- Implemented TeamScreen to display active and deactivated team members.
- Added functionality to invite new members and manage roles (admin/member).
- Integrated error handling for API responses and loading states.
- Created reusable widgets for displaying member information and actions.
feat: enhance TasksListScreen with initial view filtering
- Modified TasksListScreen to accept an initial view parameter for filtering tasks.
- Implemented logic to apply filters based on dashboard badge taps.
- Updated UI to show active filters with clear options.
test: add unit tests for dashboard badge filters
- Created tests to verify the behavior of task and lead filters based on dashboard badges.
- Ensured correct API query parameters are sent for various filter scenarios.
test: add unit tests for team provider functionality
- Implemented tests for team provider to validate fetching and managing team members.
- Verified role changes, activation status updates, and invite functionality.
- Ensured proper handling of API responses, including error states.
- Updated lead pipeline and task pipeline models to enhance the is_default field's help text for clarity.
- Modified lead and opportunity email tasks to utilize frontend URLs instead of domain names for better link accuracy.
- Removed outdated Celery task tests for leads and opportunities.
- Streamlined permission checks across lead and opportunity views by introducing a unified is_org_admin function.
- Improved HTML templates for email notifications to ensure correct variable usage and link generation.
- Enhanced kanban view filtering logic to ensure proper access control for users based on their roles.
- Replaced direct usage of `json.loads` for parsing parameters with dedicated validation functions (`payload_id_list`, `uuid_list_param`, `uuid_param`) across multiple views to enhance error handling and maintainability.
- Updated filtering logic in various views to ensure proper UUID handling for related entities (e.g., `assigned_to`, `teams`, `contacts`, etc.).
- Enhanced permission checks by adding `HasOrgContext` to user-related views to enforce organization context.
- Improved error handling in invoice creation tests to correctly assert permission denial responses.
- Streamlined query parameter processing in Kanban and list views to reduce redundancy and improve clarity.
- Updated the template list page to link to a new template creation page.
- Implemented a new server-side route for creating invoice templates, including form handling and validation.
- Created a new Svelte component for the template creation form, allowing users to input template details.
- Added admin-only checks to restrict access to template creation.
- Enhanced the template list page with informative disabled buttons for editing templates.
feat(leads): implement lead conversion functionality
- Added a new action to convert leads, creating associated accounts, contacts, and opportunities.
- Updated the lead detail page to include a form for converting leads, with appropriate UX hints.
- Enhanced the lead edit page to display conversion results and links to newly created records.
feat(tags): implement tag archiving and restoring functionality
- Added actions for archiving and restoring tags, with appropriate error handling.
- Updated the tags management page to include controls for archiving and restoring tags.
- Enhanced user feedback for tag actions, including error messages and confirmation prompts.
test: add stub for dynamic public environment variables
- Created a stub for SvelteKit's $env/dynamic/public to facilitate unit testing without a full build.
Scale up from 193 tests (62% coverage) to 1229 tests (93% coverage)
targeting all uncovered view logic, model methods, serializers, and
utility code across all 8 app modules. Added new test files for
duplicate detection, external auth, audit logging, models, dashboard,
organizations, and settings.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add pytest-based test infrastructure with SQLite for fast isolated testing.
Tests cover all 8 app modules (common, accounts, leads, contacts, opportunity,
cases, tasks, invoices) including CRUD, org isolation, kanban, comments, and
auth endpoints. Achieves 54% coverage with a 50% threshold.
Also fixes 10 backend bugs discovered by the test suite:
- Fix serializer read_only_fields for org (teams, documents, board columns/tasks)
- Fix AccountCommentView.put missing partial=True
- Fix UserDetailView broken reverse relation and missing org on address save
- Fix DocumentDetailView.put partial update and null status bug
- Fix TaskDetailView unhandled DoesNotExist → get_object_or_404
- Fix BoardColumn/BoardTask views missing org on save
- Fix LeadListView.post unhandled IntegrityError for duplicate email
- Fix ContactDetailView.get wrong reverse relation name
- Fix OpportunityDetailView null checks before accessing .org
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>