Skip to content

Add admin UI policies and persistent modern/legacy switching - #1945

Merged
Paul Lizer (paullizer) merged 1 commit into
microsoft:Developmentfrom
paullizer:paullizer-ui-selection-controls
Nov 17, 2026
Merged

Paul Lizer (paullizer) merged 1 commit into
microsoft:Developmentfrom
paullizer:paullizer-ui-selection-controls

Conversation

@paullizer

Copy link
Copy Markdown
Collaborator

Summary

  • Give admins matching Appearance controls in both interfaces for Modern only, Legacy only, or Both, plus the default. Unconfigured deployments allow both and default to modern; restrictions apply to admins too.
  • Save account-menu interface choices before navigating to the corresponding page. Choices survive sign-ins and temporary admin restrictions; routing bypasses stale worker chrome caches. Failed saves remain visible without navigating away.
  • Enforce navigation policy in both directions while preserving backend/API/embed operations. A missing modern bundle temporarily falls back to legacy with a throttled warning, including under modern-only policy.
  • Add modern pre-authentication Terms of Use and fix preference saves for accounts with no agents. The route audit found no missing core signed-in pages, not exhaustive control parity: AI Connections replaces legacy endpoint fields, the Standard citations informational card is not reproduced, and deployment-provided custom pages still need embed support.

Linked issue

N/A - no associated issue.

Release Notes & Latest Features

  • New Feature
  • Bug Fix
  • UI Enhancement
  • Breaking Change
  • Internal only

Is this visible to end users?

  • Yes
  • No

Is this admin-facing (Admin Settings, governance, deployment, config)?

  • Yes
  • No

Should this become a Latest Feature card?

  • Yes
  • No
  • Already added

Screenshot needed for the card?

  • Yes
  • No
  • Attached

Release notes and a Latest Feature card are not included. Release-note approval was requested, but the user was unavailable; the existing release notes were left unchanged.

Version bump

  • application/single_app/config.py VERSION third segment bumped, or not needed because this is docs-only
  • deployers/version.txt bumped, or not needed because deployers/ was not changed

Application version: 0.261.448 -> 0.261.449. No deployer changes.

Testing / validation

Passed:

python -m pytest functional_tests\test_ui_mode_seam.py functional_tests\test_ui_redirect_edge.py functional_tests\test_ui_return_urls.py functional_tests\test_modern_standalone_pages.py functional_tests\test_v2_admin_appearance_parity.py functional_tests\test_terms_of_use.py -q --disable-warnings --tb=short -p no:cacheprovider

Result: 249 passed.

$env:PYTHONPATH = "$PWD\application\single_app;$PWD\functional_tests"
python -m pytest -p test_support.cosmos_network_guard functional_tests\test_ui_interface_selection.py -q --disable-warnings --tb=short -p no:cacheprovider

Result: 2 passed, covering real account persistence, stale worker cache behavior, normal/optimized Python, forced policies, missing-bundle fallback and pre-auth terms.

python -m pytest ui_tests\test_ui_interface_selection.py ui_tests\test_v2_classic_links.py -q --disable-warnings --tb=short -p no:cacheprovider

Result: 40 passed, including desktop/mobile Appearance settings, both switch directions, keyboard operation, save failures and modern terms.

Additional successful commands:

  • npm --prefix application\v2_ui run build: passed; existing large-chunk warning.
  • python -m pytest functional_tests\test_ui_route_parity_registry.py -q --disable-warnings --tb=short -p no:cacheprovider: 45 passed.
  • python .\functional_tests\route_tests\test_route_blueprint_policy_inventory.py: 15 passed.
  • python .\functional_tests\route_tests\test_route_unauthenticated_policy_contract.py: 10 passed.
  • python .\functional_tests\route_tests\test_route_policy_test_coverage.py: 5 passed.
  • python .\functional_tests\test_docs_app_surface_coverage.py: 7 checks passed.
  • python .\functional_tests\test_docs_site_quality.py: 6 checks passed.
  • python .\scripts\build_ui_route_map.py --check: passed.
  • node --check application\single_app\static\js\ui-switch.js: passed.
  • git diff --check: passed before committing.

Known pre-existing failures, left outside this change:

  • python .\scripts\check_cosmos_response_boundaries.py --run-contracts: blocked by 18 stale review entries in unchanged route_backend_orchestration.py. All 13 affected settings/profile owner reviews were renewed with SDK-runtime evidence; unrelated inventory entries were preserved. A separate network-blocked SDK run reported 65 passed and the single repository-wide inventory failure.
  • python -m pytest functional_tests\test_user_settings_cache_optimization.py -q --disable-warnings --tb=short -p no:cacheprovider: 3 passed, 1 failed. The unchanged test expects APP_SETTINGS_CACHE_VERSION_DOC_ID, which is already absent from the unchanged baseline cache module.

Documentation

  • Release notes updated, or not needed
  • Feature documentation updated, or not needed
  • Fix documentation updated, or not needed

Added interface-selection feature documentation and the empty-agent save fix explanation. Updated Appearance, user preferences, chat-control reference, parity/prerequisite documentation, and generated route/docs inventories.

Security checklist

  • New Flask routes include @swagger_route(security=get_auth_security())
  • Settings sent to non-admin frontends use sanitize_settings_for_user()
  • Browser JavaScript is served from local SimpleChat static assets only; no CDN-hosted JS
  • No secrets, keys, connection strings, or local-only artifacts are included

No new Flask routes. Existing authentication/authorization remains in place. Browser-facing policy is an explicit safe projection, preference writes validate enums, and switch destinations use same-origin route mapping.

Expose availability and defaults in both Appearance settings UIs, enforce navigation policy, and remember account interface preferences. Add modern pre-auth terms, regression coverage, documentation, and version 0.261.449.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread ui_tests/test_ui_interface_selection.py Resolved
@paullizer
Paul Lizer (paullizer) merged commit 4aa9325 into microsoft:Development Nov 17, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants