Enable strictTemplates across frontend packages - #5622
Merged
norman-abramovitz merged 6 commits intoJul 11, 2026
Conversation
Producer-side type corrections (nullable inputs, widened setters that already guarded at runtime), missing standalone component imports, and private->protected for template-read members. Restores endpoint-name uniqueness validation (template typo), the theme selector's current value, and removes a latent null crash on the home endpoint card.
Adds backend-verified Diagnostics.databaseBackend, exports Diagnostics, GitUser.name (GitLab owner mapping), and null-safe git template reads.
Missing AppErrorComponent/card imports, null-safe async reads, and real defect repairs the checker exposed: application-delete rendered blank service-instance names (v2-shape read), the deploy-app branch select wrote '[object Object]' into the model (now ngValue), select-plan lost its card border and accessibility strip, and the unique-name check icon had been dead since the StratosStatus migration.
Missing standalone imports on live routed components, null-safe reads, typed popeye/kube-score report shapes, and a real fix: kubedash config bound raw booleans to an async-piped busy input, so the busy overlay never worked. Removes a provably dead dashboard spinner branch.
Restores the metric chart card broken by the ngx-charts to Chart.js migration: reimplements the doughnut gauge (latest reading vs max, threshold-colored), rewires 11 combo-chart inputs into Chart.js config, and fixes the data-shape mismatch that would throw once metrics arrived. Also form-control null guards and protected template members.
Template expressions are now type-checked; the v2-to-v3 shape bug class (cloudfoundry#5600) can no longer compile silently. Closes cloudfoundry#5618
nabramovitz
marked this pull request as ready for review
July 11, 2026 07:03
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.
Closes #5618.
What
Turns on Angular
strictTemplatesfor every frontend package and fixes the 557 template type errors that flipping the flag surfaced.strictTemplateswas disabled during the Angular 22 + TypeScript 6.0 upgrade so the codebase would compile through the migration (cdaf000); this pays down that debt.Why
Template expressions have never been type-checked while the flag was off. That is exactly how the second defect on #5600 (a template reading the legacy v2
entity.*/metadata.guidshape over a stream now emitting flat v3 rows) compiled clean and survived several v2/ngrx removal sweeps — those scans key on imports, URLs and store APIs, none of which see plain HTML. With the flag on, that whole bug class can no longer compile silently.Shape of the change
Commits are grouped per package for review:
core— nullable inputs, widened setters that already guarded at runtime, missing standalone imports,private→protectedfor template-read membersstore+gitcloud-foundrykubernetescf-autoscaler— includes restoring the metric chart card broken by the earlier ngx-charts→Chart.js migration (gauge + combo-chart inputs reimplemented)The per-package tsconfigs override the root, so each needed the flip; the app build compiles all packages from source, so
core/tsconfig.app.jsonis what actually gates CI.Real defects the checker exposed (fixed here, not silenced)
The point of the flag is catching these, and it did:
binding.serviceInstanceName(never existed) instead ofbinding.serviceInstance.name. The Binding marketplace service instance - Service instances not showing #5600 v2-shape class.existingEndpoinNames$) that silently disabled the check.<select>bound the wholeGitBranchobject with[value](no[ngValue]), so the DOM value was"[object Object]"and overwrote the typed model — branch switching was broken.busyinput piped through| async, so the busy overlay never worked.donestopped matching any state key).No
anyFixes are root-cause: correct the producer type, optional-chain, narrow with
@if, or widen an input that genuinely accepts undefined. No$any()/as any/ blanket non-null assertions were used to reach green.Verification
make check gategreen (3094 tests pass, 0 fail); fullng buildclean with the flag on.Draft
Draft pending live UI verification of the restored cf-autoscaler chart and the deploy branch select.