Implemented the first version of provider readiness resolution guidance. Added the ProviderReadinessResolutionAdapter, provider readiness guidance card, and updated EnvironmentRequiredPermissions, ProviderConnectionResource, and ListProviderConnections/ViewProviderConnection. Added tests and updated the design coverage matrix. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #424
16 KiB
16 KiB
Implementation Plan: Spec 353 - Provider Connections Resolution Guidance v1
- Branch:
353-provider-connections-resolution-guidance-v1 - Date: 2026-06-04
- Spec:
specs/353-provider-connections-resolution-guidance-v1/spec.md - Input: Spec 353 + repo inspection of Provider Connections, Environment Required Permissions, provider verification/permission helpers, and Environment Dashboard provider blocker guidance.
Summary
Add one derived provider-readiness guidance layer to the existing Provider Connections and Required Permissions surfaces, and make the Environment Dashboard provider CTA land on a target page that explains the same blocker clearly.
The implementation stays narrow:
- reuse existing provider connection, permission, capability-group, verification, and last-operation truth
- keep provider actions navigation-first and repo-backed
- preserve onboarding, verification execution, permission calculation, and audit ownership
- avoid live provider calls during render
Technical Context
- Language/Version: PHP 8.4.15, Laravel 12.52.x
- UI stack: Filament 5.2.x, Livewire 4.x
- Database: PostgreSQL, no schema change planned
- Testing: Pest unit + feature/Livewire + one strategic browser smoke
- Validation lanes: fast-feedback + confidence + browser
- Local runtime posture: Sail-first
- Deployment/runtime impact: no expected env, migration, queue-family, scheduler, storage, or panel/provider change
- Global search: unchanged;
ProviderConnectionResourceremains not globally searchable
Current Repo Truth That Constrains The Slice
ProviderConnectionResourcealready exposes provider readiness signals as columns/infolist entries:- consent status
- verification status
- provider capability
- last health check
- last error reason/message
ViewProviderConnectionalready keeps one primaryGrant admin consentheader action and groups the rest underMore.EditProviderConnectionalready surfacesView last check runand the existing provider-operation actions, but it is still an action-centered maintenance surface rather than a first-screen readiness-guidance surface.EnvironmentRequiredPermissionsalready renders a summary, capability-group overview, issue cards, copy payloads, and a technical-details section around a native permission matrix.ManagedEnvironmentRequiredPermissionsViewModelBuilderalready derives:- overall readiness (
blocked/needs_attention/ready) - counts
- feature impacts
- capability groups
- freshness
- overall readiness (
EnvironmentDashboardSummaryBuilderalready elevatesrequired_permissions/delegated_permissionsintooperatorGuidance.- There is no current
EnvironmentProviderHealthpage class to reuse; provider-health truth is distributed across existing provider/verification helpers.
Domain / Model Implications
- No schema or migration change is planned.
- No new persisted readiness entity, status column, enum family, or provider registry is allowed in this slice.
- The narrowest acceptable implementation shape is one derived provider-guidance adapter over existing
ProviderConnectionResolver,ManagedEnvironmentRequiredPermissionsViewModelBuilder, andOperationRunproof truth. - Existing ownership boundaries remain unchanged:
- provider connection truth stays provider/resource owned
- required-permissions truth stays builder/view-model owned
- verification proof stays
OperationRunowned
UI / Filament / Livewire Implications
- Filament v5 continues to run on Livewire v4.x; no version or API drift is permitted.
- No panel/provider registration change is allowed;
apps/platform/bootstrap/providers.phpremains untouched. ProviderConnectionResourcestays not globally searchable.- Existing destructive or high-risk actions must keep their current confirmation, authorization, notification, and audit posture.
- No new asset registration is planned, so there is no expected
filament:assetsdeployment change for this spec.
RBAC / Policy Implications
- Workspace membership and environment entitlement remain the only scope authorities.
- Existing provider capabilities continue to decide whether actions are visible, disabled, or executable.
- Guidance selection itself must remain safe for unauthorized users by operating only on already-authorized page state.
Audit / Logging / Evidence Implications
- Existing provider verification start/result handling and
OperationRunproof links are reused unchanged. - No new audit stream, notification family, or evidence artifact is planned.
- The implementation must keep provider-readiness render paths read-only and side-effect free.
Data / Migration Implications
- No database migration, backfill, or persisted projection is planned.
- All derived readiness output must be request-local and DB-backed from already stored truth.
- Compatibility shims are not justified because no data shape replacement is proposed in this prep slice.
Rollout Considerations
- No feature flag is expected because the slice is a bounded presentation improvement over existing repo truth.
- Staging validation should still prove three operator states explicitly:
- missing permissions
- verification follow-up
- calm ready state
- Production risk is limited to UI guidance hierarchy and wrong-link regressions, so tests and browser smoke remain the main rollout controls.
UI / Surface Guardrail Plan
- Guardrail scope:
- Provider Connections list and view, plus edit-page action/proof continuity
- Environment Required Permissions
- dashboard target continuity only
- Affected surfaces:
apps/platform/app/Filament/Resources/ProviderConnectionResource.phpapps/platform/app/Filament/Resources/ProviderConnectionResource/Pages/ListProviderConnections.phpapps/platform/app/Filament/Resources/ProviderConnectionResource/Pages/ViewProviderConnection.phpapps/platform/app/Filament/Resources/ProviderConnectionResource/Pages/EditProviderConnection.phpapps/platform/app/Filament/Pages/EnvironmentRequiredPermissions.phpapps/platform/resources/views/filament/pages/environment-required-permissions.blade.phpapps/platform/app/Support/EnvironmentDashboard/EnvironmentDashboardSummaryBuilder.php
- Native vs custom:
- preserve native Filament list/detail/page ownership
- avoid new custom page families
- allow one bounded derived guidance presenter/adapter if necessary
- Shared-family relevance:
- status messaging
- next-action guidance
- operation proof links
- dashboard-to-detail continuity
- Required tests / smoke:
- focused unit tests for derived guidance selection
- feature tests for Provider Connections and Required Permissions
- one bounded browser smoke for priority and target continuity
- UI/Productization coverage:
- update
ui-009-provider-connections.md - create/update
ui-077-required-permissions.md - close the current UI-audit registry for UI-072/UI-077 in
route-inventory.md - update
design-coverage-matrix.mdonly if route-inventory counts or classification change - update
strategic-surfaces.mdonly if UI-077 is intentionally promoted from its current registry classification - use
unresolved-pages.mdif browser or screenshot evidence cannot be durably stored under the Spec 353 artifact path - save screenshots under the Spec 353 artifact path, or document the host-visible artifact blocker honestly
- update
Shared Pattern And System Fit
- Preferred reuse path:
- current dashboard
operatorGuidancestructure - current
ManagedEnvironmentRequiredPermissionsViewModelBuildertruth - current
ProviderConnectionResolvertruth - current
OperationRunLinks/ verification-run start UX
- current dashboard
- Likely implementation shape:
- one bounded derived adapter under a current provider/guidance support path
- adjacent seams such as
ProviderReasonTranslator/VerificationLinkBehaviormay stay contextual helpers, but they do not need to become the primary runtime path
- Avoid:
- new provider framework
- new persisted readiness state
- new route/query contract unless absolutely required for continuity
OperationRun UX Impact
Spec 353 does not create a new OperationRun type. It reuses the existing provider verification path:
StartVerificationProviderOperationStartResultPresenterOperationRunLinks
Implementation responsibility is limited to when these existing links/actions become the primary or secondary action for a derived blocker.
Likely Runtime Files
| Area | Repo-real files |
|---|---|
| Provider Connections runtime | apps/platform/app/Filament/Resources/ProviderConnectionResource.php, Pages/ListProviderConnections.php, Pages/ViewProviderConnection.php, Pages/EditProviderConnection.php |
| Required Permissions runtime | apps/platform/app/Filament/Pages/EnvironmentRequiredPermissions.php, apps/platform/resources/views/filament/pages/environment-required-permissions.blade.php |
| Permission truth | apps/platform/app/Services/Intune/ManagedEnvironmentRequiredPermissionsViewModelBuilder.php |
| Provider readiness truth | apps/platform/app/Support/ResolutionGuidance/Adapters/ProviderReadinessResolutionAdapter.php, apps/platform/app/Services/Providers/ProviderConnectionResolver.php, existing OperationRun proof, with ProviderReasonTranslator.php / VerificationLinkBehavior.php only where directly helpful |
| Dashboard continuity | apps/platform/app/Support/EnvironmentDashboard/EnvironmentDashboardSummaryBuilder.php |
| Links/helpers | apps/platform/app/Support/Links/RequiredPermissionsLinks.php, existing ManagedEnvironmentLinks / OperationRunLinks |
| UI audit docs | docs/ui-ux-enterprise-audit/page-reports/ui-009-provider-connections.md, docs/ui-ux-enterprise-audit/page-reports/ui-077-required-permissions.md |
Likely Test Files
| Layer | Planned file |
|---|---|
| Unit | apps/platform/tests/Unit/ResolutionGuidance/Spec353ProviderReadinessResolutionAdapterTest.php |
| Feature | apps/platform/tests/Feature/ProviderConnections/Spec353ProviderConnectionGuidanceTest.php |
| Feature/Filament | apps/platform/tests/Feature/Filament/Spec353RequiredPermissionsGuidanceTest.php |
| Browser | apps/platform/tests/Browser/Spec353ProviderReadinessGuidanceSmokeTest.php |
Implementation Approach
Phase 0 - Repo Truth Gate
- Re-read
spec.md,plan.md,tasks.md,repo-truth-map.md,checklists/requirements.md, andcontracts/provider-readiness-signal-map.md. - Re-verify the current runtime truth in the provider/resource/page/helper files listed above.
- Keep draft mismatches explicit:
- no
EnvironmentProviderHealth.php - no existing
ui-077-required-permissions.md
- no
- Confirm no migration, package, env var, queue-family, storage, panel/provider, or global-search change is required.
Phase 1 - Tests First
- Add unit coverage for deterministic guidance selection:
- no provider connection
- disabled/unusable connection
- missing application permissions
- missing delegated permissions
- verification blocked/error
- verification stale/unknown
- ready/no urgent action
- Add feature coverage for Provider Connections:
- one dominant case
- one primary action
- secondary proof links only when repo-backed
- no fake remediation buttons
- Add feature coverage for Required Permissions:
- blocker guidance renders before the raw matrix
- application/delegated/stale cases map to the expected action hierarchy
- copy payloads and technical details remain secondary
- Add one browser smoke:
- dashboard -> target continuity
- permissions-missing state
- verification follow-up state
- calm ready state
Phase 2 - Derived Guidance Contract
- Choose the narrowest implementation shape:
- prefer one bounded provider-guidance adapter/presenter
- avoid broadening
ReviewPackOutputResolutionAdapterinto a provider super-framework
- Build one derived provider-readiness payload with:
- key
- title
- status
- tone
- reason
- impact
- primary action
- secondary actions
- details
- source metadata
- Consume only stored truth:
ProviderConnectionstate- permission counts and capability groups
- freshness
- last
provider.connection.checkrun - reason translation / next-step mapping
- Keep priority ordering explicit and narrow.
Phase 3 - Provider Connections Integration
- Add a top guidance presentation to Provider Connections list/view without removing the existing table columns, infolist truth, or safe action groups.
- Reuse existing repo-backed targets:
Grant admin consentView last check runRun verificationOpen required permissions
- Keep destructive/high-impact actions unchanged:
- confirmation
- authorization
- audit
- notifications
- Do not enable provider actions merely because guidance makes them more visible.
Phase 4 - Required Permissions Integration
- Replace the current guidance-first-but-generic summary with one explicit blocker case.
- Reuse the current capability-group and counts truth before inventing any new provider state.
- Keep copy payloads and the raw matrix secondary.
- If verification or last-operation proof is stronger than the raw permission count, the page may surface that as the primary blocker only when repo truth clearly supports it.
Phase 5 - Dashboard Target Continuity
- Keep the Environment Dashboard provider guidance selection logic narrow.
- Adjust continuity only if required so the linked target surface shows the same blocker class clearly.
- Avoid adding a fragile dashboard-only query contract when current route state is enough.
Phase 6 - Copy, Audit, And Browser Proof
- Update or add only the copy required for:
- provider readiness blocked
- required permissions missing
- provider verification required
- provider verification failed
- provider connection ready
- Update
ui-009-provider-connections.md. - Create/update
ui-077-required-permissions.md. - Close the UI-audit registry around UI-072/UI-077:
- update
route-inventory.mdreport/screenshot references - update
design-coverage-matrix.mdonly if classification/counts change - update
strategic-surfaces.mdonly if UI-077 is intentionally promoted from its current registry classification - use
unresolved-pages.mdif browser evidence cannot be durably stored
- update
- Save screenshots under
specs/353-provider-connections-resolution-guidance-v1/artifacts/screenshots/or record the container-local artifact blocker explicitly during close-out if Pest Browser cannot persist host-visible files.
Test Strategy
- Unit:
- deterministic blocker ranking and payload mapping
- Feature/Livewire:
- Provider Connections list/detail integration
- Required Permissions page integration
- dashboard target continuity if feature-level proof is cheaper than browser-only proof
- Browser:
- one small smoke proving real hierarchy and continuity on the rendered UI
- Render-path guard:
- fail if provider guidance rendering pulls live provider or Graph work into the page request
Risk Controls
- Onboarding overlap: preserve onboarding links as secondary and do not rewrite onboarding ownership.
- UI overload: keep one dominant case and collapse technical detail.
- Fake remediation: do not add unsupported buttons or pretend provider fixes can happen inline.
- Render-time remote calls: limit inputs to existing DB-backed/provider-state helpers only.
- Audit coverage drift: keep existing provider action audit posture unchanged and document any unavoidable copy-only discrepancy.
Constitution Check
- Inventory-first / stored-truth-first: PASS
- Read/write separation: PASS
- No live provider calls during render: PASS target
- Workspace/environment isolation: PASS target
- Shared pattern first: PASS if current dashboard/operator-guidance shape is reused
- Provider boundary neutrality: PASS if shared copy stays provider-neutral and details keep provider-specific labels
- UI/Productization coverage: PASS once
ui-009,ui-077, and the required UI-audit registry close-out around UI-072/UI-077 are handled - Test governance: PASS with explicit Unit + Feature + Browser split
- Proportionality / anti-bloat: PASS if the guidance layer remains derived-only and no new persisted truth or framework is added
Open Questions
- None blocking prep readiness. The main repo-truth caveat is the missing existing
ui-077-required-permissions.md, which is handled as a create-during-implementation requirement rather than an unresolved product decision.