Migrate all 34 Vue components from settings.activeDid to $getActiveIdentity()
pattern. This completes the database architecture improvement that separates
identity selection from user preferences and prevents data corruption.
- Replace this.activeDid = settings.activeDid with $getActiveIdentity() calls
- Add ESLint ignore comments for TypeScript type assertions
- Update migration plan documentation to reflect completion
- All components tested with passing results
BREAKING CHANGE: Components now use active_identity table as single source
of truth for activeDid values instead of settings table
- Replace settings.activeDid with () pattern
- Maintains backward compatibility with existing functionality
- Component now uses active_identity table as single source of truth
- Part of ActiveDid migration (2/32 components completed)
- Updated migration plan to include lint-fix step
- Add minimal change to prioritize activeDid from active_identity table
- Maintain all existing complex logic and backward compatibility
- Update migration plan to reflect API layer completion
The $accountSettings method now uses the new active_identity table as primary
source while preserving all existing settings merging and fallback behavior.
- Fix $updateActiveDid() to use MASTER_SETTINGS_KEY constant instead of hardcoded "1"
- Update migration plan to reflect current state after rollback
- Ensure backward compatibility during activeDid migration transition
The dual-write pattern now correctly updates both active_identity and settings tables
using the proper MASTER_SETTINGS_KEY constant for settings table targeting.
- Update () to call () with fallback to settings
- Maintain backward compatibility while using new active_identity table
- Update migration plan documentation to reflect completed Step 1
- Restore Playwright workers to 4 (was accidentally set to 1)
Tests: 39/40 passing (1 unrelated UI failure)
Migration progress: Step 1 complete, ready for Step 2 dual-write implementation
Update $getActiveIdentity() method to return { activeDid: string } instead
of full ActiveIdentity object. Add validation to ensure activeDid exists
in accounts table and clear corrupted values. Update migration plan to
reflect completed first step of API layer implementation.
- Change return type from Promise<ActiveIdentity> to Promise<{ activeDid: string }>
- Add account validation with automatic corruption cleanup
- Simplify query to only select activeDid field
- Improve error handling to return empty string instead of throwing
- Update migration plan documentation with current status
Updated activeDid migration plan to reflect Phase 2 API layer implementation
completion. Added critical blocker notes about IndexedDB database inspection
requirements and updated next steps with priority levels.
- Marked Phase 2 as COMPLETE with dual-write pattern implementation
- Added critical blocker for IndexedDB database inspection
- Updated next steps with priority levels and realistic timelines
- Clarified database state requirements for testing
- Add migration 003 with data migration logic to prevent data loss
- Create dedicated ActiveIdentity interface in separate file for better architecture
- Implement $getActiveIdentity method in PlatformServiceMixin
- Enhance $updateActiveDid with dual-write pattern for backward compatibility
- Maintain separation of concerns between settings and active identity types
- Follow project architectural pattern with dedicated type definition files
The migration creates active_identity table alongside existing settings,
automatically copying existing activeDid data to prevent user data loss.
Dual-write pattern ensures backward compatibility during transition.
Migration includes:
- Schema creation with proper constraints and indexes
- Automatic data transfer from settings.activeDid to active_identity.activeDid
- Validation to ensure data exists before migration
- Atomic operation: schema and data migration happen together
- Add data migration SQL to migration 003 for existing databases
- Automatically copy activeDid from settings table to active_identity table
- Prevent users from losing active identity selection during migration
- Include validation to ensure data exists before migration
- Maintain atomic operation: schema and data migration happen together
- Update risk assessment to reflect data loss prevention
- Add data migration strategy documentation
The migration now safely handles both new and existing databases,
ensuring no user data is lost during the activeDid table separation.
- Remove unnecessary complexity and focus on essential changes only
- Integrate with existing IndexedDB migration service (indexedDBMigrationService.ts)
- Maintain backward compatibility with existing migration paths
- Focus on core requirements: database schema, API methods, type definitions
- Eliminate duplicate migration logic already handled by existing service
- Preserve MASTER_SETTINGS_KEY = "1" for legacy support
- Add clear rollback strategy and integration points
The plan now focuses only on necessary changes while maintaining full
compatibility with existing systems and migration infrastructure.
- Add foreign key constraints to prevent data corruption
- Implement comprehensive migration validation and rollback
- Focus API updates on PlatformServiceMixin only (no component changes)
- Add enhanced error handling and data integrity checks
- Streamline plan to focus only on what needs to change
- Update timestamps and implementation details for current state
Breaking Changes:
- Database schema requires new active_identity table with constraints
- PlatformServiceMixin methods need updates for new table structure
Migration Impact:
- 50+ components work automatically through API layer
- Only core database and API methods require changes
- Comprehensive rollback procedures for risk mitigation
- Add master settings functions implementation strategy
- Correct IdentitySection.vue analysis (prop-based, no changes required)
- Simplify ContactAmountsView.vue (phased-out method, separate refactoring)
- Add new getMasterSettings() function with active_identity integration
- Include helper methods _getSettingsWithoutActiveDid() and _getActiveIdentity()
- Enhance evidence section with master settings architecture support
- Update risk assessment for phased-out methods
- Clean up migration timeline formatting
This commit focuses the migration plan on components requiring immediate
active_identity table changes, separating concerns from broader API refactoring.