Chore todo optimization#69
Merged
Merged
Conversation
…ndling - **Introduced `ApplicationStatePersistenceService`**: - Added `loadOpenApplicationIds` and `saveOpenApplicationIds` methods to manage open app states using `localStorage` with error handling and type validation. - Integrated logging via the `LogService` for persistence issues. - **Refactored `SettingsService`**: - Optimized persistence of individual and grouped settings with enhanced type-safety. - Modernized lifecycle management using `take`, `FormControl`, and `BehaviorSubject`. - Improved error notifications and streamlined `settings.service.ts`. - **Added `application-catalog.ts`**: - Centralized app definitions, default parameters, and icons for better reusability. - Included metadata (`version`, `author`, `website`) and status tracking (`development`, etc.) for apps. - **Created `application-manager.models.ts`**: - Consolidated enums (`AppType`, `APP_ID`) and types (`AppWindowSize`, `AppEntry`) for app-related configurations. - Standardized app properties like `memory`, `icon`, and `autofit`. - **Updated Markdown Reader and Desktop Components**: - Improved `MarkdownReaderComponent`’s `params` type safety and file handling logic. - Enhanced `DesktopComponent` by validating `params` type in `openApp`. These updates unify app management, improve state persistence and type safety, and declutter codebases by introducing shared models and centralized metadata. Signed-off-by: Colin Michaels <colin@colinmichaels.com>
…l Development Logic** - **Created `ApplicationRegistryService`**: - Centralized app storage, query, and management logic. - Extracted registry behavior and storage from `ApplicationManagerService` for modularity. - Added methods for querying installed apps, unregistration, and filtering by type. - **Optimized `AuthGuard` for Local Development**: - Added `isLocalDevelopmentHost()` to allow bypass for localhost (`localhost`, `127.0.0.1`, `::1`) and non-browser environments. - Updated `canActivate` logic to skip guards in local development mode. - **Updated Routing and Guard Logic**: - Removed unused Firebase-specific `authGuardPipe` logic from `app.routes.ts`. - **Refactored Application Manager**: - Delegated app query and registration methods (`getApps`, `registerApp`, `unregisterApp`, etc.) to `ApplicationRegistryService`. - **Enhanced Login Workflow for Local Development**: - Integrated local host detection in `LoginScreenComponent` to bypass login on localhost environments. - Adjusted automatic redirects to CLI app (`/os/cli`) for localhost scenarios. - **Updated Documentation**: - Added progress tracking for `ApplicationRegistryService` refactor in `TECH_DEBT.md`. These updates improve modularity (by isolating app registry logic), streamline development workflows for local environments, and enhance readability across multiple components/services. Signed-off-by: Colin Michaels <colin@colinmichaels.com>
…cleService`, and Refactor File System Initialization
- **Enhanced `TypewriterService`**:
- Improved timer and callback semantics with clear lifecycle management.
- Added explicit timeout and interval clearing via `clearTypingTimers()` for robustness.
- Extended test coverage to validate queue behavior, speed overrides, and event emissions.
- **Refactored Application Management**:
- **Introduced `ApplicationLifecycleService`**:
- Centralized application instance lifecycle (e.g., opening, focusing, closing).
- Separated lifecycle logic from `ApplicationManagerService` to improve modularity.
- Enhanced error handling for instance limits and out-of-memory scenarios.
- Streamlined `ApplicationManagerService` by delegating lifecycle methods (`openApplication`, `closeApplication`, etc.) to `ApplicationLifecycleService`.
- **Optimized `FileSystemService` Initialization**:
- Replaced random folder generation with deterministic favoritism using `createFavoriteFolderChildren()`.
- Added folder-specific hashing (`hashPath`) for seeded file/subfolder creation.
- Centralized logic for file extensions in `GENERATED_FILE_EXTENSIONS`.
- **Improved Tests and Mocks**:
- Added `typewriter.service.spec.ts` with tests for typing flow and lifecycle callbacks.
- Updated `login-screen.component.spec.ts` to mock `ActivatedRoute.snapshot` for enhanced compatibility.
- **Documentation Updates**:
- Marked `TypewriterService` stabilization task as complete in `TECH_DEBT.md`.
- Added progress tracking for `ApplicationLifecycleService` lifecycle extraction.
This update improves modularity in application management, ensures deterministic behavior in file system operations, and strengthens unit test coverage for critical services.
Signed-off-by: Colin Michaels <colin@colinmichaels.com>
- **Enhanced Application Lifecycle Management**:
- Introduced deterministic instance reopening via normalized IDs in `ApplicationManagerService`.
- Centralized restoration logic using `normalizeSavedAppId` in `ApplicationLifecycleService`, improving safety for multi-instance management.
- **Strengthened Unit Test Coverage**:
- Added focused specs for logic validation:
- `application-lifecycle.service.spec.ts` for lifecycle and persistence checks.
- `application-manager.service.spec.ts` for restoration and instance normalization behaviors.
- `file-system.service.spec.ts` for deterministic folder generation and navigation.
- **Improved Workflow and Compatibility**:
- Updated `.nvmrc` to Node 20 and enhanced CI workflows with `actions/setup-node@v4` for better version alignment and caching.
- Enhanced Firebase PR workflow to ensure environment parity with production deployment processes.
- **Documentation Updates**:
- Marked progress for lifecycle-related improvements and normalized app restoration in `TECH_DEBT.md`.
These updates ensure more predictable application lifecycle behaviors, improve test reliability, and streamline build workflows for better consistency.
Signed-off-by: Colin Michaels <colin@colinmichaels.com>
|
|
Visit the preview URL for this PR (updated for commit 5cda5df): https://colinmichaels--pr69-chore-todo-optimizat-zl7ukwq1.web.app (expires Sat, 07 Mar 2026 22:57:00 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 825a61d1eb4d817c6dec41f3afc8f4be6955b0e3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




No description provided.