fix(alerts): final sweep — drop ACKNOWLEDGED from AlertStateChip + CMD-K; harden V17 IT
UI: AlertStateChip.LABELS and .COLORS no longer include ACKNOWLEDGED (dropped in V17). AlertStateChip.test.tsx test-cases trimmed to the three remaining states. LayoutShell CMD-K now searches FIRING alerts with acked=false (was state=[FIRING,ACKNOWLEDGED]). Test: V17MigrationIT.open_rule_index_predicate_is_reworked replaced with a structural-only assertion (index exists, indisunique). The pg_get_indexdef pretty-printer varies across Postgres versions, so predicate semantics are verified behaviorally in PostgresAlertInstanceRepositoryIT (findOpenForRule_* + save_rejectsSecondOpenInstanceForSameRuleAndExchange). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,6 @@ describe('AlertStateChip', () => {
|
||||
it.each([
|
||||
['PENDING', /pending/i],
|
||||
['FIRING', /firing/i],
|
||||
['ACKNOWLEDGED', /acknowledged/i],
|
||||
['RESOLVED', /resolved/i],
|
||||
] as const)('renders %s label', (state, pattern) => {
|
||||
renderWithTheme(<AlertStateChip state={state} />);
|
||||
|
||||
@@ -6,14 +6,12 @@ type State = NonNullable<AlertDto['state']>;
|
||||
const LABELS: Record<State, string> = {
|
||||
PENDING: 'Pending',
|
||||
FIRING: 'Firing',
|
||||
ACKNOWLEDGED: 'Acknowledged',
|
||||
RESOLVED: 'Resolved',
|
||||
};
|
||||
|
||||
const COLORS: Record<State, 'auto' | 'success' | 'warning' | 'error'> = {
|
||||
PENDING: 'warning',
|
||||
FIRING: 'error',
|
||||
ACKNOWLEDGED: 'warning',
|
||||
RESOLVED: 'success',
|
||||
};
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ function LayoutContent() {
|
||||
const { data: envRecords = [] } = useEnvironments();
|
||||
|
||||
// Open alerts + rules for CMD-K (env-scoped).
|
||||
const { data: cmdkAlerts } = useAlerts({ state: ['FIRING', 'ACKNOWLEDGED'], limit: 100 });
|
||||
const { data: cmdkAlerts } = useAlerts({ state: ['FIRING'], acked: false, limit: 100 });
|
||||
const { data: cmdkRules } = useAlertRules();
|
||||
|
||||
// Merge environments from both the environments table and agent heartbeats
|
||||
|
||||
Reference in New Issue
Block a user