Skip to content

feat: centralize Standard management APIs with session-token routing - #9668

Merged
Tony Tang (anthony0t) merged 1 commit into
mainfrom
tonytang/jci
Oct 26, 2026
Merged

Tony Tang (anthony0t) merged 1 commit into
mainfrom
tonytang/jci

Conversation

@anthony0t

@anthony0t Tony Tang (anthony0t) commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Commit Type

  • feature - New functionality

Risk Level

  • High- Introduces opt-in credential acquisition and direct-runtime routing; disabled by default.

What & Why

Centralize the 14 in-scope Logic Apps Standard management APIs behind named methods on StandardManagementHttpClient. Share profile selection, session issuance/cache/renewal, feature gating, and controlled direct-runtime/ARM routing so callers do not manage tokens or construct direct URLs.

Impact of Change

  • Users: The existing V1 (/) and V2 (/v2) Standalone designers expose an opt-in Standard management APIs > Enable direct management with session tokens setting for Azure-connected Standard apps. Off uses ARM; on routes the fourteen supported APIs through the shared session client. Local fixtures, Consumption, hybrid, and excluded ARM APIs retain their existing paths.
  • Developers: Shared services and Standalone helpers delegate to named API methods. The designer shell owns one client shared by the editor and run-instance selector, with trusted runtime discovery and explicit retry configuration. The offline /standard-management route remains an additional synthetic regression host, not the feature's primary app.
  • System: The isolated Fetch transport omits cookies, rejects redirects, disables caching, and never automatically retries. HTTP failures retain status and Retry-After even for unreadable/non-JSON error bodies. ARM authentication replacement, removal, or expiry synchronously retires sessions. Credentials remain in memory, with coalesced issuance and bounded recovery without ambiguous mutation replay.
  • Backend alignment: Uses the current DirectAccessDisabled/shared dependency error codes, exact canonical token encoding, and configurable server expiry. Documents the EdgeDirectAccess enablement, CPU-only admission, and session-lifetime settings.
  • Error handling: Permitted ARM fallback failures reject cancellation/resubmission. Saves propagate session failures and distinguish issuer 404s from a confirmed missing business-validation route; both code-view handlers await save completion.
  • Deferred by agreement: Production Portal host wiring still requires its own authentication/lifecycle contract. The Standalone integration is included in this PR. Backend enablement, ingress admission, CORS, and reachability are separate deployment prerequisites.

Test Plan

  • 389 focused tests passed: 259 shared/service tests, 93 Standalone integration/helper/authentication/transport tests, and 37 synthetic-host tests.
  • All 10 designer-integration tests passed again after correcting the React hook wrapper naming lint error.
  • Shared-library TypeScript check and focused semantic checks for 12 integration/transport/test files passed.
  • Scoped lint passed with zero errors and two pre-existing empty-fragment warnings; formatting and whitespace checks passed.
  • Full Standalone type-check: blocked by existing unrelated errors.
  • Deployed ARM/runtime integration: real authentication/admission, CORS, profile eligibility, payload parity, and capacity have not been verified. Synthetic and substituted-transport tests do not establish these.

Known Issues / Draft Exit Criteria

  • Verify deployed backend enablement, supported app configuration, CPU admission, CORS/reachability, and payload/profile parity before enabling direct access.
  • The setting remains off by default and does not enable the backend or constitute a production rollout.
  • Existing review threads are not automatically resolved by publishing this implementation.

Contributors

Implementation assisted by Copilot.

Screenshots/Videos

Not included. The feature is integrated into the existing designer; no deployed-backend behavior is claimed.

@anthony0t
Tony Tang (anthony0t) requested a balanced review from Copilot October 23, 2026 18:03
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

✅ PR Title

  • Current: feat: centralize Standard management APIs with session-token routing
  • Issue: None. The title clearly identifies the change, the affected area, and the routing behavior.
  • Recommendation: No change required.

