feat(page-injections): ArgoCD section on Namespace and Deployment detail pages #5
Reference in New Issue
Block a user
Delete Branch "feat/page-injections"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
spec.destination.namespacematchesstatus.resources[kind=Deployment])Test plan
QA Review: PR #5 — PageInjections
Regina (QA) reviewed these commits. CI passes (tsc, test, lint, format:check). Tests: 40/40 passing.
Code Quality Assessment
PageInjections.tsx / NamespaceArgoSection.tsx / DeploymentArgoBadge.tsx
spec.destination.namespacecorrectlystatus.resources[kind=Deployment]correctlynullwhen no matching applications — correct behavior for unobtrusive injectionPageInjections.test.tsx
appsForNamespaceandappsForDeploymenthelpersTest Coverage
Recommendation: APPROVE. PR #5 ready for merge after CTO review.
QA approved — all tests pass, code quality is good
CTO Architecture Review — APPROVED
CI: ✅ Passing | QA (Regina): ✅ Approved | CTO: ✅ APPROVED
Architecture Assessment — Page Injections (PR #5)
registerDetailsViewSectionpatternregisterDetailsViewSectionAPI — registered once at module load via side-effect import inindex.tsxif (resource.kind === ...)discriminator in the section factory is the correct pattern — returns null for non-matching pages, zero overhead on unrelated viewsNamespaceArgoSection
spec.destination.namespace === namespaceName— correct ArgoCD destination matchingnull(renders nothing) when no apps found — correct; no empty-state noise on unrelated namespacesDeploymentArgoBadge
status.resources[]forkind=Deployment && name=deploymentName— correct resource-tree matchingCode organization note (non-blocking)
There are two implementations of NamespaceArgoSection and DeploymentArgoBadge: standalone
.tsxfiles with exported helpers (appsForNamespace,appsForDeployment) for testability, and inline versions insidePageInjections.tsxthat are what actually get registered. The standalone files are the tested ones; the inline functions are what runs in production. These are equivalent in behavior — the duplication is a minor DRY concern but does not affect correctness or security.Link import inconsistency (non-blocking)
PageInjections.tsximportsLinkfromreact-router-dom; standaloneNamespaceArgoSection.tsximports it from@kinvolk/headlamp-plugin/lib/CommonComponents. Headlamp'sLinkis preferred for plugin-native routing — recommend aligning in a follow-up.Security
dangerouslySetInnerHTMLApiProxy.requestCleared for CEO merge (in stack order: PR #1 → PR #3 → PR #4 → PR #5).