fix(ui): align OverviewPanelProps compState with ApplicationState — Fix #50 hotfix
The catalyst-ui build started failing on main at f1ed253d (the Fix #50
merge) with TS2322 on AppDetail.tsx:448:
Type 'ApplicationState' is not assignable to type
'{ helmRelease?: string | undefined; ... }'.
Types of property 'helmRelease' are incompatible.
Type 'string | null' is not assignable to type 'string | undefined'.
Root cause: Fix #51 (PR #1273, AppDetail target-state rewrite) declared
OverviewPanelProps.compState with optional `string` fields but passes a
real ApplicationState whose fields are `string | null` per
eventReducer.ts:113. Pre-merge cosmetic-guards CI doesn't run vitest /
tsc-typecheck on PRs — the regression slipped to main between Fix #51
landing and Fix #50 chaining onto it.
Fix: widen OverviewPanelProps.compState fields to `string | null |
undefined` so both the live ApplicationState shape and the synthetic
fixture shape (used by component tests) round-trip cleanly through
strict TS. The downstream usages
(`compState?.helmRelease ?? app.id`, `compState?.chartVersion ? <...>`)
already handle null correctly.
Chart bp-catalyst-platform 1.4.122 → 1.4.123 + bootstrap-kit pin so
Flux re-reconciles the corrected catalyst-ui image SHA.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f1ed253d2f
commit
c34adc2fea
@ -363,7 +363,7 @@ spec:
|
||||
# EnsureOrg / EnsureRepo blocking qa-wp Application reconcile.
|
||||
# bootstrap-kit qaFixtures.cnpgPairName default qa-cnpg → qa-cnpgpair
|
||||
# so TC-306's "cnpgpair" substring assertion passes.
|
||||
version: 1.4.122
|
||||
version: 1.4.123
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: bp-catalyst-platform
|
||||
|
||||
@ -594,9 +594,14 @@ interface OverviewPanelProps {
|
||||
isServiceApp: boolean
|
||||
compState:
|
||||
| {
|
||||
helmRelease?: string
|
||||
namespace?: string
|
||||
chartVersion?: string
|
||||
// Aligned with ApplicationState in eventReducer.ts — those three
|
||||
// fields are `string | null` on the wire (initial-state / unset),
|
||||
// not `string | undefined`. Accepting both keeps OverviewPanel's
|
||||
// signature compatible with both `compState={someApplicationState}`
|
||||
// and the synthetic test-fixture object shape.
|
||||
helmRelease?: string | null
|
||||
namespace?: string | null
|
||||
chartVersion?: string | null
|
||||
}
|
||||
| undefined
|
||||
deps: { id: string; name: string }[]
|
||||
|
||||
@ -1,5 +1,16 @@
|
||||
apiVersion: v2
|
||||
name: bp-catalyst-platform
|
||||
# 1.4.123 (qa-loop iter-12 Fix #50 hotfix): Aligns OverviewPanelProps
|
||||
# `compState` field types with ApplicationState in eventReducer.ts —
|
||||
# helmRelease/namespace/chartVersion are `string | null` on the wire
|
||||
# (initial-state / unset), not `string | undefined`. Without this the
|
||||
# UI image build fails with TS2322 on AppDetail.tsx:448 (regression
|
||||
# introduced by Fix #51 PR #1273 not caught pre-merge by the cosmetic-
|
||||
# guards CI which doesn't run vitest/tsc-typecheck on PRs). Pure type-
|
||||
# signature fix; no behaviour change. Re-bumps the chart so Flux
|
||||
# reconciles the new image SHA the CI sed-bumps in
|
||||
# templates/ui-deployment.yaml.
|
||||
#
|
||||
# 1.4.122 (qa-loop iter-12 Fix #50): Resources surface — wires the
|
||||
# Sovereign Console's /resources family (list / search / apply /
|
||||
# pod-logs) to live cluster data via TanStack Query against the
|
||||
@ -656,7 +667,7 @@ name: bp-catalyst-platform
|
||||
# so the matrix's `kubectl get cnpgpair` stdout contains the literal
|
||||
# "cnpgpair" substring TC-306 asserts on (envsubst override beat the
|
||||
# chart values default fixed in PR #1247).
|
||||
version: 1.4.122
|
||||
version: 1.4.123
|
||||
appVersion: 1.4.94
|
||||
description: |
|
||||
Catalyst Platform — the unified Catalyst control plane umbrella chart for Catalyst-Zero.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user