Skip to content

Conversation

@epou
Copy link
Member

@epou epou commented Aug 22, 2025

No description provided.

@epou epou requested a review from Copilot August 22, 2025 14:05
@epou epou self-assigned this Aug 22, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR renames the is_logged_in field to active_session in the Device model and fixes the logic for determining when a device should be active. The change improves clarity by making the field name more descriptive and consolidates the active state logic.

Key changes:

  • Renamed is_logged_in field to active_session across the codebase
  • Simplified the Device.active calculation logic to depend on both registration_id and active_session
  • Updated database constraints and migration to reflect the field rename

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tigaserver_app/models.py Core logic changes for Device.active calculation and field rename
tigaserver_app/migrations/0085_auto_20250822_1214.py Database migration for field rename and constraint updates
tigaserver_app/views.py Updated field reference in token view
tigaserver_app/tests/tests.py Updated test assertions and device creation to use new field name
tigaserver_app/admin.py Updated admin interface field references
tigaserver_app/managers.py Updated manager method to use new field name
api/tests/test_views.py Updated test cases with new field name and added active state assertions
api/serializers.py Added transaction.atomic decorator
api/auth/serializers.py Updated authentication logic and added important comment about update_fields

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codecov
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 50.67%. Comparing base (a47f345) to head (acf27ef).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
tigaserver_app/managers.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   50.68%   50.67%   -0.02%     
==========================================
  Files          72       72              
  Lines       10452    10449       -3     
==========================================
- Hits         5298     5295       -3     
  Misses       5154     5154              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@epou epou merged commit 09f227e into master Aug 22, 2025
7 checks passed
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.

2 participants