feat(fx-core): v4 create-flow localization and v3 parity#16309
Conversation
All new behavior is behind the V4Enabled flag (default off); tests/v4 = 748 passing. - Localize the Q1 create selector via keyPrefix, sharing the Q2/Q3 mechanism (new localizePrompt.ts). - Reuse existing v3 nls strings and roll back fabricated literals across create templates. - Mask secret text inputs (password) in the v4 engine and template questions. - Reuse the shared LLM question block across templates via reusable question fragments (new questionFragments.ts + _shared/llm-service.json). - Restore the Azure OpenAI question cascade: endpoint shown once the key is set, deployment once the endpoint is set. - Rename question.schema.json to questions.schema.json to match the data-file naming convention. - Update ADR-0016 and scaffolding specs accordingly.
Pre-existing @typescript-eslint/no-unnecessary-type-assertion errors; the casts became redundant under TS 5.5 inferred type predicates (filter narrowing). Verified with tsc --noEmit; emitted JS is unchanged.
❌ VscUse Test Plan — Tests failureWhy these tests: The PR modifies the v4 create-flow wizard (selector.json, all questions.json files) with localization and parity changes gated by V4Enabled, so Feature plans covering the create wizard UI are prioritized, supplemented by representative template runs for the two most heavily changed template families (custom-copilot and DA). Branch diff: Results: ✅ 2 passed · ❌ 3 failed (of 5 plans) Plans run:
ℹ️ How were these tests selected?GitHub Copilot (Claude Sonnet 4.6, high reasoning) analysed the PR title, description, and the diff between |
E2E Test Selection — AI SelectedWhy these tests: Rule 1 (fx-core changes to coordinator, v4 scaffolding, question flow, secret masker, envUtil) maps to teamsApp/, teamsAgent/, declarativeAgent/, and feature/multienv; template changes across da/, custom-copilot, bot, tab, message-extension, and teams-collaborator-agent directories reinforce all teamsApp, teamsAgent, and declarativeAgent selections; docs-only files are excluded per Rule 9. Cases selected (21):
Need to run more tests?Comment on this PR:
Then re-run the workflow. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #16309 +/- ##
=======================================
Coverage 87.26% 87.27%
=======================================
Files 631 633 +2
Lines 33084 33119 +35
Branches 7715 7723 +8
=======================================
+ Hits 28870 28903 +33
- Misses 2401 2402 +1
- Partials 1813 1814 +1
🚀 New features to boost your workflow:
|
Summary
Localizes the v4 create flow and closes several v3 parity gaps in the v4 scaffolding engine. All new behavior is gated behind the
V4Enabledfeature flag (defaultfalse), so there is no shipped behavior change.What's included
v4 create-flow localization & parity (commit 1)
keyPrefix, sharing the same mechanism as Q2/Q3 (extracted intolocalizePrompt.ts). Previously Q1 was English-only regardless of NLS.core.*/template.*strings (mcp, graph-connector, apiSpec, etc.); no new strings invented.passwordsupport to the v4 engine (collectInputs→uiPromptUItext config + schema) and setpassword: trueon secret inputs (OpenAI / Azure OpenAI keys, MCP OAuth client secret), matching v3.templates/v4/_shared/questions/llm-service.jsonand pulled into 6 templates via a{ "use": "llm-service" }reference, resolved at load time (questionFragments.ts).question.schema.json→questions.schema.jsonto match the data file it validates (siblingsdescriptor/pipeline/selectoralready follow this convention).Unrelated lint cleanup (commit 2, isolated for review)
@typescript-eslint/no-unnecessary-type-assertionerrors in 6 non-v4 files. The casts became redundant under TypeScript 5.5 inferred type predicates (.filter(x => x != null) as T[]). Verified withtsc --noEmit; emitted JS is unchanged.Testing
tests/v4: 748 passing (incl. a new Azure-cascade test).npm run test:unit: 4909 passing, 0 failed; coverage lines 92.28%.npm run lint: 0 errors (full tree); all changed files prettier-clean.tsc -p ./ --noEmit: clean.Notes
V4Enableddefault off) → zero shipped impact.