Repository navigation
Render Microsoft 365 pending-action cards in V2 chat (#1722 gap 2) - #1731
Merged
Paul Lizer (paullizer) merged 1 commit intoOct 9, 2026
Merged
Paul Lizer (paullizer) merged 1 commit into
Paul Lizer (paullizer) merged 1 commit into
Conversation
Saved outgoing email and calendar actions (Send, Send now, Cancel) rendered only in classic chat, so notices carrying m365_pending_action opened the classic page. Under New UI only mode those links are dead ends for non-admins. - Extract one shared PendingActionCard, used by the Approvals page and chat. - Draw the cards in V2 chat the way classic does: inline under the reply that saved them, live while that reply streams, and in a conversation-level section (with Load more and Refresh) for actions whose reply is not on screen. - Route m365_pending_action notices to V2 /chat with a one-shot focus parameter that scrolls to the card, highlights it, then strips the parameter. - Re-read the conversation's list after a reply ends, resumes or is stopped, and drop the live card when a stream is detached, so a Stop does not leave a stale card behind. - Stub the new list request in the strict UI harnesses, and add Node, functional and UI tests plus feature documentation. No backend, schema or settings changes. Version 0.261.307. Refs #1722 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer)
merged commit Oct 9, 2026
08def99
into
paullizer-react-v2-ui
11 checks passed
This was referenced Oct 9, 2026
Paul Lizer (paullizer)
added a commit
that referenced
this pull request
Oct 9, 2026
V2's tip landed at .307 (PR #1731) and the sibling Phase 8 replay branch has claimed .308, so this PR's version moves to .309 per the coordinator. Updates every self-authored test header, docstring, assert_app_version_at_least floor, feature/admin/guide doc mention and the release-notes section header. Leaves config.py VERSION and every other branch's own .307 references (V2 M365 pending actions, the roadmap doc) untouched; the VERSION bump itself follows as the final, separate 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
m365_pending_actionopened classic chat. That becomes a dead end for non-admins under the coming "New UI only" admin mode.PendingActionCardnow serves both Approvals and chat; the Approvals test ids are unchanged.m365_pending_actionnotices now open V2/chatwith a one-shot focus parameter: the page scrolls to the card, highlights it, then strips the parameter from the URL./api/msgraph/pending-actionsendpoints. Out of scope: workflow-activity Microsoft 365 notices, them365_sign_in_requiredandm365_approval_requiredstream-pause UIs, and data-access approvals.Notes for reviewers
detachActiveStream()drops the live card, and the conversation's list is re-read after a reply ends, resumes or is stopped. A card the server saves after Stop appears on the next read (window focus, Refresh, or a collaboration event). This is an accepted race and is described in the feature doc.GET /api/msgraph/pending-actions?conversation_id=...&limit=30, so every strict UI harness (one that 404s unknown routes) needs a stub.ui_tests/fixtures/v2_pending_action_stubs.pyis the shared helper and 25 harness files now use it, which is most of theui_testschurn in this diff. Future harnesses that open a conversation need it too.chatHrefForPendingActionis added toTS_SAME_ORIGIN_URL_BUILDERSinscripts/check_xss_sinks.py, with a justification comment. It returns/chat?conversationId=<encoded>plus&m365_pending_action=<encoded id>, and only whennormalizePendingActionIdaccepts the id; otherwise it returns the plain conversation link. Worth a reviewer's look.Linked issue
Refs #1722
Covers gap 2 (Chat, "M365 pending-action card") of that tracking issue. The issue stays open for the remaining gaps.
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?
This brings an existing classic capability to V2 for parity, and the catalog already has a generic Microsoft 365 Actions 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 changedVERSIONgoes from 0.261.306 to 0.261.307.deployers/is untouched.Testing / validation
node --test --test-reporter=tap functional_tests/test_v2_m365_pending_actions_logic.mjs functional_tests/test_v2_m365_pending_actions_store.mjs functional_tests/test_v2_m365_pending_actions_stream.mjs functional_tests/test_v2_workflow_run_link_routing.mjs: passed, 119/119 (30 + 44 + 34 + 11).python -m pytest functional_tests/test_v2_m365_pending_actions.py -q -p no:cacheprovider: passed, 14 tests.npm run typecheckandnpm run buildinapplication/v2_ui: both passed (the build shows only the existing chunk-size warning).python -m pytest ui_tests/test_v2_m365_pending_action_cards.py -q -p no:cacheprovider: passed, 10 tests (Playwright against stubbed endpoints).python -m pytest ui_tests/test_v2_notifications_bell.py -q -p no:cacheprovider: 52 passed, 10 errors. The same 10 teardown errors occur on the unmodified base (47 passed, 10 errors there); they come from Settings endpoints that the harness does not stub. This branch adds 5 passing bell tests.python scripts/check_xss_sinks.py --base-sha <base> --head-sha <head> <the 16 changed application files>passed;python functional_tests/test_xss_guardrails_checker.pypassed 12/12;python scripts/check_broken_access_control.py --base-sha <base> --head-sha <head> application/single_app/config.pypassed;python -m py_compile application/single_app/config.pypassed;python scripts/check_malicious_pr_security_review.py --base-sha <base> --head-sha <head> --report-file <tmp> --verify-release-agereported no blocker findings.python functional_tests/test_docs_app_surface_coverage.py: passed 7/7.python functional_tests/test_docs_site_quality.py: passed 6/6.ui_tests/test_v2_*.pyfiles) after the final rebase: green apart from the items below, each of which fails or errors the same way on the unmodified base.Known failures not caused by this PR (all reproduced on base
11d84783e):ui_tests/test_v2_document_provenance.py: 3 group tests fail because upstream's group switch now callsGET /api/v2/scope, whichui_tests/fixtures/workspace_authoring.pydoes not stub.ui_tests/test_v2_workflow_run_card.py: 1 failure; it expects/profile?tab=settings#m365-connection-statuswhile the code links/settings?tab=preferences§ion=m365-workflow-connection(lib/m365Links.ts).ui_tests/test_v2_workflow_alert_notices.py: 1 error from unstubbed Settings endpoints (same cause as the bell teardown errors above).functional_tests/test_v2_notifications_bell.py::test_the_administrator_switch_and_the_preference_reach_both_sidespins the literal"features": _build_feature_flags(public_settings, per_user_overrides), which upstream'sroute_backend_v2.pyno longer contains. This PR does not touch that route.Not run or not validated:
/api/msgraph/pending-actionsresponses, and the backend endpoints are unchanged.semantic_kerneldo not run in my local environment (broken OpenSSL/cryptography install). This PR has no backend changes.Documentation
Release notes are not included in this PR: no entry was added to
docs/explanation/release_notes.mdfor 0.261.307. One can be added before merge if wanted.Feature documentation: new
docs/explanation/features/V2_M365_PENDING_ACTION_CARDS.md, plus updates toV2_NOTIFICATIONS_BELL.md,V2_TERMS_AND_APPROVALS.md,MSGRAPH_PENDING_ACTIONS.md,CHAT_ORCHESTRATION_WORKFLOWS_ROADMAP.mdanddocs/reference/chat-controls.md. Fix documentation is not needed because no shipped bug is fixed.Security checklist
@swagger_route(security=get_auth_security())sanitize_settings_for_user()The first two items are not applicable: this PR adds no Flask routes and no settings. The added lines of the diff were scanned and contain no credential patterns and no CDN,
script-srcor dynamic-import references; the external URLs that appear are test fixtures and one issue link in the docs.