You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Rendering:** Be cautious with `position: fixed` and `z-index` in Qt containers; prefer `flex` layouts for stable rendering.
9
+
10
+
## 2. Angular 14 Professional Standards
11
+
-**Strictly Typed Forms:** Use `FormControl<string>`, `FormGroup<MyInterface>`.
12
+
-**Forbidden:** Never use `UntypedFormControl` or `UntypedFormGroup`.
13
+
-**DI Pattern:** Use constructor for clean, modern dependency injection.
14
+
-**Architecture:** Follow the LIFT principle (Locate, Identify, Flat, T-Dry).
15
+
-**Change Detection:** Always use `ChangeDetectionStrategy.OnPush` to minimize CPU usage in the Qt environment.
16
+
17
+
## 3. RxJS & State Management
18
+
-**Memory:** Strict `takeUntil(this.destroy$)` pattern in `ngOnDestroy`.
19
+
-**Streams:** Use `shareReplay(1)` for multicasting data from API to multiple UI elements.
20
+
-**State:** Use `BehaviorSubject` in services for lightweight state management.
21
+
22
+
## 4. UI & Styling (Qt-Specific)
23
+
-**Layout:** Since `@media` is broken, use a "Container-first" approach.
24
+
-**CSS Units:** Avoid `vh` and `vw` if the Qt window is resizable (can cause jitter); prefer `%` or `flex-grow`.
25
+
-**Methodology:** BEM (Block Element Modifier).
26
+
-**Scrollbars:** Use simple CSS scrollbar styling, as Qt WebEngine often has issues with default OS scrollbars.
27
+
28
+
## 5. Coding Behavior for Gemini
29
+
-**Role:** Act as a Senior Angular Architect specialized in Embedded Systems (Qt).
30
+
-**Constraint Check:** Before providing any CSS, ensure it does not contain `@media` blocks.
31
+
-**Code Style:** Clean, modular, and performance-oriented.
32
+
33
+
## 6. Security & Navigation (Qt Specific)
34
+
-**File System Access:** Prevent accidental directory listings. All internal links must point to specific `.html` files or assets.
35
+
-**Protocol Handling:** Use URL interceptors to block `file://` protocol access to sensitive folders like `AppData`.
36
+
-**Navigation Policy:** Implement a navigation guard to ensure that any request not matching the application's internal routes is cancelled or opened in the default system browser, not inside the Qt WebView.
0 commit comments