Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
af56cca
chore: Dev to Main (#2159)
AjitPadhi-Microsoft Apr 20, 2026
ebe3d4e
feat: improve application insights logging and telemetry handling (#2…
AjitPadhi-Microsoft Apr 21, 2026
9a89ab9
fix: dependabot libs updated (#2174)
AjitPadhi-Microsoft Apr 21, 2026
6631435
fix: AVM and Bicep versions update (#2181)
Akhileswara-Microsoft Apr 24, 2026
8555d49
fix: local deployment setup (#2182)
Priyanka-Microsoft Apr 24, 2026
2854390
fix: Dev Main Conflict fix (#2186)
AjitPadhi-Microsoft Apr 27, 2026
db55403
Merge branch 'main' into dev
Roopan-Microsoft Apr 27, 2026
977ed77
fix: Dev main conflict (#2187)
AjitPadhi-Microsoft Apr 27, 2026
86931b3
resolved conflicts
Roopan-Microsoft Apr 27, 2026
3ad5d86
Merge branches 'dev' and 'dev' of https://github.com/Azure-Samples/ch…
Roopan-Microsoft Apr 27, 2026
6965316
fix: temporarily enable public access for Form Recognizer and Content…
Abdul-Microsoft Apr 30, 2026
e53460a
fix: install latest bicep via CLI (#2190)
AjitPadhi-Microsoft May 4, 2026
d4c58c8
feat: update managed identity configurations and enhance web security…
Akhileswara-Microsoft May 4, 2026
b370dd3
fix: Dev pipeline issue fix (#2204)
AjitPadhi-Microsoft May 5, 2026
50906bc
revert: reverted avm module version update (#2205)
AjitPadhi-Microsoft May 5, 2026
e4b6a1a
fix: prevent federated SP token expiry in post-deployment PostgreSQL …
Vamshi-Microsoft May 6, 2026
bc8d90c
docs: Update App Registration screenshots with latest Azure portal UI…
Thanusree-Microsoft May 6, 2026
97a896c
chore: Dev to Main (#2183)
AjitPadhi-Microsoft May 6, 2026
22bdf46
fix: prevent unnecessary /api/speech calls causing 500 errors (#2201)
Priyanka-Microsoft May 7, 2026
5a3fb46
fix: Speech service API issue fixed (#2202)
AjitPadhi-Microsoft May 7, 2026
4c36e36
chore: code cleanup (#2200)
Ayaz-Microsoft May 7, 2026
fa7aef0
chore: Bicep Parameter validation email format change (#2212)
NirajC-Microsoft May 8, 2026
84fb40a
docs: Add Bicep CLI (v0.33.0+) to local deployment prerequisites (#2208)
Rafi-Microsoft May 8, 2026
6e75f4e
chore: remove unused deployment scripts and update AVM post-deploymen…
Abdul-Microsoft May 11, 2026
fc01b4d
fix: Down merge main to dev (#2216)
AjitPadhi-Microsoft May 11, 2026
66559db
fix: Conflict dev fix (#2218)
AjitPadhi-Microsoft May 11, 2026
cf8a29f
Merge branch 'main' into dev
Roopan-Microsoft May 11, 2026
327ea35
main.json recreated
Roopan-Microsoft May 11, 2026
79f6852
fix: fixed ServiceUnavailable errors in Post Deployment Script when e…
Vamshi-Microsoft May 13, 2026
b3a79f4
test: cwyd test automation added retry attempts (#2223)
Ritesh-Microsoft May 14, 2026
0485e06
chore: Dev to Main (#2214)
AjitPadhi-Microsoft May 18, 2026
6d87cda
fix: add Type tag for resource grouping based on private networking …
Akhileswara-Microsoft May 18, 2026
178507a
fix: update enablePrivateNetworking parameter to use dynamic value (#…
Ayaz-Microsoft May 18, 2026
6bb11b1
fix: teams app is not responding (#2229)
Priyanka-Microsoft May 19, 2026
798b45b
feat: Enhance email template, add RG owner tag, scalability input (#2…
Vamshi-Microsoft May 21, 2026
8501440
build: Upgrade dependabots packages (#2238)
AjitPadhi-Microsoft May 21, 2026
365eb79
feat: enable end-to-end TLS encryption for App Services and add Data …
Ayaz-Microsoft May 21, 2026
873ce0c
fix: update OpenAI functions system prompt to handle greetings (#2241)
Harsh-Microsoft May 26, 2026
ca2f774
Merge branch 'main' into dev
Roopan-Microsoft May 26, 2026
93952de
updated main.json
Roopan-Microsoft May 26, 2026
5c99c24
chore: Dev to Main (#2236)
AjitPadhi-Microsoft May 26, 2026
e0608a7
ci: Added template validation pipeline (#2240)
AjitPadhi-Microsoft May 29, 2026
b2ab3b7
Merge branch 'main' into dev
Roopan-Microsoft Jun 3, 2026
c25c516
Merge branch 'dev' of https://github.com/Azure-Samples/chat-with-your…
Roopan-Microsoft Jun 3, 2026
1e3396d
Merge branch 'dev' into feature/cwyd-v2-6626
Fr4nc3 Jun 6, 2026
f777dff
Admin configuration types, routers & tests
Fr4nc3 Jun 8, 2026
ab31907
Add runtime overrides for agent instructions
Fr4nc3 Jun 8, 2026
eae4153
Add post-answering prompts and RAI validation
Fr4nc3 Jun 8, 2026
9bfc446
Add post-answering validator support
Fr4nc3 Jun 8, 2026
53710b7
Add azd prepackage hook and function build script
Fr4nc3 Jun 8, 2026
8aff348
Surface message errors via Fluent Toaster
Fr4nc3 Jun 8, 2026
601397f
Add SSE retry/backoff; remove speech code
Fr4nc3 Jun 8, 2026
9e18f45
Support AbortSignal in streamChat
Fr4nc3 Jun 8, 2026
561f1a2
ACR pinned-tag deploy docs and Phase 7 close
Fr4nc3 Jun 8, 2026
50772f4
Move frontend tests to v2/src/tests/frontend
Fr4nc3 Jun 9, 2026
3ee5a99
Add admin routes, layout, and header button
Fr4nc3 Jun 9, 2026
8d76825
Add runtime overrides, system prompt and search flags
Fr4nc3 Jun 9, 2026
4388a71
Add ADRs for agent_framework default and config error
Fr4nc3 Jun 9, 2026
89f3e56
Add Foundry IQ knowledge base search settings
Fr4nc3 Jun 9, 2026
a547f80
Add KB seed builder and tests for Foundry IQ
Fr4nc3 Jun 9, 2026
64e1e97
Add knowledge base provisioning and tests
Fr4nc3 Jun 9, 2026
dc5013a
Expose knowledgeBaseName in search connection
Fr4nc3 Jun 9, 2026
601549e
Add Foundry IQ knowledge base wiring
Fr4nc3 Jun 9, 2026
b5f204b
Add KB MCP tool builder to agent framework
Fr4nc3 Jun 9, 2026
e065d3d
Add KB token handling and ChatOptions
Fr4nc3 Jun 9, 2026
10d784d
Remove search tool from CWYD agent
Fr4nc3 Jun 9, 2026
3677d57
Extract app-level exception handlers
Fr4nc3 Jun 10, 2026
8defa6b
Introduce OrchestratorName enum and pgvector guard
Fr4nc3 Jun 10, 2026
30b5128
Set default orchestrator to agent_framework
Fr4nc3 Jun 10, 2026
be54b36
Mark ADRs 0021 and 0022 as Accepted
Fr4nc3 Jun 10, 2026
e6810e5
Update development_plan.md
Fr4nc3 Jun 10, 2026
97e0d95
Add get_tenant_id dependency and tests
Fr4nc3 Jun 10, 2026
41c304c
Withdraw per-tenant RuntimeConfig (#35g)
Fr4nc3 Jun 10, 2026
1b5e8ad
Mark Phase 7 complete and update statuses
Fr4nc3 Jun 10, 2026
e5f4476
Embeddings to account endpoint; hash chunk IDs
Fr4nc3 Jun 10, 2026
827b4b9
Remove header primary admin nav; use gated entry
Fr4nc3 Jun 10, 2026
bd22fae
Remove per-message feedback UI and API
Fr4nc3 Jun 10, 2026
107a0d8
Add durable worklog and bug registry
Fr4nc3 Jun 11, 2026
0758d4c
Add admin/search bugs and 2026-06-11 worklog
Fr4nc3 Jun 11, 2026
d49dbb4
Add v2 VSCode run/debug and orchestrator select
Fr4nc3 Jun 11, 2026
e4fcf6b
Use effective admin config endpoint and unwrap values
Fr4nc3 Jun 11, 2026
6b12b68
Remove internal config-key suffix from labels
Fr4nc3 Jun 11, 2026
a4dce35
Enable Content Safety by default
Fr4nc3 Jun 11, 2026
10a438e
Port v1 default prompt into CWYD_AGENT
Fr4nc3 Jun 11, 2026
b6a5ba1
Fold PromptEditor into Configuration
Fr4nc3 Jun 11, 2026
e4147be
Make admin Log level a select dropdown
Fr4nc3 Jun 11, 2026
0055eb5
Close BUG-0010; add numeric-field regression test
Fr4nc3 Jun 11, 2026
3a98b14
Append non-overridable CWYD guardrail
Fr4nc3 Jun 12, 2026
c082b85
Fix KB MCP auth; add admin reset; UI/layout fixes
Fr4nc3 Jun 12, 2026
f83d1b7
Docs: add BUG-0021, refine BUG-0012; update test
Fr4nc3 Jun 12, 2026
9c357ad
Use AIProjectClient / PromptAgent for agents
Fr4nc3 Jun 12, 2026
8f83ad6
Use build_agent seam and server-side KB tool
Fr4nc3 Jun 12, 2026
56abb1f
Forward agents/db to orchestrator, remove bootstrap
Fr4nc3 Jun 12, 2026
6bb339f
Add citations_from_annotations adapter and tests
Fr4nc3 Jun 12, 2026
3b2bbd0
Emit citation SSE from agent_framework
Fr4nc3 Jun 12, 2026
fa791ab
Migrate rai_check to build_agent + update tests
Fr4nc3 Jun 12, 2026
a1448ee
docs(worklog): mark U10 dead-helper sweep verified
Fr4nc3 Jun 12, 2026
0925bf4
Add ADR 0025: Foundry Prompt Agent GA pattern
Fr4nc3 Jun 12, 2026
2e7de12
Add strict converter for agent definition tools
Fr4nc3 Jun 12, 2026
e65bf82
Narrate KB search before tool events
Fr4nc3 Jun 12, 2026
a598c76
Use chat model for KB seed; add RBAC & docs
Fr4nc3 Jun 13, 2026
59dc030
Emit retrieval narration; soften CWYD prompt
Fr4nc3 Jun 14, 2026
3e480f1
Unify CWYD instruction composition seam
Fr4nc3 Jun 14, 2026
d4cd412
Add opt-in integration test lane (live Azure)
Fr4nc3 Jun 14, 2026
a11094d
Fix reasoning, Azure Search, and related bugs
Fr4nc3 Jun 14, 2026
3107c4f
Separate reasoning placeholder from real reasoning
Fr4nc3 Jun 14, 2026
dc86227
Merge branch 'dev-v2' into feature/cwyd-v2-6626
Fr4nc3 Jun 15, 2026
851ca24
Render assistant answers as HTML
Fr4nc3 Jun 15, 2026
c320fc0
Fix doubled line spacing for assistant answers
Fr4nc3 Jun 15, 2026
48c74f6
Normalize KB citation markers and clean "None" fields
Fr4nc3 Jun 15, 2026
f780418
Normalize KB citations in agent_framework.run
Fr4nc3 Jun 15, 2026
f36adc7
Shared citation-format contract and parity fixes
Fr4nc3 Jun 15, 2026
33d2cd5
Add file download API and citation detail UI
Fr4nc3 Jun 15, 2026
a7edbd7
Persist conversations and conversation-id flow
Fr4nc3 Jun 15, 2026
9794a75
Fix chat layout and citation panel behavior
Fr4nc3 Jun 15, 2026
64dd20f
Hide vertical overflow on body
Fr4nc3 Jun 15, 2026
922b303
Add auth_enforced flag, principal-id validation, and docs
Fr4nc3 Jun 16, 2026
652b95e
Add auth module and forward user-id header
Fr4nc3 Jun 16, 2026
e219ef3
Add AuthBlocked UI and App auth bootstrap
Fr4nc3 Jun 16, 2026
22e6db3
Forward user id header in HistoryPanel fetch
Fr4nc3 Jun 16, 2026
7b99ed6
Merge branch 'dev-v2' into feature/cwyd-v2-6626
Fr4nc3 Jun 16, 2026
7694037
Add DI endpoint validation; docs and admin fixes
Fr4nc3 Jun 16, 2026
8a1e5cc
AzureSearch: page chunks and match title client-side
Fr4nc3 Jun 16, 2026
5414198
Add paragraph fallback for Document Intelligence
Fr4nc3 Jun 16, 2026
b913ca1
Auto-refresh on successful deletes & new chats
Fr4nc3 Jun 16, 2026
6ec576c
Add admin-router and foundry-iq debt rows
Fr4nc3 Jun 16, 2026
7000552
Prepends backend base to admin API calls
Fr4nc3 Jun 16, 2026
b824408
Add storage envs to backend Container App
Fr4nc3 Jun 17, 2026
9d213f8
Merge branch 'dev-v2' into feature/cwyd-v2-6626
Fr4nc3 Jun 17, 2026
b5a7410
Merge branch 'dev-v2' into feature/cwyd-v2-6626
Fr4nc3 Jun 17, 2026
1707ff7
Update bugs doc & worklog with 2026-06-16 fixes
Fr4nc3 Jun 17, 2026
11a8933
Allow agent_framework app-side RAG on pgvector
Fr4nc3 Jun 20, 2026
df81837
Add BUG-0069-BUG-0076 to docs and worklog
Fr4nc3 Jun 20, 2026
a919e97
Thread sampling; send max_completion_tokens
Fr4nc3 Jun 20, 2026
d49c0ff
Admin: expose editable CWYD persona body
Fr4nc3 Jun 20, 2026
17276c9
Add blob_event blueprint, parser, handler, ADR
Fr4nc3 Jun 20, 2026
cff95ea
Add Event Grid ingestion trigger and queue wiring
Fr4nc3 Jun 20, 2026
19a1dcb
Add AZURE_INGESTION_TRIGGER and Event Grid infra
Fr4nc3 Jun 20, 2026
1eeb951
Add blob_event to prepackage and guard test
Fr4nc3 Jun 20, 2026
213d592
Relocate frontend tests to v2/tests/frontend
Fr4nc3 Jun 20, 2026
6250974
Fix speech token host and frontend API base URL
Fr4nc3 Jun 20, 2026
d783fca
Return aad# token for Azure Speech auth
Fr4nc3 Jun 21, 2026
9b35ef6
docs: record BUG-0070 end-to-end verification
Fr4nc3 Jun 21, 2026
61c7be3
Header: add MultiAgent logo and click-to-home
Fr4nc3 Jun 22, 2026
1dcf304
Delete document also removes source blob
Fr4nc3 Jun 22, 2026
14fcd2b
Add header user avatar with initials
Fr4nc3 Jun 22, 2026
6923e8b
Add URL download-to-blob ingestion pipeline
Fr4nc3 Jun 22, 2026
a214182
blob_event: classify and dispatch create/delete
Fr4nc3 Jun 22, 2026
92ac2aa
ParserKey enum; move upload validation to service
Fr4nc3 Jun 22, 2026
02159a8
Fix frontend build/lint; wire AZURE_ENVIRONMENT
Fr4nc3 Jun 22, 2026
830ae4f
docs: mark BUG-0069 and BUG-0075 fixed
Fr4nc3 Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/copilot-instructions.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/instructions/v2-backend-core.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Citation formatting is **shared infrastructure**, not per-orchestrator code. The

- **R1 — one prompt input point.** Ground through `resolve_cwyd_instructions(...)` over the shared `CWYD_DEFAULT_BODY`; the fixed `CWYD_GUARDRAIL` owns the citation directive + no-context fallback. Do not author a per-orchestrator system / grounding prompt.
- **R2 — one response-format point.** All citation shaping lives in `v2/src/backend/core/tools/citations.py`: `format_sources_block` (client-side `[docN]` injection, used by `langgraph`) and `normalize_kb_citations` (native `【N:M†source】` → `[docN]` rewrite, used by `agent_framework`). Both emit the same inline `[docN]` marker + `Citation` model on the `citation` channel. `run()` returns `(answer, citations)` and delegates to `citations.py` — never format markers inline, never invent a citation shape.
- **R3 — backend-agnostic formatting.** Retrieval is keyed by `index_store` (registry dispatch) but the citation format is identical for Azure AI Search and pgvector. The `agent_framework` + pgvector cell (no KB) is rejected at config (`ConfigResolutionError` → 409, ADR 0022), never given a divergent formatter.
- **R3 — backend-agnostic formatting.** Retrieval is keyed by `index_store` (registry dispatch) but the citation format is identical for Azure AI Search and pgvector. The `agent_framework` + pgvector cell grounds app-side over `BaseSearch.search` (no KB), reusing the shared formatter (ADR 0027 supersedes the ADR 0022 rejection rule), never given a divergent formatter.

## LLM provider (Foundry IQ)

Expand Down
12 changes: 6 additions & 6 deletions .github/instructions/v2-frontend.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ applyTo: "v2/src/frontend/**"
- **Fluent UI v9** (`@fluentui/react-components` + `@fluentui/react-icons`) is the bundled component library. The MACAE re-skin (dev_plan task #34) committed the decision; new components consume Fluent primitives unless a CSS-Modules-only carve-out is explicitly justified.
- **State management: React Context + `useReducer`.** Lightweight, zero new dep, idiomatic for the reasoning-channel fan-out. Reducers live next to their Context (chat) or page (admin) — do **not** extract reducers into `services/`. Revisit (e.g. Zustand, Redux Toolkit) only if cross-page state grows beyond what context comfortably handles.
- **Routing: `react-router-dom` v7.** `App` mounts `<BrowserRouter>`; the active page is derived from the URL by the `<Routes>` block and navigation goes through `useNavigate()` + the `SectionPath` map (`src/models/sections.tsx`). Deep links to `/admin/*` are first-class.
- Testing: Vitest + Testing Library. Tests live under `v2/src/tests/frontend/` mirroring `src/` (relocated from `v2/src/frontend/tests/` per ADR 0020).
- Testing: Vitest + Testing Library. Tests live under `v2/tests/frontend/` mirroring `src/` (relocated to `v2/tests/frontend/` per ADR 0029, which supersedes ADR 0020).

## API layer (`src/api/`)

Expand All @@ -26,7 +26,7 @@ applyTo: "v2/src/frontend/**"
- Folder layout: `src/services/<domain>/<service>.ts` (e.g. `services/chat/feedbackService.ts`, `services/admin/ingestService.ts`). Cross-domain primitives live under `src/services/core/` (e.g. the generic `Registry<T>`); app-shell concerns live under `src/services/app/` (e.g. `pageRegistry`, `healthService`).
- Services are **pure TypeScript modules** — no React imports, no hooks. A service signature typically takes the data it needs plus the reducer's `dispatch` and returns `Promise<void>` or a typed result. This keeps services trivially testable and reusable across pages.
- **Reducers stay co-located** with their Context (chat) or page (admin). Moving reducers into services inverts React's state-machine-next-to-its-consumer pattern.
- Tests live under `v2/src/tests/frontend/services/**` mirroring the source tree.
- Tests live under `v2/tests/frontend/services/**` mirroring the source tree.

## Factory registries

Expand Down Expand Up @@ -93,12 +93,12 @@ applyTo: "v2/src/frontend/**"
## Conventions

- TypeScript strictness: `strict: true`, `noUncheckedIndexedAccess: true`, `exactOptionalPropertyTypes: true`. The three flags are non-negotiable — `tsconfig.json` is the single source of truth. Rationale + ADR: [v2/docs/adr/0013-frontend-strict-ts-and-tsx-everywhere.md](../../v2/docs/adr/0013-frontend-strict-ts-and-tsx-everywhere.md).
- ESLint runs `@typescript-eslint/strict-type-checked` + `@typescript-eslint/stylistic-type-checked` on `src/**` and the relocated test tree `v2/src/tests/frontend/**`. `npm run lint` is CI-gated by [`.github/workflows/v2-frontend-checks.yml`](../workflows/v2-frontend-checks.yml) (lint → typecheck → vitest, all hard-gated, path-scoped to `v2/src/frontend/**` + `v2/src/tests/frontend/**`); any error fails the PR build. Rationale + ADR: [v2/docs/adr/0014-frontend-ci-workflow.md](../../v2/docs/adr/0014-frontend-ci-workflow.md).
- File extension: all first-party files under `src/` and the test tree `v2/src/tests/frontend/` use `.tsx`, regardless of JSX content. Tooling configs (`vite.config.ts`, `tsconfig.json`, `tsconfig.app.json`) stay at their tool-pinned names. See [Hard Rule #11](../copilot-instructions.md) + ADR 0013 above.
- Cross-folder imports under `src/**` and the test tree `v2/src/tests/frontend/**` use the `@/*` path alias (registered in `vite.config.ts` `resolve.alias` and `tsconfig.json` `compilerOptions.paths`). Sibling `./X` imports stay relative — the alias is for cross-folder reach, not for replacing every relative import. Parent-relative imports (`../X`, `../../X`, …) in first-party source/test files are forbidden by ESLint's built-in `no-restricted-imports` with a `^\.\./` regex pattern on the import source string (tool configs like `vite.config.ts` / `tsconfig.json` may still reference `../tests/frontend`). Rationale + ADR: [v2/docs/adr/0015-frontend-path-alias-cross-folder-imports.md](../../v2/docs/adr/0015-frontend-path-alias-cross-folder-imports.md).
- ESLint runs `@typescript-eslint/strict-type-checked` + `@typescript-eslint/stylistic-type-checked` on `src/**` and the relocated test tree `v2/tests/frontend/**`. `npm run lint` is CI-gated by [`.github/workflows/v2-frontend-checks.yml`](../workflows/v2-frontend-checks.yml) (lint → typecheck → vitest, all hard-gated, path-scoped to `v2/src/frontend/**` + `v2/tests/frontend/**`); any error fails the PR build. Rationale + ADR: [v2/docs/adr/0014-frontend-ci-workflow.md](../../v2/docs/adr/0014-frontend-ci-workflow.md).
- File extension: all first-party files under `src/` and the test tree `v2/tests/frontend/` use `.tsx`, regardless of JSX content. Tooling configs (`vite.config.ts`, `tsconfig.json`, `tsconfig.app.json`) stay at their tool-pinned names. See [Hard Rule #11](../copilot-instructions.md) + ADR 0013 above.
- Cross-folder imports under `src/**` and the test tree `v2/tests/frontend/**` use the `@/*` path alias (registered in `vite.config.ts` `resolve.alias` and `tsconfig.json` `compilerOptions.paths`). Sibling `./X` imports stay relative — the alias is for cross-folder reach, not for replacing every relative import. Parent-relative imports (`../X`, `../../X`, …) in first-party source/test files are forbidden by ESLint's built-in `no-restricted-imports` with a `^\.\./` regex pattern on the import source string (tool configs like `vite.config.ts` / `tsconfig.json` may still reference `../../src/frontend/src`). Rationale + ADR: [v2/docs/adr/0015-frontend-path-alias-cross-folder-imports.md](../../v2/docs/adr/0015-frontend-path-alias-cross-folder-imports.md).
- No `any`. Use `unknown` + type narrowing.
- Plain CSS Modules (`*.module.css`) for component styling — no global CSS leaks. If a UI library is later adopted, prefer its idiomatic styling primitive (e.g. Fluent UI `makeStyles`) over CSS Modules for new components in that library's scope.
- **Tests live under `v2/src/tests/frontend/`, mirroring the `src/` tree** (e.g. `src/pages/chat/ChatPage.tsx` → `v2/src/tests/frontend/pages/chat/ChatPage.test.tsx`). Every new component ships with a corresponding `<Component>.test.tsx` under the mirror tree covering at least one behavioral assertion. **Do not colocate `*.test.tsx` next to source files.** The Vitest `include` glob in `vite.config.ts` scans `../tests/frontend/**` only, so colocated tests under `src/` are silently skipped. The `@/*` alias still resolves to `src/`, so test imports of production code are unchanged by the relocation. Rationale + ADR: [v2/docs/adr/0020-frontend-tests-under-src-tests-frontend.md](../../v2/docs/adr/0020-frontend-tests-under-src-tests-frontend.md) (supersedes [ADR 0012](../../v2/docs/adr/0012-frontend-test-folder-mirror.md)).
- **Tests live under `v2/tests/frontend/`, mirroring the `src/` tree** (e.g. `src/pages/chat/ChatPage.tsx` → `v2/tests/frontend/pages/chat/ChatPage.test.tsx`). Every new component ships with a corresponding `<Component>.test.tsx` under the mirror tree covering at least one behavioral assertion. **Do not colocate `*.test.tsx` next to source files.** The Vitest `include` glob in `v2/tests/frontend/vitest.config.ts` scans only the test package's own tree, so colocated tests under `src/` are silently skipped. The `@/*` alias still resolves to `src/`, so test imports of production code are unchanged by the relocation. Rationale + ADR: [v2/docs/adr/0029-frontend-tests-symmetric-under-tests-frontend.md](../../v2/docs/adr/0029-frontend-tests-symmetric-under-tests-frontend.md) (relocates to `v2/tests/frontend/`; supersedes [ADR 0020](../../v2/docs/adr/0020-frontend-tests-under-src-tests-frontend.md) + [ADR 0012](../../v2/docs/adr/0012-frontend-test-folder-mirror.md)).
## Branding / customization

- All branding text/logo loaded at runtime from `/api/admin/ui-config` (backed by `active.json`). *(That endpoint lands in Phase 5 — dev_plan task #35. Until then, the placeholder shell may use a single hard-coded title; replace it the moment the endpoint exists.)*
Expand Down
4 changes: 2 additions & 2 deletions .github/instructions/v2-tests.instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: "CWYD v2 testing conventions and test-first contract. Use when: editing v2/tests/**, editing v2/src/**/tests/**, editing v2/src/tests/** (relocated frontend Vitest tree), adding a pytest test, adding a vitest/jest test, configuring fixtures, mocking Foundry IQ or Azure Search, asserting on SSE events, gating coverage, or completing the test step of the implement-then-test loop."
applyTo: "v2/tests/**,v2/src/**/tests/**,v2/src/tests/**"
description: "CWYD v2 testing conventions and test-first contract. Use when: editing v2/tests/**, editing v2/src/**/tests/**, editing v2/tests/frontend/** (relocated frontend Vitest tree), adding a pytest test, adding a vitest/jest test, configuring fixtures, mocking Foundry IQ or Azure Search, asserting on SSE events, gating coverage, or completing the test step of the implement-then-test loop."
applyTo: "v2/tests/**,v2/src/**/tests/**"
---

# v2 Testing Conventions
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/v2-frontend-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ name: v2 frontend checks (lint + typecheck + vitest)
#
# The v2 frontend is an npm workspace rooted at `v2/` with two members:
# - `v2/src/frontend` -- the React 19 + TS + Vite 7 application.
# - `v2/src/tests/frontend` -- the Vitest tree (sibling workspace member).
# - `v2/tests/frontend` -- the Vitest tree (sibling workspace member).
# A single `npm ci` at the workspace root produces one hoisted
# `v2/node_modules` shared by both members, so the test tree resolves the
# frontend's deps natively (one React instance, no resolver shims).
#
# Gates, all run after the root install:
# 1. `npm run lint` -- ESLint flat config, both members.
# 2. `npx tsc -p src/frontend` -- app type-check (noEmit).
# 3. `npx tsc -p src/tests/frontend` -- test-tree type-check (noEmit).
# 3. `npx tsc -p tests/frontend` -- test-tree type-check (noEmit).
# 4. `npm test` -- vitest run (the suite under
# src/tests/frontend).
# tests/frontend).
#
# Mirrors `v2-typecheck.yml` (backend pyright) and `v2-backend-only-smoke.yml`
# (backend smoke). Path-scoped so unrelated edits do not pay CI cost.
Expand All @@ -27,7 +27,7 @@ on:
- "v2/package.json"
- "v2/package-lock.json"
- "v2/src/frontend/**"
- "v2/src/tests/frontend/**"
- "v2/tests/frontend/**"
- ".github/workflows/v2-frontend-checks.yml"
pull_request:
branches:
Expand All @@ -36,7 +36,7 @@ on:
- "v2/package.json"
- "v2/package-lock.json"
- "v2/src/frontend/**"
- "v2/src/tests/frontend/**"
- "v2/tests/frontend/**"
- ".github/workflows/v2-frontend-checks.yml"
workflow_dispatch:

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
run: npx tsc -p src/frontend

- name: Typecheck tests (tsc strict, test tree)
run: npx tsc -p src/tests/frontend
run: npx tsc -p tests/frontend

- name: Vitest (npm test)
run: npm test
15 changes: 8 additions & 7 deletions v2/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ AZURE_TENANT_ID=
AZURE_UAMI_CLIENT_ID=

# --- Orchestrator selection (runtime-tunable; CWYD_ namespace by design) ---
# OrchestratorSettings.name -- "langgraph" or "agent_framework".
# agent_framework grounds on a Foundry IQ Knowledge Base over an Azure AI
# Search index, so it requires AZURE_INDEX_STORE=AzureSearch (cosmosdb mode).
# pgvector deployments (AZURE_DB_TYPE=postgresql) have no such index and MUST
# use langgraph -- selecting agent_framework there is rejected at request time
# with HTTP 409 (ADR 0022). The local dev compose default is pgvector, so it
# pins CWYD_ORCHESTRATOR_NAME=langgraph regardless of this value.
# OrchestratorSettings.name -- "langgraph" or "agent_framework". Both
# orchestrators ground on either index store and are switchable from the admin
# UI without a redeploy. On pgvector (AZURE_DB_TYPE=postgresql) both run
# app-side RAG over the pgvector index; on Azure AI Search (cosmosdb mode)
# agent_framework additionally grounds on a Foundry IQ Knowledge Base over that
# index, while langgraph runs client-side RAG. ADR 0027 supersedes the ADR 0022
# pgvector + agent_framework block, so neither pairing is rejected. The local
# dev compose default database is pgvector.
CWYD_ORCHESTRATOR_NAME=agent_framework
#
# Foundry agent identity is NOT configured here (CU-009, ADR 0008).
Expand Down
3 changes: 3 additions & 0 deletions v2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ __pycache__/
# Virtualenvs (uv default + common alternates)
.venv/
venv/

# Frontend build artifacts (regenerated by `tsc -b` / `vite build`)
*.tsbuildinfo
2 changes: 1 addition & 1 deletion v2/docker/Dockerfile.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# every runtime + build dependency, so the dev server starts standalone with
# zero coupling to the v2/ npm workspace or the sibling test package. The
# workspace (v2/package.json) exists only so the Vitest tree under
# src/tests/frontend can resolve the frontend's deps from one hoisted
# tests/frontend can resolve the frontend's deps from one hoisted
# node_modules; the deployable frontend never needs it.
FROM node:20-alpine AS dev
WORKDIR /app
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# ADR 0020 — Frontend tests live under `v2/src/tests/frontend/` (relocated from `v2/src/frontend/tests/`)

- **Status**: Accepted
> **Superseded by [ADR 0029](0029-frontend-tests-symmetric-under-tests-frontend.md) (2026-06-20).** The mirror-tree + no-colocation decision below still holds, but the test-tree root moved from `v2/src/tests/frontend/` to `v2/tests/frontend/` (symmetric with `v2/tests/backend/`). Read ADR 0029 for the current location and the build/tooling mechanics.

- **Status**: Superseded by [ADR 0029](0029-frontend-tests-symmetric-under-tests-frontend.md)
- **Date**: 2026-06-08
- **Phase**: Post-Phase-7 (PP7 work stream — `U-PP7-RELOC`)
- **Pillar**: Stable Core (frontend layout policy)
- **Deciders**: CWYD v2 maintainers (repo-owner override of [ADR 0012](0012-frontend-test-folder-mirror.md) alternative #3)
- **Supersedes**: [ADR 0012](0012-frontend-test-folder-mirror.md)
- **Superseded by**: [ADR 0029](0029-frontend-tests-symmetric-under-tests-frontend.md) — frontend tests relocated from `v2/src/tests/frontend/` to `v2/tests/frontend/` (symmetric with the backend tree; mirror-tree + no-colocation invariants retained).

## Context

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ADR 0022 — Incompatible effective-config overrides raise a reusable `ConfigResolutionError`

- **Status**: Accepted
- **Status**: Accepted — decisions #2 (the pgvector + `agent_framework` rule) and #5 ("no silent fallback") are superseded by [ADR 0027](0027-agent-framework-app-side-rag-on-pgvector.md), which gives `agent_framework` an app-side pgvector grounding path; the reusable `ConfigResolutionError` mechanism (decisions #1 / #3 / #4) remains in force
- **Date**: 2026-06-09
- **Phase**: 8
- **Pillar**: Stable Core (the `ConfigResolutionError` primitive + app-level handler) over a Configuration Layer rule (the pgvector + `agent_framework` guard)
Expand Down
Loading
Loading