✅ Commit Type

  • Properly selected (feature).
  • Only one commit type is selected, which is correct.

✅ Risk Level

  • The PR selects High risk and has the matching risk:high label.
  • The advised risk level is High. The change adds session-token acquisition, authentication lifecycle handling, direct runtime routing, fallback behavior, and broad Standard API integration, so the submitted risk assessment is appropriate.

✅ What & Why

  • Current: The body explains that fourteen Standard management APIs are centralized behind named methods and that token/session management and ARM/direct-runtime routing are moved into shared services.
  • Issue: None. The rationale is specific and sufficiently describes the motivation and scope.
  • Recommendation: No change required. Consider shortening the section in a future revision if a more concise summary is preferred.

✅ Impact of Change

  • The body clearly describes user, developer, system, backend-alignment, and error-handling impacts. It also explicitly documents deferred Portal integration and deployment prerequisites.
  • Recommendation:
    • Users: The body correctly identifies that the feature is opt-in, disabled by default, limited to supported Azure-connected Standard apps, and preserves existing routes for other scenarios.
    • Developers: The body correctly documents shared clients, named API methods, lifecycle ownership, authentication changes, and fallback behavior.
    • System: The body appropriately calls out credential handling, retry behavior, redirects, caching, CORS/reachability, backend enablement, and capacity prerequisites.

✅ Test Plan

  • The diff adds and updates substantial automated unit and integration test coverage, including shared management-client tests, Standalone integration tests, transport tests, authentication lifecycle tests, selector tests, and synthetic-host tests.
  • The body also documents known verification boundaries, including the blocked full Standalone type-check and the fact that deployed backend, CORS, authentication/admission, and capacity behavior are not verified.
  • Recommendation: For strict template consistency, consider replacing the custom test-plan checkboxes with the standard fields (Unit tests added/updated, E2E tests added/updated, and/or Manual testing completed). This is a formatting recommendation only and does not fail the test plan because automated tests are present in the diff.

✅ Contributors

  • Contributors are acknowledged with Implementation assisted by Copilot.
  • Recommendation: Consider also crediting relevant PMs, designers, reviewers, or other human contributors where applicable.

✅ Screenshots/Videos

  • The body states that screenshots/videos are not included and explains that no deployed-backend behavior is claimed. The diff does not appear to introduce a new visual UI or user-facing control.
  • Recommendation: No screenshots are required based on the described scope. If the existing designer experience changes visually in deployment, add before/after screenshots or a short video.

Summary Table

Section Status Recommendation
Title ✅ No change required
Commit Type ✅ Keep only feature selected
Risk Level ✅ Keep the High selection and risk:high label
What & Why ✅ No change required
Impact of Change ✅ No change required
Test Plan ✅ Optionally align custom test entries with the standard template checkboxes
Contributors ✅ Add human contributors where applicable
Screenshots/Videos ✅ Add only if deployed behavior has visual changes

This PR passes the title and body review. The submitted High risk level matches the advised risk level and the risk:high label. No required documentation corrections were identified.


Powered by: Logic App (fallback) | Last updated: Mon, 26 Oct 2026 18:08:31 GMT

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📊 Coverage Check

The following changed files need attention:

⚠️ libs/logic-apps-shared/src/designer-client-services/lib/standard/connector.ts - 62% covered (needs improvement)
⚠️ libs/logic-apps-shared/src/designer-client-services/lib/standard/operationmanifest.ts - 32% covered (needs improvement)
⚠️ libs/logic-apps-shared/src/designer-client-services/lib/standard/run.ts - 44% covered (needs improvement)
⚠️ libs/logic-apps-shared/src/designer-client-services/lib/standard/search.ts - 51% covered (needs improvement)

Please add tests for the uncovered files before merging.

Copilot 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.

🟡 Changes recommended

Error handling can report failed mutations as successful, bypass save validation, or replace existing MCP configuration after failed enumeration.

5 open issues
What changed in this PR

Centralizes 14 Logic Apps Standard management APIs behind a shared client with opt-in session-token routing. Existing application roots remain ARM-only unless an embedding host supplies direct-access configuration.

Changes:

  • Adds session acquisition, caching, renewal, context isolation, and controlled ARM fallback.
  • Integrates named management methods into shared services and Standalone helpers.
  • Adds an offline test route, integration tests, and host-integration documentation.
File Description
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​search.ts Routes operation and connector searches through named methods.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​run.ts Integrates run queries, trigger execution, cancellation, and resubmission.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​README.md Documents routing, lifecycle, transport requirements, and verification boundaries.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​operationmanifest.ts Delegates connector metadata requests.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​management.ts Implements the management API catalog and session-routing client.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​index.ts Exports management APIs and types.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​connector.ts Delegates dynamic connector invocation.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​standard/​__tests__/​management.spec.ts Tests routing, sessions, recovery, and service integration.
libs/​logic-apps-shared/​src/​designer-client-services/​lib/​base/​resource.ts Integrates resource actions and workflow inventory.
apps/​Standalone/​src/​designer/​app/​LocalDesigner/​StandardManagementTestHost.tsx Adds offline operation and scenario controls.
apps/​Standalone/​src/​designer/​app/​LocalDesigner/​standardManagementHost.ts Composes real services with synthetic transports.
apps/​Standalone/​src/​designer/​app/​LocalDesigner/​__test__/​standardManagementHost.spec.tsx Tests offline host operations and lifecycle behavior.
apps/​Standalone/​src/​designer/​app/​AzureLogicAppsDesigner/​Services/​WorkflowAndArtifacts.tsx Centralizes management helpers and scopes query cache keys.
apps/​Standalone/​src/​designer/​app/​AzureLogicAppsDesigner/​Services/​StandardManagement.ts Adds ARM transport, lifecycle ownership, and host configuration.
apps/​Standalone/​src/​designer/​app/​AzureLogicAppsDesigner/​laDesignerV2.tsx Wires management ownership into the v2 designer.
apps/​Standalone/​src/​designer/​app/​AzureLogicAppsDesigner/​laDesigner.tsx Wires management ownership into the existing designer.
apps/​Standalone/​src/​designer/​app/​AzureLogicAppsDesigner/​__test__/​vitest.config.ts Configures focused helper and lifecycle tests.
apps/​Standalone/​src/​designer/​app/​AzureLogicAppsDesigner/​__test__/​standardManagement.spec.tsx Tests helper delegation, transport behavior, and context changes.
apps/​Standalone/​src/​App.tsx Registers the lazy-loaded offline test route.

Review effort: Balanced

@anthony0t
Tony Tang (anthony0t) force-pushed the tonytang/jci branch 4 times, most recently from b86616f to b9b2237 Compare October 26, 2026 00:46
@anthony0t
Tony Tang (anthony0t) marked this pull request as ready for review October 26, 2026 01:22
@anthony0t Tony Tang (anthony0t) added risk:medium Medium risk change with potential impact risk:high High risk change requiring careful review and removed risk:medium Medium risk change with potential impact needs-pr-update labels Oct 26, 2026
Add named entry points for the 14 in-scope APIs, shared session acquisition and caching, opt-in Standalone lifecycle integration, and an offline management test host. Keep direct access disabled by default; defer production Portal and live-backend host wiring.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@anthony0t
Tony Tang (anthony0t) merged commit a0da8ff into main Oct 26, 2026
49 of 52 checks passed
@anthony0t
Tony Tang (anthony0t) deleted the tonytang/jci branch October 26, 2026 21:52

This branch had an error being deployed

1 failed deployment
E2ETesting — 3caa6e3f Deployed Oct 26, 2026 by anthony0t via build-and-publish #433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:high High risk change requiring careful review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants