Repository navigation
feat(37659): frontend limited-mode UI and analytics health gate (FE) - #37957
freddyDOTCMS wants to merge 3 commits into
Conversation
Angular/TypeScript implementation of the limited-mode UI and analytics health response mapping, consuming the new BE gate fields from issue #37659. Analytics portlet: - HealthEntity type updated — adds health field (OK|NOT_CONFIGURED|CONFIGURATION_ERROR); legacy available field preserved for rollback safety - DotAnalyticsService.healthCheck() maps health field first, falls back to available - analyticsHealthGuard now allows on HealthStatusTypes.OK (was AVAILABLE) - dot-analytics-health-check.resolver extracts health field from ExperimentsHealthResponse - 220 tests passing in portlets-dot-analytics-data-access Experiments portlet: - ExperimentsHealthResponse interface added to dot-experiments.service; healthCheck() now returns the full response (tier, freeExperimentUsed, warning) rather than just health - Store: healthResponse replaces healthStatus in state; new computed signals isLimitedMode, isSlotUsed, showAnalyticsWarning drive limited-mode UI - List component: non-closable limited-mode info/warn banner; closable analytics-warning banner; Archive/End/Cancel/Abort show info toast in limited mode instead of disabled state - Configure component: scheduling section blocked (p-blockUI) in limited mode with informational message; scheduling cleared via effect so autosave never sends dates that would cause _start to return SCHEDULED; Start button disabled when slot occupied - Configure header + Results header: Stop Experiment shows info toast in limited mode - 1407 tests passing in portlets-dot-experiments-portlet Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Claude finished @freddyDOTCMS's task in 2m 25s —— View job Code Review — limited-mode UI & analytics health gate (FE)New Issues
Notes
Blocking: the two 🟠 High items (stray |
…igure screen
US2/AC1 — info banner in configure screen:
- Adds a non-dismissable p-message severity="info" above the configure form
when isLimitedMode()=true, showing the limited-mode copy and 10-day cap.
- New i18n key: experiments.limited-mode.configure.info
US2/AC2 — Start confirmation dialog in limited mode:
- When tier=LIMITED and slot is free, onStart() intercepts with a
p-confirmDialog (key: limitedModeStartConfirm) showing the spec-required
message about one free experiment, inability to stop, and upgrade CTA.
- "Continue" dispatches startRequested(); "Cancel" dismisses with no action.
- New i18n keys: experiments.limited-mode.start.confirm.{header,message,accept}
- Adds a second p-confirmDialog to dot-experiments-configure.component.html
with the distinct key so the limited-mode confirm does not collide with
the existing configure-shell confirmation dialogs.
- ConfirmationService added to configure-footer spec providers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The BE now serializes ExperimentsHealthView.Tier as "full"/"limited" and Warning as "analytics_disabled" (lowercase via @jsonvalue). Updates all TypeScript comparisons, the ExperimentsHealthResponse interface, and test mocks to use the lowercase values consistently across the experiments portlet. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Angular/TypeScript implementation of the limited-mode UI and analytics health response mapping. Depends on the BE PR: #37690.
Analytics portlet:
HealthEntitytype updated — addshealthfield (OK|NOT_CONFIGURED|CONFIGURATION_ERROR); legacyavailablefield preserved for rollback safetyDotAnalyticsService.healthCheck()mapshealthfield first, falls back toavailableanalyticsHealthGuardallows onHealthStatusTypes.OK(wasAVAILABLE)healthfield from fullExperimentsHealthResponseto preserve downstream contractExperiments portlet:
ExperimentsHealthResponseinterface —healthCheck()now returnstier,freeExperimentUsed,warningin addition tohealthisLimitedMode,isSlotUsed,showAnalyticsWarningp-blockUIin limited mode with explanatory message; scheduling cleared by effect before_startso the BE sees no dates (prevents SCHEDULED instead of RUNNING)tier=LIMITED && freeExperimentUsed=trueTest plan
pnpm nx test portlets-dot-analytics-data-access— 220 tests passingpnpm nx test portlets-dot-analytics— 335 tests passingpnpm nx test portlets-dot-experiments-portlet— 1407 tests passingFEATURE_FLAG_EXPERIMENTS=false, verify limited-mode banners and blocked actions in the Experiments portletNOT_CONFIGUREDandCONFIGURATION_ERROR🤖 Generated with Claude Code
This PR fixes: #37659