Skip to content

Add V2 pages for every classic page and interface-switch prerequisites - #1944

Merged
Paul Lizer (paullizer) merged 4 commits into
microsoft:Developmentfrom
paullizer:paullizer-v2-page-parity-plan
Nov 17, 2026
Merged

Paul Lizer (paullizer) merged 4 commits into
microsoft:Developmentfrom
paullizer:paullizer-v2-page-parity-plan

Conversation

@paullizer

Copy link
Copy Markdown
Collaborator

Summary

  • Gives the modern (V2) interface a counterpart for every classic page, in preparation for choosing "fully modern" or "fully classic". New V2 pages: Notifications (filters, search, paging) and Workflow Activity. V2 also gains custom pages shown inside its shell, public workspace Tags, native group and public workspace delete, manage sections for locked or inactive workspaces, legacy document upgrade for group and public documents, a Control Center refresh strip, duplicate global agents and actions, Global Identities editing, administrator-managed file sources, conversation scope-lock editing, generated-file actions, the User Agreement before uploads, the idle-session warning, and profile photo refresh.
  • Adds modern standalone variants of the pages V2 cannot serve (signed-out or no-role home, Acceptable Use Policy, 429, Microsoft 365 result).
  • Adds the switch prerequisites, all inert today because get_ui_mode() still always answers classic: a registry of every classic page route and its V2 answer (ui_route_map.json, with a loader, a generator and a guard test that fails when a classic page has no V2 answer), a disabled-by-default 302 redirect from classic pages to V2 (?ui=classic skips it for one request), fragment translation, and a "Back to classic" action that opens the counterpart of the current page.
  • Fixes a pre-existing open redirect in the Terms of Use accept flow: a next value containing a TAB became //host. It is its own commit (2b54298), so it can be cherry-picked or dropped on its own.

For reviewers

  • Nothing changes for any user today. The redirect, the modern templates and "Back to classic" all wait on get_ui_mode(). The selector (admin default, per-user preference, precedence, who may use ?ui=classic) is the follow-up.
  • app.py is the hot file. The redirect hook is registered before the Terms of Use and idle-timeout hooks and only touches GET and HEAD page navigations, never frames, fetch/XHR or non-HTML. add_security_headers relaxes X-Frame-Options to SAMEORIGIN only on custom-page ?embed=1 responses; the CSP frame-ancestors is unchanged. The idle-timeout rules moved to functions_idle_timeout.py so the V2 bootstrap shares them, with thin wrappers left in app.py.
  • API changes: GET /api/notifications takes optional status and q; new POST /api/groups/{group_id}/documents/upgrade_legacy and POST /api/public-workspaces/{workspace_id}/documents/upgrade_legacy; new admin-only GET /api/admin/file-sync/{scope_type}/{scope_id}/source-options; deleting a global identity that an action still uses now answers 409 identity_in_use (it was 400, with the same message).
  • Owners and Admins of locked, inactive or unrecognised-status groups and public workspaces keep Members, Settings, Activity and Statistics in V2, as the classic manage pages do (functions_workspace_context.py). Adding members and changing roles stay closed.
  • Known limitation, same as classic: no upload route enforces the User Agreement on the server. V2 now asks before every upload, in the browser.
  • Version: Development moved to 0.261.447 while this branch was open (0.261.445 is now the orchestration harness release), so Development was merged in and this work was renumbered to 0.261.448 in a separate commit (337 pure version-token replacements). The merge had two trivial conflicts: the VERSION line, and one import block in ActivityLogsSection.tsx where both sides added an import (both kept).
  • Not touched: the generated pages under docs/explanation/release-notes/ are already missing 0.261.424, 0.261.441 and 0.261.442 on Development, and their generator aborts on two pre-existing relative links.

Linked issue

N/A - no tracking issue was filed for this work.

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

No card is added: these are classic capabilities arriving in V2, and nothing changes for users until the interface selector exists. Easy to add later if wanted.

Screenshot needed for the card?

  • Yes
  • No
  • Attached

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

VERSION 0.261.444 -> 0.261.448 (Development is at 0.261.447). deployers/ is not touched.

Testing / validation

On the final merged tree:

  • npm --prefix application\v2_ui run build - passed (typecheck and production build).
  • python scripts\build_ui_route_map.py --check - passed (generated TypeScript and docs table in sync).
  • python scripts\check_xss_sinks.py --full-file over the 143 changed code files - passed.
  • python .\scripts\build_docs_inventory.py - inventory unchanged, so it is in sync with the merged app.
  • python scripts\check_cosmos_response_boundaries.py - 18 review gaps, all in route_backend_orchestration.py, which this branch does not touch. A clean origin/Development (0015082) reports the same 18. This branch reported 0 gaps before Development was merged in.
  • python -m pytest functional_tests/route_tests -q - 239 passed, 6 errors. All 6 are in test_workflow_document_selection_policy.py and occur on Development too.
  • One python -m pytest <file> -q process per file over 122 test files: every test file this branch adds or changes, every test file Development changed, and the Control Center and docs tests (ui_tests/test_v2_orchestration_outputs.py excluded, because it hangs on both trees). No regression against a clean copy of the pre-merge base (bc07356): every failing file fails with the same test IDs as on the base. The 12 failing files that Development changed were re-run on a clean origin/Development and fail with identical IDs there.

Before the merge, on the original base:

  • Every functional_tests/test_*.py (2,000 files) and ui_tests/test_*.py (482 files), one pytest process per file, on this branch and on a clean copy of the base, compared by failing test ID. About 40% of the functional files and 29% of the UI files already fail on the base in this environment (missing Azure configuration, stale expectations), so only differences matter. All 42 new test files pass (25 functional, 17 UI).
  • Two differences were real and are fixed here: the test_v2_artifact_download_cors harness now supplies is_same_origin_framing_allowed (which add_security_headers now calls), and the J10 mobile cases in test_v2_group_journeys now open the rail drawer first (this also fixes a case that already failed on the base).
  • The remaining differences were not regressions: load-sensitive tests that pass alone (test_shared_workspace_secret_editing, test_admin_settings_diagnostics_routes); a Bootstrap modal re-open race in test_m365_lifecycle_and_approvals (intermittent on the base, deterministic there with a slowed backdrop); and files whose base run had timed out and that fail with identical counts when re-run (test_v2_workspace_authoring, test_v2_group_document_management, test_v2_orchestration_outputs, test_group_document_management, test_group_document_publication and several test_workflow_* files).

Not run: nothing was tested against live Azure services, and UI tests ran in Chromium only. The merged tree was not re-run across all ~2,500 test files. test_tabular_row_orchestration_scale.py times out on the base and here and references no changed file.

CI note: three checks already fail on Development and are unrelated to this change: the 18 Cosmos review gaps above, test_docs_release_notes_integrity (the generated release-notes pages are stale), and test_docs_link_integrity (2 broken site links).

Documentation

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

Release notes: a new v0.261.448 block. Feature docs: 15 new docs/explanation/features/V2_*.md pages (including the generated V2_CLASSIC_PAGE_PARITY.md) plus updates to existing pages, and two new guides. Fix docs: GLOBAL_IDENTITY_IN_USE_DELETE_FIX.md and TERMS_OF_USE_RETURN_PATH_CONTROL_CHARACTER_FIX.md.

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

The three new routes carry the decorator and are in the route-policy inventory. The V2 bootstrap's idle_timeout is built from sanitized settings, and render_page hands settings only to the UI-mode chooser, never to a template. The new templates reference only local assets. A security review of this change found no new vulnerabilities; the one pre-existing issue it surfaced (the Terms of Use redirect) is fixed in its own commit.

A next value that contained a TAB, such as /terms-of-use?next=/%09/evil.example, survived normalize_terms_of_use_return_path, and Werkzeug redirect() strips an interior TAB from Location, so accepting the terms redirected to //evil.example. A return path with any control character now falls back to the default page; ordinary return paths are unchanged.

Adds a regression test that fails against the previous behaviour, and a fix note.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…n prerequisites

Brings the modern (V2) interface to parity with the classic one, so an administrator can later choose fully modern or fully classic. Version 0.261.445.

V2 pages and features: Notifications page (status and q filters on GET /api/notifications); workflow activity page; custom pages embedded in V2 through a same-origin frame (?embed=1, with X-Frame-Options relaxed to SAMEORIGIN on that response only); public workspace Tags; native group and public workspace delete; manage sections for locked and inactive workspaces; legacy document upgrade for group and public documents; Control Center refresh strip; duplicate global agents and actions; administrator-managed file sources; Global Identities editor (a delete that is still in use answers 409 identity_in_use); conversation scope-lock editing; generated-file actions; User Agreement before uploads; idle-session warning; profile photo refresh.

Standalone pages: modern variants of the pages V2 cannot serve (signed-out home, Acceptable Use Policy, 429, Microsoft 365 result), chosen by one helper.

Interface-selection prerequisites, all inert until functions_ui_mode.get_ui_mode() answers modern: the ui_route_map.json registry of every classic page and its V2 answer (loader, generator, guard test), a disabled-by-default redirect from classic pages to V2 with a ?ui=classic escape, fragment translation, and a Back to classic action that opens the counterpart of the current page.

Tests: new functional and UI tests for each feature; the J10 mobile cases now open the rail drawer, and the artifact download CORS harness supplies the framing helper that add_security_headers now calls. Release notes, feature docs and the docs inventory are updated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Development moved to 0.261.447 (three merged PRs), so the V2 parity work takes the next version, 0.261.448. Two conflicts: config.py VERSION, and the import block in ActivityLogsSection.tsx, where both sides added an import (kept both: the data-refresh hook from this branch and the runtime usage panel from Development).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Development shipped 0.261.445, 0.261.446 and 0.261.447 while this branch was open (0.261.445 is now the orchestration harness release), so the V2 parity work is released as 0.261.448. config.py was resolved in the merge; this commit relabels the version stamps this branch added: test headers and version assertions, fixture bootstrap versions, the release notes heading, and the feature, fix and guide pages ("Implemented in", "since", "until"). Only the version token changes (337 lines); Development's own 0.261.445 references are untouched.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@paullizer
Paul Lizer (paullizer) merged commit ad35ce5 into microsoft:Development Nov 17, 2026
11 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