Skip to content

Commit 27b281a

Browse files
Merge pull request #22 from workcontrolgit/feature/ai-submenu-phase2-blog-updates
Phase 2: Rewrite Series 6 AI blogs to match submenu refactor
2 parents 11b16fa + e68eff5 commit 27b281a

7 files changed

Lines changed: 1087 additions & 689 deletions

blogs/AI-ENHANCEMENT-SERIES-PLAN.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ All Series 6 code merges into `develop` via feature branches. `AiEnabled` defaul
5656
* Code: `IChatClient` DI setup, `POST /api/v1/ai/chat` endpoint, feature flag setup
5757
* **6.2**`6.2-dotnet-ai-hr-assistant.md` — Build an HR AI Assistant That Knows Your Data
5858
* Code: `GetHrInsightQuery` (MediatR), inject DashboardMetrics context into prompt
59-
* **6.3**`6.3-angular-ai-chat-widget.md`Add an AI Chat Widget to Angular with Streaming
60-
* Code: `AiChatComponent`, SSE streaming with RxJS
61-
* **6.4**`6.4-angular-ai-dashboard-insights.md`AI-Generated Dashboard Insights in Angular Material
62-
* Code: AI Insights `mat-card` on dashboard, prompt engineering patterns
63-
* **6.5**`6.5-dotnet-natural-language-search.md`Natural Language Employee Search with LLM Query Parsing
64-
* Code: `NlSearchQuery` handler (.NET) + NL search bar (Angular)
59+
* **6.3**`6.3-angular-ai-chat-widget.md`Build a Dedicated AI Section in Angular with Submenu Navigation
60+
* Code: AI submenu (menu.json, en-US.json), 4 standalone components under `routes/ai/`, nested child routes, backward-compat redirect
61+
* **6.4**`6.4-angular-ai-nl-search.md`Natural Language Employee Search in Angular Material
62+
* Code: `AiNlSearchComponent` — debounce → LLM parse → employee API, parsed expression display
63+
* **6.5**`6.5-angular-ai-vector-search.md`Semantic Position Search with Vector Embeddings
64+
* Code: `AiVectorSearchComponent` — debounce → vector search API, score badge, results table
6565
* **6.6**`6.6-dotnet-ai-response-caching.md` — Cache Your AI Responses: Save Time and API Costs
6666
* Code: EasyCaching cache-aside in `OllamaAiService`, `X-AI-Cache` response header
6767

blogs/AI-SUBMENU-REFACTOR-PLAN.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ AI (sub menu, icon: psychology)
3535

3636
## Phase 0: Remove Embedded AI from Existing CRUD Components
3737

38-
> **Goal:** Restore `employee-list` and `position-list` to their original Series 0–5 state so those blog articles remain accurate. AI features for these entities move to dedicated `/ai/*` pages instead.
38+
> **Goal:** Restore `employee-list`, `position-list`, and `dashboard` to their original Series 0–5 state so those blog articles remain accurate. AI features move to dedicated `/ai/*` pages instead.
3939
4040
### Gitflow — Start
4141

@@ -86,16 +86,32 @@ git checkout -b feature/ai-submenu-phase0-crud-cleanup
8686
- [ ] Remove the entire `<mat-card class="nl-search-card" *ngIf="aiEnabled">` block (semantic search bar above position table)
8787
- [ ] Verify the table and surrounding markup is unchanged from the Series 3 state
8888

89-
### 0.5 — Confirm Dashboard AI Card is Intentionally Kept
90-
The `dashboard.ts` / `dashboard.html` AI Insights card is from **article 6.4** (an AI article, not a CRUD article) — it stays in place.
89+
### 0.5 — dashboard.ts
90+
**File:** `Clients/.../src/app/routes/dashboard/dashboard.ts`
9191

92-
- [ ] Confirm `dashboard.ts` and `dashboard.html` are NOT touched in this cleanup phase
92+
- [ ] Change `import { DashboardService, AiService } from '../../services/api'``import { DashboardService } from '../../services/api'`
93+
- [ ] Remove `import { environment } from '../../../environments/environment'`
94+
- [ ] Remove `OnDestroy` from the `@angular/core` import and from the `implements` clause
95+
- [ ] Remove `import { Subject } from 'rxjs'` and `import { takeUntil } from 'rxjs/operators'`
96+
- [ ] Remove `private aiService = inject(AiService)` field
97+
- [ ] Remove `private destroy$ = new Subject<void>()` field
98+
- [ ] Remove AI state fields: `aiEnabled`, `aiInsight`, `aiInsightLoading`, `aiInsightError`
99+
- [ ] Remove the `if (this.aiEnabled) { this.loadAiInsight(metrics); }` call inside `loadDashboardMetrics`
100+
- [ ] Remove the entire `private loadAiInsight(metrics: DashboardMetrics): void` method
101+
- [ ] Remove the `ngOnDestroy()` method
102+
103+
### 0.6 — dashboard.html
104+
**File:** `Clients/.../src/app/routes/dashboard/dashboard.html`
105+
106+
- [ ] Remove the entire `<mat-card *ngIf="aiEnabled" class="ai-insights-card">` block (lines 3–30, the AI Workforce Insights card)
107+
- [ ] Verify the dashboard metrics cards and charts below are unchanged
93108

94109
### Phase 0 Verification
95110

96111
- [ ] Employee List page has no AI/NL search bar — matches Series 3 article exactly
97112
- [ ] Position List page has no semantic search bar — matches Series 3 article exactly
98-
- [ ] No `AiService` import in `employee-list.component.ts` or `position-list.component.ts`
113+
- [ ] Dashboard page has no AI Workforce Insights card — matches Series 5 article exactly
114+
- [ ] No `AiService` import in `employee-list.component.ts`, `position-list.component.ts`, or `dashboard.ts`
99115
- [ ] `ng build` compiles with no errors
100116
- [ ] All existing Series 0–5 CRUD features still work (manual smoke test)
101117

@@ -107,8 +123,10 @@ cd Clients/TalentManagement-Angular-Material
107123
git add src/app/routes/employees/employee-list.component.ts \
108124
src/app/routes/employees/employee-list.component.html \
109125
src/app/routes/positions/position-list.component.ts \
110-
src/app/routes/positions/position-list.component.html
111-
git commit -m "Remove embedded AI features from employee-list and position-list"
126+
src/app/routes/positions/position-list.component.html \
127+
src/app/routes/dashboard/dashboard.ts \
128+
src/app/routes/dashboard/dashboard.html
129+
git commit -m "Remove embedded AI features from employee-list, position-list, and dashboard"
112130
git push --set-upstream origin feature/ai-submenu-phase0-crud-cleanup
113131

114132
# Update submodule pointer + commit in parent repo
@@ -118,8 +136,8 @@ git commit -m "Phase 0: remove AI from CRUD components — update Clients submod
118136
git push --set-upstream origin feature/ai-submenu-phase0-crud-cleanup
119137

120138
# Open PRs
121-
gh pr create --base develop --title "Phase 0: Remove embedded AI from CRUD components" \
122-
--body "Restores employee-list and position-list to Series 0-5 state. AI features will live under the /ai submenu." \
139+
gh pr create --base develop --title "Phase 0: Remove embedded AI from CRUD components and dashboard" \
140+
--body "Restores employee-list, position-list, and dashboard to Series 0-5 state. AI features will live under the /ai submenu." \
123141
--repo workcontrolgit/TalentManagement-Angular-Material
124142

125143
gh pr create --base develop --title "Phase 0: Remove embedded AI from CRUD components" \

blogs/SERIES-NAVIGATION-TOC.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@
8484

8585
* [6.1 — Run a Local LLM in Your .NET 10 API with Ollama](series-6-ai-app-features/6.1-dotnet-ai-foundation.md) — .NET AI Foundation
8686
* [6.2 — Build an HR AI Assistant That Knows Your Data](series-6-ai-app-features/6.2-dotnet-ai-hr-assistant.md) — HR AI Assistant
87-
* [6.3 — Add an AI Chat Widget to Angular with Streaming](series-6-ai-app-features/6.3-angular-ai-chat-widget.md)Angular Chat Widget
88-
* [6.4 — AI-Generated Dashboard Insights in Angular Material](series-6-ai-app-features/6.4-angular-ai-dashboard-insights.md)Dashboard Insights
89-
* [6.5 — Natural Language Employee Search with LLM Query Parsing](series-6-ai-app-features/6.5-dotnet-natural-language-search.md)Natural Language Search
87+
* [6.3 — Build a Dedicated AI Section in Angular with Submenu Navigation](series-6-ai-app-features/6.3-angular-ai-chat-widget.md)AI Submenu Refactor
88+
* [6.4 — Natural Language Employee Search in Angular Material](series-6-ai-app-features/6.4-angular-ai-nl-search.md)NL Search Page
89+
* [6.5 — Semantic Position Search with Vector Embeddings](series-6-ai-app-features/6.5-angular-ai-vector-search.md)Vector Search Page
9090
* [6.6 — Cache Your AI Responses: Save Time and API Costs](series-6-ai-app-features/6.6-dotnet-ai-response-caching.md) — AI Response Caching
9191

9292
---

0 commit comments

Comments
 (0)