Repository navigation
Reduce V2 group-switch latency and add bootstrap phase timing - #1727
Merged
Paul Lizer (paullizer) merged 3 commits intoOct 8, 2026
Conversation
Confirm group selections through a protected scope-only endpoint instead of rebuilding bootstrap catalogs. Preserve access checks and response ordering, add bootstrap phase timings and regression coverage, and document version 0.261.305. Refs microsoft#1725 for the separate backend optimization. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use response, status, and headers consistently for scope success and failure paths. Add regression coverage for all three return paths, update related documentation, and bump the application patch version to 0.261.306. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merge base 817f9dd and preserve VERSION 0.261.306 when resolving the version conflict. Retain the V2 performance fix and incoming workflow cleanup/recovery changes. Validation: 225 focused Python tests and 112 subtests, 58 JavaScript checks, 26 route-policy checks, and 13 documentation checks passed. All 10 failures from the broader Python run reproduced on untouched base and are pre-existing. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer)
merged commit Oct 8, 2026
27cbfca
into
microsoft:paullizer-react-v2-ui
11 checks passed
Paul Lizer (paullizer)
added a commit
to paullizer/simplechat
that referenced
this pull request
Oct 9, 2026
…o the plan-replay branch Merged with rerere off. The only conflict was docs/explanation/release_notes.md: V2's file is kept byte-identical and this PR's section sits on top of it as a pure insertion. chat-controls.md and the two route-policy tests auto-merged with independent hunks. config.py merged cleanly because both sides are at 0.261.306; this PR's references move to 0.261.307 in the following commit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /api/v2/scopeinstead, retaining preflight and final access checks, draft protection, and read-only recovery after ambiguous writes.no-store; other requests retain their existing cache behavior.0.261.306.Initial-load optimization is intentionally deferred. This change is not deployed, and production switch improvements remain unmeasured. Browser cache-lock attribution is a hypothesis, not an established root cause.
Linked issue
Refs #1725
That P1 issue tracks the broader backend bootstrap optimization and should remain open after this quick fix merges.
Release Notes & Latest Features
Is this visible to end users?
Is this admin-facing (Admin Settings, governance, deployment, config)?
Should this become a Latest Feature card?
Screenshot needed for the card?
Version bump
application/single_app/config.pyVERSIONthird segment bumped, or not needed because this is docs-onlydeployers/version.txtbumped, or not needed becausedeployers/was not changedApplication version:
0.261.304->0.261.306, including the0.261.305quick fix and0.261.306response-contract review follow-up. No deployer changes.Testing / validation
Python backend tests used a session-local environment with repository-pinned Flask 3.1.3 and Werkzeug 3.1.6. Backend and browser tests use isolated storage/HTTP fixtures, not live Azure performance measurements. Backend, route-policy, and documentation checks were rerun for the review fix; the JavaScript, build, and browser results below cover the original quick fix, whose frontend code is unchanged by the follow-up.
python -m pytest functional_tests\test_v2_scope_and_bootstrap_timings.py functional_tests\test_v2_group_workspace_context.py functional_tests\test_v2_bootstrap_branding_and_navigation.py functional_tests\test_v2_admin_settings_live_shell_refresh.py -q --tb=short --disable-warnings- 117 passed, 16 existing return-value warnings. Includes three new response-tuple cases for success, missing identity, and storage failure.node functional_tests\test_v2_bootstrap_refresh_logic.mjs- 14/14 passed;node functional_tests\test_v2_group_workspace_context_logic.mjs- 30 checks passed.npm run buildfromapplication\v2_ui- passed, including TypeScript; existing large-bundle warning remains out of scope. Generated local static assets are not committed.$env:PYTHONPATH="$PWD;$PWD\ui_tests\fixtures;$PWD\ui_tests"; python -m pytest ui_tests\test_v2_group_workspace_shell.py -q --tb=short- 30 passed, including desktop/mobile switching without an extra bootstrap request.python functional_tests\route_tests\test_route_blueprint_policy_inventory.py && python functional_tests\route_tests\test_route_unauthenticated_policy_contract.py && python functional_tests\route_tests\test_route_policy_test_coverage.py- 14/14, 9/9, and 3/3 passed.python functional_tests\test_docs_app_surface_coverage.py && python functional_tests\test_docs_site_quality.py- 7/7 and 6/6 passed; regenerated inventory has no semantic change.python scripts\check_broken_access_control.py application\single_app\route_backend_v2.py- passed.python scripts\check_xss_sinks.py application\single_app\route_backend_v2.py application\v2_ui\src\lib\apiClient.ts application\v2_ui\src\lib\endpoints.ts application\v2_ui\src\lib\types.ts application\v2_ui\src\stores\bootstrapStore.ts application\v2_ui\src\stores\groupWorkspaceStore.ts- passed for the original quick fix;python scripts\check_xss_sinks.py application\single_app\route_backend_v2.pyalso passed for the review follow-up.Documentation
Added
docs/explanation/fixes/V2_GROUP_SWITCH_LATENCY_FIX.md, including timing-query instructions and production-validation limitations. Updated release notes and logging-tag reference. No new user-facing feature page is needed.Security checklist
@swagger_route(security=get_auth_security())sanitize_settings_for_user()The new endpoint returns only the caller's identity and authorized active-scope fields, never raw settings or catalogs. Storage failures return an explicit 503. Phase-timing events contain numeric durations, not identities, settings, or catalog contents.