Summary
Nine medium-priority improvement findings discovered during automated deep check on 2026-04-10. These are new findings not covered by existing issues.
1. Missing Zone.js Event Patching Optimizations
File: src/zone-flags.ts
Only __Zone_disable_customElements is set. High-frequency events (scroll, mousemove, touchmove, pointermove, resize) are still patched by Zone.js, each triggering change detection.
Fix: Add to zone-flags.ts:
(window as any).__zone_symbol__UNPATCHED_EVENTS = [
'scroll', 'mousemove', 'touchmove', 'pointermove',
'mouseenter', 'mouseleave', 'resize'
];
2. Typo: NETOWRK_PLUGIN Injection Token
Files: src/app/shared/capacitor-plugins/capacitor-plugins.module.ts, capacitor-plugins-testing.module.ts, src/app/shared/network/network.service.ts (6 references total)
Token named NETOWRK_PLUGIN instead of NETWORK_PLUGIN (transposed O/W). Hinders code searchability.
Fix: Rename to NETWORK_PLUGIN across all references.
3. PreloadAllModules Eagerly Loads All Routes
File: src/app/app-routing.module.ts line 86
Uses PreloadAllModules which downloads all ~15 lazy routes after initial load. On mobile cellular connections, this wastes bandwidth and CPU on routes the user may never visit.
Fix: Replace with custom PreloadingStrategy that only preloads routes marked with data: { preload: true }.
4. Inconsistent Platform Detection
Files:
src/app/shared/media/component/media.component.ts line 60 — uses Capacitor.getPlatform() == 'android' (also loose equality)
src/app/shared/dia-backend/notification/dia-backend-notification.service.ts line 53
Project convention (per CLAUDE.md) is to use Platform.is() from @ionic/angular.
Fix: Replace with Platform.is('android') / Platform.is('ios'). Fix == to ===.
5. CUSTOM_ELEMENTS_SCHEMA on SharedModule
Files: src/app/shared/shared.module.ts, details.module.ts, go-pro.module.ts, tutorial.module.ts
SharedModule declares CUSTOM_ELEMENTS_SCHEMA, silencing Angular template compiler for ALL unknown elements app-wide. Typos in component selectors compile without error.
Fix: Move schema to leaf-level modules that actually use Ionic web components.
6. Duplicate hasNewInbox$ Observable
Files: src/app/features/home/home.page.ts lines 71-80, src/app/features/home/capture-tab/capture-tab.component.ts lines 56-65
Identical observable with same workaround comment copy-pasted in two components. Causes duplicate API calls.
Fix: Lift to shared service with shareReplay(1).
7. No Accessibility (a11y) Attributes on Camera UI
File: src/app/features/home/custom-camera/custom-camera.page.html lines 11-143
Interactive elements (flash toggle, quality toggle, capture button, camera flip) use <div> + (click) without role="button", aria-label, or tabindex.
Fix: Add ARIA attributes, keyboard handlers, and screen reader labels.
8. Constructor-Based Subscription Initialization
Files: src/app/features/home/home.page.ts lines 111-116, src/app/features/home/capture-tab/capture-tab.component.ts lines 153-159
Constructors initiate active subscriptions (including network requests) instead of using Angular/Ionic lifecycle hooks. Causes change detection issues and makes testing difficult.
Fix: Move to ngOnInit() or ionViewDidEnter.
9. Unguarded Subscriptions in SettingsPage
File: src/app/features/settings/settings.page.ts lines 147-159, 170
.subscribe() calls without untilDestroyed(this) despite the class using @UntilDestroy({ checkProperties: true }). The subscriptions are not assigned to properties, so they escape the automatic check.
Fix: Add untilDestroyed(this) before .subscribe() for consistency.
Generated by Heart Beat with Omni
Summary
Nine medium-priority improvement findings discovered during automated deep check on 2026-04-10. These are new findings not covered by existing issues.
1. Missing Zone.js Event Patching Optimizations
File:
src/zone-flags.tsOnly
__Zone_disable_customElementsis set. High-frequency events (scroll, mousemove, touchmove, pointermove, resize) are still patched by Zone.js, each triggering change detection.Fix: Add to
zone-flags.ts:2. Typo:
NETOWRK_PLUGINInjection TokenFiles:
src/app/shared/capacitor-plugins/capacitor-plugins.module.ts,capacitor-plugins-testing.module.ts,src/app/shared/network/network.service.ts(6 references total)Token named
NETOWRK_PLUGINinstead ofNETWORK_PLUGIN(transposed O/W). Hinders code searchability.Fix: Rename to
NETWORK_PLUGINacross all references.3.
PreloadAllModulesEagerly Loads All RoutesFile:
src/app/app-routing.module.tsline 86Uses
PreloadAllModuleswhich downloads all ~15 lazy routes after initial load. On mobile cellular connections, this wastes bandwidth and CPU on routes the user may never visit.Fix: Replace with custom
PreloadingStrategythat only preloads routes marked withdata: { preload: true }.4. Inconsistent Platform Detection
Files:
src/app/shared/media/component/media.component.tsline 60 — usesCapacitor.getPlatform() == 'android'(also loose equality)src/app/shared/dia-backend/notification/dia-backend-notification.service.tsline 53Project convention (per CLAUDE.md) is to use
Platform.is()from@ionic/angular.Fix: Replace with
Platform.is('android')/Platform.is('ios'). Fix==to===.5.
CUSTOM_ELEMENTS_SCHEMAon SharedModuleFiles:
src/app/shared/shared.module.ts,details.module.ts,go-pro.module.ts,tutorial.module.tsSharedModule declares
CUSTOM_ELEMENTS_SCHEMA, silencing Angular template compiler for ALL unknown elements app-wide. Typos in component selectors compile without error.Fix: Move schema to leaf-level modules that actually use Ionic web components.
6. Duplicate
hasNewInbox$ObservableFiles:
src/app/features/home/home.page.tslines 71-80,src/app/features/home/capture-tab/capture-tab.component.tslines 56-65Identical observable with same workaround comment copy-pasted in two components. Causes duplicate API calls.
Fix: Lift to shared service with
shareReplay(1).7. No Accessibility (a11y) Attributes on Camera UI
File:
src/app/features/home/custom-camera/custom-camera.page.htmllines 11-143Interactive elements (flash toggle, quality toggle, capture button, camera flip) use
<div>+(click)withoutrole="button",aria-label, ortabindex.Fix: Add ARIA attributes, keyboard handlers, and screen reader labels.
8. Constructor-Based Subscription Initialization
Files:
src/app/features/home/home.page.tslines 111-116,src/app/features/home/capture-tab/capture-tab.component.tslines 153-159Constructors initiate active subscriptions (including network requests) instead of using Angular/Ionic lifecycle hooks. Causes change detection issues and makes testing difficult.
Fix: Move to
ngOnInit()orionViewDidEnter.9. Unguarded Subscriptions in SettingsPage
File:
src/app/features/settings/settings.page.tslines 147-159, 170.subscribe()calls withoutuntilDestroyed(this)despite the class using@UntilDestroy({ checkProperties: true }). The subscriptions are not assigned to properties, so they escape the automatic check.Fix: Add
untilDestroyed(this)before.subscribe()for consistency.Generated by Heart Beat with Omni