Files
Muhsin 28969deb01 fix: Resolve account switching issue for users with new accounts
## Summary
  - Fix account switching bug where new users couldn't switch accounts properly
  - Update `active_account_user` method to handle NULL `active_at` values correctly using `NULLS LAST` sorting
  - Add comprehensive specs to test the NULL handling behavior

  ## Problem
  When users were added to new accounts, the `active_at` field was NULL. The existing `ORDER BY active_at DESC` had undefined behavior for NULL values, causing:
  - Mobile apps to receive wrong `account_id` from `/profile` API
  - Account switching to fail until multiple attempts "fixed" it temporarily
  - Issue recurring whenever new accounts were added

  ## Solution
  - Updated `active_account_user` method in `UserAttributeHelpers` to use `NULLS LAST` sorting
  - This ensures accounts with actual timestamps are prioritized over NULL values
  - Added specs covering normal sorting, NULL handling, and edge cases
2025-08-29 19:38:52 +05:30
..