@stapel/alerts-react 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -0
- package/LICENSE +21 -0
- package/MODULE.md +140 -0
- package/README.md +147 -0
- package/dist/analytics/events.d.ts +29 -0
- package/dist/analytics/events.d.ts.map +1 -0
- package/dist/analytics/events.js +28 -0
- package/dist/analytics/events.js.map +1 -0
- package/dist/api/alertsApi.d.ts +84 -0
- package/dist/api/alertsApi.d.ts.map +1 -0
- package/dist/api/alertsApi.js +127 -0
- package/dist/api/alertsApi.js.map +1 -0
- package/dist/api/generated/schema.d.ts +453 -0
- package/dist/api/generated/schema.d.ts.map +1 -0
- package/dist/api/generated/schema.js +2 -0
- package/dist/api/generated/schema.js.map +1 -0
- package/dist/api/types.d.ts +78 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +44 -0
- package/dist/api/types.js.map +1 -0
- package/dist/default/FixIssueDialog.d.ts +15 -0
- package/dist/default/FixIssueDialog.d.ts.map +1 -0
- package/dist/default/FixIssueDialog.js +67 -0
- package/dist/default/FixIssueDialog.js.map +1 -0
- package/dist/default/IssueDetail.d.ts +10 -0
- package/dist/default/IssueDetail.d.ts.map +1 -0
- package/dist/default/IssueDetail.js +83 -0
- package/dist/default/IssueDetail.js.map +1 -0
- package/dist/default/IssueFilterBar.d.ts +21 -0
- package/dist/default/IssueFilterBar.d.ts.map +1 -0
- package/dist/default/IssueFilterBar.js +86 -0
- package/dist/default/IssueFilterBar.js.map +1 -0
- package/dist/default/IssuesFeed.d.ts +10 -0
- package/dist/default/IssuesFeed.d.ts.map +1 -0
- package/dist/default/IssuesFeed.js +137 -0
- package/dist/default/IssuesFeed.js.map +1 -0
- package/dist/default/MuteIssueDialog.d.ts +19 -0
- package/dist/default/MuteIssueDialog.d.ts.map +1 -0
- package/dist/default/MuteIssueDialog.js +72 -0
- package/dist/default/MuteIssueDialog.js.map +1 -0
- package/dist/default/index.d.ts +32 -0
- package/dist/default/index.d.ts.map +1 -0
- package/dist/default/index.js +26 -0
- package/dist/default/index.js.map +1 -0
- package/dist/default/labels.d.ts +40 -0
- package/dist/default/labels.d.ts.map +1 -0
- package/dist/default/labels.js +94 -0
- package/dist/default/labels.js.map +1 -0
- package/dist/default/layout.d.ts +32 -0
- package/dist/default/layout.d.ts.map +1 -0
- package/dist/default/layout.js +44 -0
- package/dist/default/layout.js.map +1 -0
- package/dist/default/types.d.ts +27 -0
- package/dist/default/types.d.ts.map +1 -0
- package/dist/default/types.js +2 -0
- package/dist/default/types.js.map +1 -0
- package/dist/flows/errors.d.ts +12 -0
- package/dist/flows/errors.d.ts.map +1 -0
- package/dist/flows/errors.js +13 -0
- package/dist/flows/errors.js.map +1 -0
- package/dist/flows/registry.d.ts +22 -0
- package/dist/flows/registry.d.ts.map +1 -0
- package/dist/flows/registry.js +20 -0
- package/dist/flows/registry.js.map +1 -0
- package/dist/headless/AlertsProvider.d.ts +19 -0
- package/dist/headless/AlertsProvider.d.ts.map +1 -0
- package/dist/headless/AlertsProvider.js +15 -0
- package/dist/headless/AlertsProvider.js.map +1 -0
- package/dist/i18n/errorsMap.d.ts +10 -0
- package/dist/i18n/errorsMap.d.ts.map +1 -0
- package/dist/i18n/errorsMap.js +20 -0
- package/dist/i18n/errorsMap.js.map +1 -0
- package/dist/i18n/es.d.ts +20 -0
- package/dist/i18n/es.d.ts.map +1 -0
- package/dist/i18n/es.js +152 -0
- package/dist/i18n/es.js.map +1 -0
- package/dist/i18n/generated/errors.es.gen.d.ts +9 -0
- package/dist/i18n/generated/errors.es.gen.d.ts.map +1 -0
- package/dist/i18n/generated/errors.es.gen.js +57 -0
- package/dist/i18n/generated/errors.es.gen.js.map +1 -0
- package/dist/i18n/generated/errors.gen.d.ts +323 -0
- package/dist/i18n/generated/errors.gen.d.ts.map +1 -0
- package/dist/i18n/generated/errors.gen.js +165 -0
- package/dist/i18n/generated/errors.gen.js.map +1 -0
- package/dist/i18n/generated/errors.ru.gen.d.ts +9 -0
- package/dist/i18n/generated/errors.ru.gen.d.ts.map +1 -0
- package/dist/i18n/generated/errors.ru.gen.js +57 -0
- package/dist/i18n/generated/errors.ru.gen.js.map +1 -0
- package/dist/i18n/keys.d.ts +164 -0
- package/dist/i18n/keys.d.ts.map +1 -0
- package/dist/i18n/keys.js +300 -0
- package/dist/i18n/keys.js.map +1 -0
- package/dist/i18n/ru.d.ts +27 -0
- package/dist/i18n/ru.d.ts.map +1 -0
- package/dist/i18n/ru.js +159 -0
- package/dist/i18n/ru.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -0
- package/dist/model/context.d.ts +11 -0
- package/dist/model/context.d.ts.map +1 -0
- package/dist/model/context.js +16 -0
- package/dist/model/context.js.map +1 -0
- package/dist/model/issues.d.ts +103 -0
- package/dist/model/issues.d.ts.map +1 -0
- package/dist/model/issues.js +230 -0
- package/dist/model/issues.js.map +1 -0
- package/dist/model/queryKeys.d.ts +11 -0
- package/dist/model/queryKeys.d.ts.map +1 -0
- package/dist/model/queryKeys.js +32 -0
- package/dist/model/queryKeys.js.map +1 -0
- package/dist/model/refusals.d.ts +25 -0
- package/dist/model/refusals.d.ts.map +1 -0
- package/dist/model/refusals.js +73 -0
- package/dist/model/refusals.js.map +1 -0
- package/dist/model/runtime.d.ts +51 -0
- package/dist/model/runtime.d.ts.map +1 -0
- package/dist/model/runtime.js +29 -0
- package/dist/model/runtime.js.map +1 -0
- package/dist/model/status.d.ts +60 -0
- package/dist/model/status.d.ts.map +1 -0
- package/dist/model/status.js +116 -0
- package/dist/model/status.js.map +1 -0
- package/dist/nav/manifest.d.ts +43 -0
- package/dist/nav/manifest.d.ts.map +1 -0
- package/dist/nav/manifest.js +36 -0
- package/dist/nav/manifest.js.map +1 -0
- package/llms.txt +84 -0
- package/manifest.json +694 -0
- package/nav-manifest.json +46 -0
- package/package.json +119 -0
- package/src/analytics/events.ts +29 -0
- package/src/analytics/generated/events.json +7 -0
- package/src/api/alertsApi.ts +259 -0
- package/src/api/generated/schema.ts +455 -0
- package/src/api/types.ts +113 -0
- package/src/default/FixIssueDialog.tsx +158 -0
- package/src/default/IssueDetail.tsx +431 -0
- package/src/default/IssueFilterBar.tsx +197 -0
- package/src/default/IssuesFeed.tsx +343 -0
- package/src/default/MuteIssueDialog.tsx +186 -0
- package/src/default/index.ts +37 -0
- package/src/default/labels.ts +113 -0
- package/src/default/layout.ts +52 -0
- package/src/default/types.ts +27 -0
- package/src/flows/errors.ts +16 -0
- package/src/flows/registry.ts +32 -0
- package/src/headless/AlertsProvider.tsx +20 -0
- package/src/i18n/errorsMap.ts +31 -0
- package/src/i18n/es.ts +181 -0
- package/src/i18n/generated/errors.es.gen.ts +63 -0
- package/src/i18n/generated/errors.gen.ts +196 -0
- package/src/i18n/generated/errors.json +370 -0
- package/src/i18n/generated/errors.ru.gen.ts +63 -0
- package/src/i18n/keys.ts +341 -0
- package/src/i18n/ru.ts +188 -0
- package/src/index.ts +152 -0
- package/src/model/context.tsx +28 -0
- package/src/model/issues.ts +311 -0
- package/src/model/queryKeys.ts +41 -0
- package/src/model/refusals.ts +82 -0
- package/src/model/runtime.ts +80 -0
- package/src/model/status.ts +179 -0
- package/src/nav/manifest.ts +76 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire types for the stapel-alerts HTTP contract — **derived from the generated
|
|
3
|
+
* OpenAPI surface** (frontend-standard §2/§3), never hand-maintained. The one
|
|
4
|
+
* source of truth is `components["schemas"]` in this pair's own package-LOCAL
|
|
5
|
+
* generated schema (`./generated/schema.js`, produced by `pnpm gen:api` from
|
|
6
|
+
* stapel-alerts's own committed `docs/schema.json`).
|
|
7
|
+
*
|
|
8
|
+
* ── The page envelope comes from the schema, and is still proven on the wire ─
|
|
9
|
+
*
|
|
10
|
+
* `GET /issues` answers {@link IssuePage} — `{count, offset, limit, results}`
|
|
11
|
+
* — and the schema says so: the view renders its response THROUGH the
|
|
12
|
+
* envelope serializer and declares it as the response, so the declaration
|
|
13
|
+
* and the body cannot drift apart. `test/pair.test.ts` still drives the real
|
|
14
|
+
* envelope through the real transport, because a generated type is a
|
|
15
|
+
* statement about the contract and the wire is what a screen reads.
|
|
16
|
+
*
|
|
17
|
+
* ── The three enums come from the schema and are not re-narrowed ──────────
|
|
18
|
+
*
|
|
19
|
+
* `level`, `kind` and `status` are real `enum`s in the contract, so the
|
|
20
|
+
* generated unions are the narrowing. What this module adds is the ORDERED
|
|
21
|
+
* tuples a screen iterates (a filter bar, a legend): declaration order in a
|
|
22
|
+
* generated file is alphabetical-ish and meaningless, while `debug → fatal` is
|
|
23
|
+
* a severity ramp somebody reads top to bottom.
|
|
24
|
+
*/
|
|
25
|
+
import type { components } from "./generated/schema.js";
|
|
26
|
+
/** The generated schema table — the one source of truth for wire shapes. */
|
|
27
|
+
export type Schemas = components["schemas"];
|
|
28
|
+
/** The tracker row: one bug, with the status a fix wave reconciles against. */
|
|
29
|
+
export type Issue = Schemas["Issue"];
|
|
30
|
+
/** One issue plus its last events (`views.DETAIL_EVENTS` = 20 of them). */
|
|
31
|
+
export type IssueDetail = Schemas["IssueDetail"];
|
|
32
|
+
/** One occurrence: the trace, the redacted context, the correlation id. */
|
|
33
|
+
export type ErrorEvent = Schemas["ErrorEvent"];
|
|
34
|
+
/** The body `PATCH /issues/{id}` takes. */
|
|
35
|
+
export type IssuePatch = Schemas["PatchedIssuePatch"];
|
|
36
|
+
/** The body `POST /issues/{id}/fix` takes — both fields optional, both kept. */
|
|
37
|
+
export type IssueFix = Schemas["IssueFix"];
|
|
38
|
+
/** Severity, as the backend's `Level` choices spell it. */
|
|
39
|
+
export type IssueLevel = Schemas["LevelEnum"];
|
|
40
|
+
/** Where an occurrence came from (`Kind` choices). */
|
|
41
|
+
export type IssueKind = Schemas["KindEnum"];
|
|
42
|
+
/** Where an issue is in its life — including the one nobody may assign. */
|
|
43
|
+
export type IssueStatus = Schemas["Status295Enum"];
|
|
44
|
+
/** The statuses a CALLER may assign (`serializers.SETTABLE_STATUSES`). */
|
|
45
|
+
export type SettableIssueStatus = Schemas["IssuePatchStatusEnum"];
|
|
46
|
+
/**
|
|
47
|
+
* A page of the triage list — `{count, offset, limit, results}`.
|
|
48
|
+
*
|
|
49
|
+
* `limit` is the page size the server APPLIED, not the one asked for: `?limit=`
|
|
50
|
+
* is clamped to 1..200 (default 50) and echoed back, so a caller pages by the
|
|
51
|
+
* echoed value and never by its own request.
|
|
52
|
+
*/
|
|
53
|
+
export type IssuePage = Schemas["IssuePage"];
|
|
54
|
+
/**
|
|
55
|
+
* Severity, weakest first. The order is the whole point: a filter bar built
|
|
56
|
+
* from `Object.keys` of a generated type puts `debug` next to `fatal` in
|
|
57
|
+
* whatever order the emitter felt like.
|
|
58
|
+
*/
|
|
59
|
+
export declare const ISSUE_LEVELS: readonly IssueLevel[];
|
|
60
|
+
/** The four statuses an issue can be in, in lifecycle order. */
|
|
61
|
+
export declare const ISSUE_STATUSES: readonly IssueStatus[];
|
|
62
|
+
/**
|
|
63
|
+
* The three a caller may ASSERT.
|
|
64
|
+
*
|
|
65
|
+
* `regressed` is absent, and not by omission: the store sets it when a fixed
|
|
66
|
+
* issue receives a new event (`services.record`), and a caller able to set it
|
|
67
|
+
* would be a caller able to decline to. `POST`ing it back answers
|
|
68
|
+
* `error.400.alerts_status_not_settable`, so a control offering it would exist
|
|
69
|
+
* only to be refused.
|
|
70
|
+
*/
|
|
71
|
+
export declare const SETTABLE_ISSUE_STATUSES: readonly SettableIssueStatus[];
|
|
72
|
+
/** Statuses the backend counts as open (`models.OPEN_STATUSES`). */
|
|
73
|
+
export declare const OPEN_ISSUE_STATUSES: readonly IssueStatus[];
|
|
74
|
+
/** Is this one of the statuses `PATCH /issues/{id}` accepts? */
|
|
75
|
+
export declare function isSettableStatus(value: string): value is SettableIssueStatus;
|
|
76
|
+
/** Is this issue one the store still considers unresolved? */
|
|
77
|
+
export declare function isOpenStatus(value: string): boolean;
|
|
78
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,4EAA4E;AAC5E,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;AAE5C,+EAA+E;AAC/E,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAErC,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAEjD,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;AAE/C,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAEtD,gFAAgF;AAChF,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,2DAA2D;AAC3D,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAE9C,sDAAsD;AACtD,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAE5C,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAEnD,0EAA0E;AAC1E,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EAM7C,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAKhD,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,mBAAmB,EAIjE,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,mBAAmB,EAAE,SAAS,WAAW,EAAyB,CAAC;AAEhF,gEAAgE;AAChE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,mBAAmB,CAE5E;AAED,8DAA8D;AAC9D,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEnD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Severity, weakest first. The order is the whole point: a filter bar built
|
|
3
|
+
* from `Object.keys` of a generated type puts `debug` next to `fatal` in
|
|
4
|
+
* whatever order the emitter felt like.
|
|
5
|
+
*/
|
|
6
|
+
export const ISSUE_LEVELS = [
|
|
7
|
+
"debug",
|
|
8
|
+
"info",
|
|
9
|
+
"warning",
|
|
10
|
+
"error",
|
|
11
|
+
"fatal",
|
|
12
|
+
];
|
|
13
|
+
/** The four statuses an issue can be in, in lifecycle order. */
|
|
14
|
+
export const ISSUE_STATUSES = [
|
|
15
|
+
"new",
|
|
16
|
+
"regressed",
|
|
17
|
+
"fixed",
|
|
18
|
+
"muted",
|
|
19
|
+
];
|
|
20
|
+
/**
|
|
21
|
+
* The three a caller may ASSERT.
|
|
22
|
+
*
|
|
23
|
+
* `regressed` is absent, and not by omission: the store sets it when a fixed
|
|
24
|
+
* issue receives a new event (`services.record`), and a caller able to set it
|
|
25
|
+
* would be a caller able to decline to. `POST`ing it back answers
|
|
26
|
+
* `error.400.alerts_status_not_settable`, so a control offering it would exist
|
|
27
|
+
* only to be refused.
|
|
28
|
+
*/
|
|
29
|
+
export const SETTABLE_ISSUE_STATUSES = [
|
|
30
|
+
"new",
|
|
31
|
+
"fixed",
|
|
32
|
+
"muted",
|
|
33
|
+
];
|
|
34
|
+
/** Statuses the backend counts as open (`models.OPEN_STATUSES`). */
|
|
35
|
+
export const OPEN_ISSUE_STATUSES = ["new", "regressed"];
|
|
36
|
+
/** Is this one of the statuses `PATCH /issues/{id}` accepts? */
|
|
37
|
+
export function isSettableStatus(value) {
|
|
38
|
+
return SETTABLE_ISSUE_STATUSES.includes(value);
|
|
39
|
+
}
|
|
40
|
+
/** Is this issue one the store still considers unresolved? */
|
|
41
|
+
export function isOpenStatus(value) {
|
|
42
|
+
return OPEN_ISSUE_STATUSES.includes(value);
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAiEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAA0B;IACjD,OAAO;IACP,MAAM;IACN,SAAS;IACT,OAAO;IACP,OAAO;CACR,CAAC;AAEF,gEAAgE;AAChE,MAAM,CAAC,MAAM,cAAc,GAA2B;IACpD,KAAK;IACL,WAAW;IACX,OAAO;IACP,OAAO;CACR,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAmC;IACrE,KAAK;IACL,OAAO;IACP,OAAO;CACR,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,mBAAmB,GAA2B,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;AAEhF,gEAAgE;AAChE,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,OAAQ,uBAA6C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACxE,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAQ,mBAAyC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { IssueLevel } from "../api/types.js";
|
|
3
|
+
import type { ThemeModeProp } from "./types.js";
|
|
4
|
+
export interface FixIssueDialogProps extends ThemeModeProp {
|
|
5
|
+
readonly open: boolean;
|
|
6
|
+
readonly onClose: () => void;
|
|
7
|
+
readonly issueId: string;
|
|
8
|
+
/** The row's level — the analytics prop only; it never reaches the wire. */
|
|
9
|
+
readonly level?: IssueLevel;
|
|
10
|
+
/** Called after the store has saved the close. */
|
|
11
|
+
readonly onFixed?: () => void;
|
|
12
|
+
readonly testId?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function FixIssueDialog(props: FixIssueDialogProps): ReactElement;
|
|
15
|
+
//# sourceMappingURL=FixIssueDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixIssueDialog.d.ts","sourceRoot":"","sources":["../../src/default/FixIssueDialog.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIlD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAcvE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* `<FixIssueDialog>` — close an issue with the release that claims the fix.
|
|
4
|
+
*
|
|
5
|
+
* ── Both fields are optional, and the dialog says what that costs ─────────
|
|
6
|
+
*
|
|
7
|
+
* `POST /issues/{id}/fix` takes `version` and `sha`, both optional, both
|
|
8
|
+
* recorded. An issue closed with neither is still closed — just useless the
|
|
9
|
+
* day it regresses and somebody asks which deploy was supposed to have
|
|
10
|
+
* stopped it. So the submit is never blocked; the consequence is stated in one
|
|
11
|
+
* line under the fields, and only while both are empty.
|
|
12
|
+
*
|
|
13
|
+
* That is the difference between a form that refuses and a form that informs.
|
|
14
|
+
* A CI caller has a sha, a person closing a hotfix by hand may have only a
|
|
15
|
+
* version, and a person closing a duplicate has neither — refusing the third
|
|
16
|
+
* would make the tracker lie about what is still open, which is the one thing
|
|
17
|
+
* it exists not to do.
|
|
18
|
+
*
|
|
19
|
+
* ── The endpoint is `/fix`, not `PATCH {status: "fixed"}` ─────────────────
|
|
20
|
+
*
|
|
21
|
+
* Only the POST records the release AND zeroes `count_since_fix`, and that
|
|
22
|
+
* counter is the entire answer to "did it come back?". See `model/status.ts`.
|
|
23
|
+
*
|
|
24
|
+
* ── The body only exists while the dialog is open ─────────────────────────
|
|
25
|
+
*
|
|
26
|
+
* The form is a separate component rendered under `open`, so closing it drops
|
|
27
|
+
* the typed version, the typed sha AND the mutation's error together. The
|
|
28
|
+
* alternative — an effect that resets three pieces of state — is a render loop
|
|
29
|
+
* waiting for a dependency array to be wrong, and a half-filled form that
|
|
30
|
+
* survives off-screen is the bug that shape produces when it does not loop.
|
|
31
|
+
*/
|
|
32
|
+
import { useState } from "react";
|
|
33
|
+
import { Flex, Input, Typography } from "antd";
|
|
34
|
+
import { spacing } from "@stapel/tokens";
|
|
35
|
+
import { ErrorAlert, SkinButton, SkinDialog } from "@stapel/tokens-antd/skin";
|
|
36
|
+
import { useT } from "@stapel/core";
|
|
37
|
+
import { useIssueStatus } from "../model/status.js";
|
|
38
|
+
import { ALERTS_I18N_KEYS } from "../i18n/keys.js";
|
|
39
|
+
import { DIALOG_ACTION_BAR_STYLE } from "./layout.js";
|
|
40
|
+
export function FixIssueDialog(props) {
|
|
41
|
+
const t = useT();
|
|
42
|
+
const testId = props.testId ?? "alerts-fix";
|
|
43
|
+
return (_jsx(SkinDialog, { open: props.open, onClose: props.onClose, title: t(ALERTS_I18N_KEYS.fixTitle), dismissLabel: t(ALERTS_I18N_KEYS.dismiss), "data-testid": testId, children: props.open ? _jsx(FixIssueForm, { ...props, testId: testId }) : null }));
|
|
44
|
+
}
|
|
45
|
+
function FixIssueForm(props) {
|
|
46
|
+
const t = useT();
|
|
47
|
+
const { testId } = props;
|
|
48
|
+
const { fix } = useIssueStatus();
|
|
49
|
+
const [version, setVersion] = useState("");
|
|
50
|
+
const [sha, setSha] = useState("");
|
|
51
|
+
const blank = version.trim().length === 0 && sha.trim().length === 0;
|
|
52
|
+
const submit = () => {
|
|
53
|
+
fix.mutate({
|
|
54
|
+
issueId: props.issueId,
|
|
55
|
+
version: version.trim(),
|
|
56
|
+
sha: sha.trim(),
|
|
57
|
+
...(props.level !== undefined ? { level: props.level } : {}),
|
|
58
|
+
}, {
|
|
59
|
+
onSuccess: () => {
|
|
60
|
+
props.onFixed?.();
|
|
61
|
+
props.onClose();
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
return (_jsxs(Flex, { vertical: true, gap: spacing[3], children: [_jsx(Typography.Text, { type: "secondary", children: t(ALERTS_I18N_KEYS.fixBody) }), _jsxs(Flex, { vertical: true, gap: spacing[1], children: [_jsx(Typography.Text, { strong: true, children: t(ALERTS_I18N_KEYS.fixVersion) }), _jsx(Input, { value: version, "aria-label": t(ALERTS_I18N_KEYS.fixVersion), placeholder: t(ALERTS_I18N_KEYS.fixVersionHint), "data-testid": `${testId}-version`, maxLength: 64, onChange: (event) => setVersion(event.target.value) })] }), _jsxs(Flex, { vertical: true, gap: spacing[1], children: [_jsx(Typography.Text, { strong: true, children: t(ALERTS_I18N_KEYS.fixSha) }), _jsx(Input, { value: sha, "aria-label": t(ALERTS_I18N_KEYS.fixSha), placeholder: t(ALERTS_I18N_KEYS.fixShaHint), "data-testid": `${testId}-sha`, maxLength: 64, onChange: (event) => setSha(event.target.value) })] }), blank ? (_jsx(Typography.Text, { type: "warning", "data-testid": `${testId}-blank`, children: t(ALERTS_I18N_KEYS.fixBlank) })) : null, _jsx(ErrorAlert, { testId: `${testId}-failed`, thrown: fix.error, variant: "inline" }), _jsxs(Flex, { gap: spacing[2], justify: "end", style: DIALOG_ACTION_BAR_STYLE, children: [_jsx(SkinButton, { "data-testid": `${testId}-cancel`, "data-analytics": "none", "data-analytics-reason": "dismissing a dialog decides nothing about the issue", onClick: props.onClose, children: t(ALERTS_I18N_KEYS.cancel) }), _jsx(SkinButton, { type: "primary", loading: fix.isPending, "data-testid": `${testId}-submit`, "data-analytics": "none", "data-analytics-reason": "alerts.issue.fixed is emitted by the model layer on success", onClick: submit, children: t(ALERTS_I18N_KEYS.fixSubmit) })] })] }));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=FixIssueDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FixIssueDialog.js","sourceRoot":"","sources":["../../src/default/FixIssueDialog.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBA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AM,CAAC,EACtC,WAAW,EAAE,CAAC,CAAC,gBAAgB,CAAC,UAAU,CAAC,iBAC9B,GAAG,MAAM,MAAM,EAC5B,SAAS,EAAE,EAAE,EACb,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAC/C,IACG,EAEN,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,UAAU,CAAC,IAAI,IAAC,IAAI,EAAC,SAAS,iBAAc,GAAG,MAAM,QAAQ,YAC3D,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GACb,CACnB,CAAC,CAAC,CAAC,IAAI,EAER,KAAC,UAAU,IAAC,MAAM,EAAE,GAAG,MAAM,SAAS,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,OAAO,EAAC,QAAQ,GAAG,EAE9E,MAAC,IAAI,IAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAC,KAAK,EAAC,KAAK,EAAE,uBAAuB,aACjE,KAAC,UAAU,mBACI,GAAG,MAAM,SAAS,oBAChB,MAAM,2BACC,qDAAqD,EAC3E,OAAO,EAAE,KAAK,CAAC,OAAO,YAErB,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,GAChB,EACb,KAAC,UAAU,IACT,IAAI,EAAC,SAAS,EACd,OAAO,EAAE,GAAG,CAAC,SAAS,iBACT,GAAG,MAAM,SAAS,oBAChB,MAAM,2BACC,6DAA6D,EACnF,OAAO,EAAE,MAAM,YAEd,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,GACnB,IACR,IACF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { ThemeModeProp } from "./types.js";
|
|
3
|
+
export interface IssueDetailProps extends ThemeModeProp {
|
|
4
|
+
readonly issueId: string;
|
|
5
|
+
/** The way back to the feed, if the host has one. */
|
|
6
|
+
readonly onBack?: () => void;
|
|
7
|
+
readonly testId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function IssueDetail(props: IssueDetailProps): ReactElement;
|
|
10
|
+
//# sourceMappingURL=IssueDetail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueDetail.d.ts","sourceRoot":"","sources":["../../src/default/IssueDetail.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,OAAO,CAAC;AA2BrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAgBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CA6VjE"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* `<IssueDetail>` — one bug, everything the store knows about it, and the
|
|
4
|
+
* three judgements an operator can record.
|
|
5
|
+
*
|
|
6
|
+
* ── The events are a SAMPLE, and the screen says so ───────────────────────
|
|
7
|
+
*
|
|
8
|
+
* The detail carries the last 20 occurrences; `count` carries all of them, and
|
|
9
|
+
* retention sweeps events long before it would touch an open issue. A list of
|
|
10
|
+
* twenty with a count of forty thousand beside it is not a contradiction and
|
|
11
|
+
* must not read as one, so the heading states the relationship in words.
|
|
12
|
+
*
|
|
13
|
+
* ── The traceback is behind an expander, not in the page ──────────────────
|
|
14
|
+
*
|
|
15
|
+
* A Django traceback is routinely sixty frames. Three of them inline and every
|
|
16
|
+
* control on this screen is below the fold, which on the screen somebody opened
|
|
17
|
+
* to CLOSE a bug is the whole point missed. Each occurrence is a collapsed row
|
|
18
|
+
* carrying its own trace and its own context.
|
|
19
|
+
*
|
|
20
|
+
* ── `regressed` is reported, never offered ───────────────────────────────
|
|
21
|
+
*
|
|
22
|
+
* The store sets it when a fixed issue receives a new event. The notice names
|
|
23
|
+
* the release that was supposed to have stopped it, because that — and not the
|
|
24
|
+
* status word — is what somebody needs in order to act.
|
|
25
|
+
*
|
|
26
|
+
* ── Three refusals, three sentences ───────────────────────────────────────
|
|
27
|
+
*
|
|
28
|
+
* 403 is "wrong account", 401 is "sign in again", 404 is "no such issue, and
|
|
29
|
+
* here is why that can happen": a closed issue with no events left IS swept,
|
|
30
|
+
* while an open one never is. Anything else is a read failure with a retry.
|
|
31
|
+
*/
|
|
32
|
+
import { useState } from "react";
|
|
33
|
+
import { Card, Collapse, Flex, Typography } from "antd";
|
|
34
|
+
import { spacing } from "@stapel/tokens";
|
|
35
|
+
import { EmptyState, ErrorAlert, LoadBoundary, Page, SkinButton, SkinConfirm, StatusTag, } from "@stapel/tokens-antd/skin";
|
|
36
|
+
import { useFormat, useT } from "@stapel/core";
|
|
37
|
+
import { useIssue } from "../model/issues.js";
|
|
38
|
+
import { useIssueStatus } from "../model/status.js";
|
|
39
|
+
import { isAlertsStaffOnly, isAlertsUnauthorized, isIssueNotFound, } from "../model/refusals.js";
|
|
40
|
+
import { useAlertsRuntime } from "../model/context.js";
|
|
41
|
+
import { ALERTS_I18N_KEYS } from "../i18n/keys.js";
|
|
42
|
+
import { FixIssueDialog } from "./FixIssueDialog.js";
|
|
43
|
+
import { MuteIssueDialog } from "./MuteIssueDialog.js";
|
|
44
|
+
import { kindKey, levelFamily, levelKey, statusFamily, statusKey } from "./labels.js";
|
|
45
|
+
import { TRACE_BLOCK_STYLE } from "./layout.js";
|
|
46
|
+
/** One label/value pair of the meta block. Absent values render the dash. */
|
|
47
|
+
function Field(props) {
|
|
48
|
+
return (_jsxs(Flex, { vertical: true, style: { minWidth: "12rem" }, "data-testid": props.testId, children: [_jsx(Typography.Text, { type: "secondary", children: props.label }), _jsx(Typography.Text, { children: props.children })] }));
|
|
49
|
+
}
|
|
50
|
+
export function IssueDetail(props) {
|
|
51
|
+
const t = useT();
|
|
52
|
+
const fmt = useFormat();
|
|
53
|
+
const runtime = useAlertsRuntime();
|
|
54
|
+
const testId = props.testId ?? "alerts-issue";
|
|
55
|
+
const bag = useIssue(props.issueId);
|
|
56
|
+
const { reopen } = useIssueStatus();
|
|
57
|
+
const [fixing, setFixing] = useState(false);
|
|
58
|
+
const [muting, setMuting] = useState(false);
|
|
59
|
+
const [reopening, setReopening] = useState(false);
|
|
60
|
+
const absent = t(ALERTS_I18N_KEYS.none);
|
|
61
|
+
const text = (value) => (value.length > 0 ? value : absent);
|
|
62
|
+
const meta = (issue) => (_jsxs(Card, { size: "small", "data-testid": `${testId}-meta`, children: [_jsxs(Flex, { gap: spacing[4], wrap: true, children: [_jsx(Field, { label: t(ALERTS_I18N_KEYS.detailService), children: issue.service }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailEnvironment), children: text(issue.environment) }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailKind), children: t(kindKey(issue.kind), { kind: issue.kind }) }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailCount), testId: `${testId}-count`, children: String(issue.count) }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailSinceFix), children: String(issue.count_since_fix) }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailFirstSeen), children: fmt.timestamp(issue.first_seen) ?? absent }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailLastSeen), children: fmt.timestamp(issue.last_seen) ?? absent }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailFingerprint), children: text(issue.fingerprint) }), issue.fixed_in_version.length > 0 ? (_jsx(Field, { label: t(ALERTS_I18N_KEYS.detailFixedIn), testId: `${testId}-fixed-version`, children: issue.fixed_in_version })) : null, issue.fixed_in_sha.length > 0 ? (_jsx(Field, { label: t(ALERTS_I18N_KEYS.detailFixedSha), testId: `${testId}-fixed-sha`, children: runtime.commitRefUrl === undefined ? (issue.fixed_in_sha) : (_jsx(Typography.Link, { href: runtime.commitRefUrl(issue.fixed_in_sha), target: "_blank", rel: "noreferrer", children: issue.fixed_in_sha })) })) : null, issue.fixed_at !== null ? (_jsx(Field, { label: t(ALERTS_I18N_KEYS.detailFixedAt), children: fmt.timestamp(issue.fixed_at) ?? absent })) : null, issue.status === "muted" ? (_jsx(Field, { label: t(ALERTS_I18N_KEYS.detailMutedUntil), testId: `${testId}-muted-until`, children: issue.muted_until === null
|
|
63
|
+
? t(ALERTS_I18N_KEYS.detailMutedForever)
|
|
64
|
+
: (fmt.timestamp(issue.muted_until) ?? absent) })) : null, issue.sentry_event_id.length > 0 ? (_jsx(Field, { label: t(ALERTS_I18N_KEYS.detailSentry), children: issue.sentry_event_id })) : null] }), issue.note.length > 0 ? (_jsxs(Flex, { vertical: true, style: { marginBlockStart: spacing[3] }, children: [_jsx(Typography.Text, { type: "secondary", children: t(ALERTS_I18N_KEYS.detailNote) }), _jsx(Typography.Paragraph, { "data-testid": `${testId}-note`, children: issue.note })] })) : null] }));
|
|
65
|
+
const event = (row) => (_jsxs(Flex, { vertical: true, gap: spacing[2], children: [_jsxs(Flex, { gap: spacing[4], wrap: true, children: [_jsx(Field, { label: t(ALERTS_I18N_KEYS.detailReceivedAt), children: fmt.timestamp(row.received_at) ?? absent }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailRelease), children: text(row.release) }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailRequestPath), children: text(row.request_path) }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailTraceId), children: text(row.trace_id) }), _jsx(Field, { label: t(ALERTS_I18N_KEYS.detailOccurrences), children: String(row.occurrences) })] }), _jsx(Typography.Text, { strong: true, children: t(ALERTS_I18N_KEYS.detailTrace) }), row.trace.length > 0 ? (_jsx("pre", { style: TRACE_BLOCK_STYLE, "data-testid": `${testId}-trace-${row.id}`, children: row.trace })) : (_jsx(Typography.Text, { type: "secondary", children: t(ALERTS_I18N_KEYS.detailNoTrace) })), _jsx(Typography.Text, { strong: true, children: t(ALERTS_I18N_KEYS.detailContext) }), row.context === null || row.context === undefined ? (_jsx(Typography.Text, { type: "secondary", children: t(ALERTS_I18N_KEYS.detailNoContext) })) : (_jsx("pre", { style: TRACE_BLOCK_STYLE, "data-testid": `${testId}-context-${row.id}`, children: JSON.stringify(row.context, null, 2) })), _jsx(Typography.Text, { type: "secondary", children: t(ALERTS_I18N_KEYS.detailRedacted) })] }));
|
|
66
|
+
return (_jsx(Page, { title: t(ALERTS_I18N_KEYS.detailTitle), "data-testid": testId, ...(props.mode !== undefined ? { mode: props.mode } : {}), ...(props.onBack !== undefined
|
|
67
|
+
? {
|
|
68
|
+
actions: (_jsx(SkinButton, { size: "small", "data-testid": `${testId}-back`, "data-analytics": "none", "data-analytics-reason": "navigation back to the board decides nothing", onClick: props.onBack, children: t(ALERTS_I18N_KEYS.feedTitle) })),
|
|
69
|
+
}
|
|
70
|
+
: {}), children: _jsx(LoadBoundary, { state: bag.state, testId: testId, onRetry: bag.refetch, failed: (error) => isAlertsStaffOnly(error) ? (_jsx(EmptyState, { testId: `${testId}-staff-only`, title: t(ALERTS_I18N_KEYS.feedStaffOnly), hint: t(ALERTS_I18N_KEYS.feedStaffOnlyHint) })) : isAlertsUnauthorized(error) ? (_jsx(EmptyState, { testId: `${testId}-signed-out`, title: t(ALERTS_I18N_KEYS.feedSignedOut), hint: t(ALERTS_I18N_KEYS.feedSignedOutHint) })) : isIssueNotFound(error) ? (_jsx(EmptyState, { testId: `${testId}-not-found`, title: t(ALERTS_I18N_KEYS.detailNotFound), hint: t(ALERTS_I18N_KEYS.detailNotFoundHint) })) : (_jsx(ErrorAlert, { testId: `${testId}-failed`, thrown: error, message: t(ALERTS_I18N_KEYS.detailFailed), onRetry: bag.refetch })), children: (issue) => (_jsxs(Flex, { vertical: true, gap: spacing[4], children: [_jsxs(Flex, { vertical: true, gap: spacing[2], children: [_jsxs(Flex, { gap: spacing[2], wrap: true, align: "center", children: [_jsx(StatusTag, { status: levelFamily(issue.level), testId: `${testId}-level`, children: t(levelKey(issue.level), { level: issue.level }) }), _jsx(StatusTag, { status: statusFamily(issue.status), testId: `${testId}-status`, children: t(statusKey(issue.status), { status: issue.status }) })] }), _jsx(Typography.Title, { level: 4, "data-testid": `${testId}-title`, children: issue.title }), _jsx(Typography.Text, { type: "secondary", "data-testid": `${testId}-culprit`, children: text(issue.culprit) })] }), issue.status === "regressed" ? (_jsx(ErrorAlert, { testId: `${testId}-regressed`, message: t(ALERTS_I18N_KEYS.detailRegressed), detail: t(ALERTS_I18N_KEYS.detailRegressedHint, {
|
|
71
|
+
version: issue.fixed_in_version.length > 0
|
|
72
|
+
? issue.fixed_in_version
|
|
73
|
+
: absent,
|
|
74
|
+
}) })) : null, meta(issue), _jsxs(Flex, { gap: spacing[2], wrap: true, children: [_jsx(SkinButton, { type: "primary", "data-testid": `${testId}-mark-fixed`, "data-analytics": "none", "data-analytics-reason": "opens the fix dialog; the event is emitted when the store saves", onClick: () => setFixing(true), children: t(ALERTS_I18N_KEYS.detailMarkFixed) }), _jsx(SkinButton, { "data-testid": `${testId}-mute`, "data-analytics": "none", "data-analytics-reason": "opens the mute dialog; the event is emitted when the store saves", onClick: () => setMuting(true), children: t(ALERTS_I18N_KEYS.detailMute) }), issue.status === "new" ? null : (_jsx(SkinButton, { "data-testid": `${testId}-reopen`, "data-analytics": "none", "data-analytics-reason": "opens a confirm; the event is emitted when the store saves", onClick: () => setReopening(true), children: t(ALERTS_I18N_KEYS.detailReopen) }))] }), _jsx(ErrorAlert, { testId: `${testId}-reopen-failed`, thrown: reopen.error, variant: "inline" }), _jsx(Card, { size: "small", title: t(ALERTS_I18N_KEYS.detailEvents), "data-testid": `${testId}-events`, extra: _jsx(Typography.Text, { type: "secondary", children: t(ALERTS_I18N_KEYS.detailEventsHint, {
|
|
75
|
+
shown: issue.events.length,
|
|
76
|
+
count: issue.count,
|
|
77
|
+
}) }), children: issue.events.length === 0 ? (_jsx(EmptyState, { compact: true, testId: `${testId}-events-empty`, title: t(ALERTS_I18N_KEYS.detailEventsEmpty), hint: t(ALERTS_I18N_KEYS.detailEventsEmptyHint) })) : (_jsx(Collapse, { size: "small", ghost: true, items: issue.events.map((row) => ({
|
|
78
|
+
key: row.id,
|
|
79
|
+
label: `${fmt.relative(row.received_at) ?? absent} · ${text(row.message)}`,
|
|
80
|
+
children: event(row),
|
|
81
|
+
})) })) }), _jsx(FixIssueDialog, { open: fixing, onClose: () => setFixing(false), issueId: issue.id, level: issue.level, testId: `${testId}-fix`, ...(props.mode !== undefined ? { mode: props.mode } : {}) }), _jsx(MuteIssueDialog, { open: muting, onClose: () => setMuting(false), issueId: issue.id, level: issue.level, testId: `${testId}-mute-dialog`, ...(props.mode !== undefined ? { mode: props.mode } : {}) }), _jsx(SkinConfirm, { open: reopening, onCancel: () => setReopening(false), onConfirm: () => reopen.mutate({ issueId: issue.id, level: issue.level }, { onSuccess: () => setReopening(false) }), title: t(ALERTS_I18N_KEYS.detailReopen), body: t(ALERTS_I18N_KEYS.detailReopenConfirm), confirmLabel: t(ALERTS_I18N_KEYS.detailReopen), cancelLabel: t(ALERTS_I18N_KEYS.cancel), confirming: reopen.isPending, "data-testid": `${testId}-reopen-confirm` })] })) }) }));
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=IssueDetail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueDetail.js","sourceRoot":"","sources":["../../src/default/IssueDetail.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,OAAO,EAA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,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAC/B,OAAO,EAAE,KAAK,CAAC,EAAE,EACjB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,GAAG,MAAM,cAAc,KAC3B,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAC1D,EACF,KAAC,WAAW,IACV,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EACnC,SAAS,EAAE,GAAG,EAAE,CACd,MAAM,CAAC,MAAM,CACX,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EACzC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CACzC,EAEH,KAAK,EAAE,CAAC,CAAC,gBAAgB,CAAC,YAAY,CAAC,EACvC,IAAI,EAAE,CAAC,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAC7C,YAAY,EAAE,CAAC,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAC9C,WAAW,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,EACvC,UAAU,EAAE,MAAM,CAAC,SAAS,iBACf,GAAG,MAAM,iBAAiB,GACvC,IACG,CACR,GACY,GACV,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { IssueFeedFilters } from "../model/issues.js";
|
|
3
|
+
import type { ThemeModeProp } from "./types.js";
|
|
4
|
+
/** The four windows the bar offers. `any` sends no `since` at all. */
|
|
5
|
+
export type SincePreset = "any" | "day" | "week" | "month";
|
|
6
|
+
/** The instant a preset means, taken from the clock at the moment of the choice. */
|
|
7
|
+
export declare function sinceFor(preset: SincePreset, now?: Date): string | undefined;
|
|
8
|
+
export interface IssueFilterBarProps extends ThemeModeProp {
|
|
9
|
+
readonly value: IssueFeedFilters;
|
|
10
|
+
readonly onChange: (next: IssueFeedFilters) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The services to offer. The tracker serves no service registry, so this is
|
|
13
|
+
* whatever the caller can see — `<IssuesFeed>` passes the services present
|
|
14
|
+
* in the page it has. A service that has never failed is therefore absent,
|
|
15
|
+
* which is correct: there is nothing to filter to.
|
|
16
|
+
*/
|
|
17
|
+
readonly services?: readonly string[];
|
|
18
|
+
readonly testId?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function IssueFilterBar(props: IssueFilterBarProps): ReactElement;
|
|
21
|
+
//# sourceMappingURL=IssueFilterBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueFilterBar.d.ts","sourceRoot":"","sources":["../../src/default/IssueFilterBar.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,sEAAsE;AACtE,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAQ3D,oFAAoF;AACpF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,GAAE,IAAiB,GAAG,MAAM,GAAG,SAAS,CAGxF;AAOD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACpD;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAiIvE"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* `<IssueFilterBar>` — the four questions somebody asks a tracker, in a row.
|
|
4
|
+
*
|
|
5
|
+
* ── Every control clears ──────────────────────────────────────────────────
|
|
6
|
+
*
|
|
7
|
+
* The filters here are the difference between "nothing is broken" and "nothing
|
|
8
|
+
* is broken THAT I ASKED ABOUT", and the second sentence is the dangerous one.
|
|
9
|
+
* So every select is `allowClear`, the "open only" switch is visibly on or
|
|
10
|
+
* off, and "Clear filters" is offered the moment ANY filter is set — the feed
|
|
11
|
+
* also repeats the fact in its empty state, because one of the two of them is
|
|
12
|
+
* going to be the thing somebody reads.
|
|
13
|
+
*
|
|
14
|
+
* ── `since` is offered as four presets, not a date picker ─────────────────
|
|
15
|
+
*
|
|
16
|
+
* The wire takes an ISO-8601 instant, and nobody triaging an outage wants to
|
|
17
|
+
* pick a calendar day: the question is "in the last day / week / month". The
|
|
18
|
+
* instant is computed at CHANGE time from the clock, so a tab left open
|
|
19
|
+
* overnight does not keep filtering on yesterday's boundary the next time
|
|
20
|
+
* somebody touches another control.
|
|
21
|
+
*/
|
|
22
|
+
import { useState } from "react";
|
|
23
|
+
import { Flex, Select, Switch, Typography } from "antd";
|
|
24
|
+
import { spacing } from "@stapel/tokens";
|
|
25
|
+
import { SkinButton, SkinTheme } from "@stapel/tokens-antd/skin";
|
|
26
|
+
import { useT } from "@stapel/core";
|
|
27
|
+
import { ISSUE_LEVELS, ISSUE_STATUSES } from "../api/types.js";
|
|
28
|
+
import { clearedIssueFilters } from "../model/issues.js";
|
|
29
|
+
import { ALERTS_I18N_KEYS } from "../i18n/keys.js";
|
|
30
|
+
import { levelKey, statusKey } from "./labels.js";
|
|
31
|
+
const PRESET_SECONDS = {
|
|
32
|
+
day: 24 * 60 * 60,
|
|
33
|
+
week: 7 * 24 * 60 * 60,
|
|
34
|
+
month: 30 * 24 * 60 * 60,
|
|
35
|
+
};
|
|
36
|
+
/** The instant a preset means, taken from the clock at the moment of the choice. */
|
|
37
|
+
export function sinceFor(preset, now = new Date()) {
|
|
38
|
+
if (preset === "any")
|
|
39
|
+
return undefined;
|
|
40
|
+
return new Date(now.getTime() - PRESET_SECONDS[preset] * 1000).toISOString();
|
|
41
|
+
}
|
|
42
|
+
export function IssueFilterBar(props) {
|
|
43
|
+
const t = useT();
|
|
44
|
+
const testId = props.testId ?? "alerts-filters";
|
|
45
|
+
const { value, onChange } = props;
|
|
46
|
+
// The preset is the bar's own state; the FILTER is an instant. When the
|
|
47
|
+
// caller drops `since`, the control follows rather than showing a window
|
|
48
|
+
// nobody is filtering on.
|
|
49
|
+
const [chosen, setChosen] = useState("any");
|
|
50
|
+
const preset = value.since === undefined ? "any" : chosen;
|
|
51
|
+
// `exactOptionalPropertyTypes` makes "absent" and "present as undefined"
|
|
52
|
+
// different types, and CLEARING a filter is exactly the second: the select
|
|
53
|
+
// hands back `undefined`, which this then deletes from the object so the
|
|
54
|
+
// filter key — and the cache entry it names — stays absent.
|
|
55
|
+
const patch = (next) => {
|
|
56
|
+
const merged = Object.fromEntries(Object.entries({ ...value, ...next }).filter(([, entry]) => entry !== undefined));
|
|
57
|
+
onChange(merged);
|
|
58
|
+
};
|
|
59
|
+
const anySet = value.status !== undefined ||
|
|
60
|
+
value.level !== undefined ||
|
|
61
|
+
value.service !== undefined ||
|
|
62
|
+
value.since !== undefined ||
|
|
63
|
+
value.open === true;
|
|
64
|
+
return (_jsx(SkinTheme, { ...(props.mode !== undefined ? { mode: props.mode } : {}), children: _jsxs(Flex, { gap: spacing[3], wrap: true, align: "center", "data-testid": testId, children: [_jsx(Select, { size: "small", allowClear: true, style: { minWidth: "10rem" }, value: value.status, placeholder: t(ALERTS_I18N_KEYS.filterAnyStatus), "aria-label": t(ALERTS_I18N_KEYS.filterStatus), "data-testid": `${testId}-status`, onChange: (next) => patch({ status: next }), options: ISSUE_STATUSES.map((status) => ({
|
|
65
|
+
value: status,
|
|
66
|
+
label: t(statusKey(status), { status }),
|
|
67
|
+
})) }), _jsx(Select, { size: "small", allowClear: true, style: { minWidth: "10rem" }, value: value.level, placeholder: t(ALERTS_I18N_KEYS.filterAnyLevel), "aria-label": t(ALERTS_I18N_KEYS.filterLevel), "data-testid": `${testId}-level`, onChange: (next) => patch({ level: next }), options: ISSUE_LEVELS.map((level) => ({
|
|
68
|
+
value: level,
|
|
69
|
+
label: t(levelKey(level), { level }),
|
|
70
|
+
})) }), _jsx(Select, { size: "small", allowClear: true, showSearch: true, style: { minWidth: "12rem" }, value: value.service, placeholder: t(ALERTS_I18N_KEYS.filterAnyService), "aria-label": t(ALERTS_I18N_KEYS.filterService), "data-testid": `${testId}-service`, onChange: (next) => patch({ service: next }), options: (props.services ?? []).map((service) => ({
|
|
71
|
+
value: service,
|
|
72
|
+
label: service,
|
|
73
|
+
})) }), _jsx(Select, { size: "small", style: { minWidth: "10rem" }, value: preset, "aria-label": t(ALERTS_I18N_KEYS.filterSince), "data-testid": `${testId}-since`, onChange: (next) => {
|
|
74
|
+
setChosen(next);
|
|
75
|
+
patch({ since: sinceFor(next) });
|
|
76
|
+
}, options: [
|
|
77
|
+
{ value: "any", label: t(ALERTS_I18N_KEYS.filterSinceAny) },
|
|
78
|
+
{ value: "day", label: t(ALERTS_I18N_KEYS.filterSinceDay) },
|
|
79
|
+
{ value: "week", label: t(ALERTS_I18N_KEYS.filterSinceWeek) },
|
|
80
|
+
{ value: "month", label: t(ALERTS_I18N_KEYS.filterSinceMonth) },
|
|
81
|
+
] }), _jsxs(Flex, { gap: spacing[2], align: "center", children: [_jsx(Switch, { size: "small", checked: value.open === true, "aria-label": t(ALERTS_I18N_KEYS.filterOpenOnly), "data-testid": `${testId}-open`, onChange: (next) => patch({ open: next ? true : undefined }) }), _jsx(Typography.Text, { children: t(ALERTS_I18N_KEYS.filterOpenOnly) }), _jsx(Typography.Text, { type: "secondary", children: t(ALERTS_I18N_KEYS.filterOpenOnlyHint) })] }), anySet ? (_jsx(SkinButton, { size: "small", type: "link", "data-testid": `${testId}-clear`, "data-analytics": "none", "data-analytics-reason": "clearing a filter is a view change, not a decision about a bug", onClick: () => {
|
|
82
|
+
setChosen("any");
|
|
83
|
+
onChange(clearedIssueFilters(value));
|
|
84
|
+
}, children: t(ALERTS_I18N_KEYS.filterClear) })) : null] }) }));
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=IssueFilterBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssueFilterBar.js","sourceRoot":"","sources":["../../src/default/IssueFilterBar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMlD,MAAM,cAAc,GAA0D;IAC5E,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;IACjB,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;IACtB,KAAK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CAAC,KAAK,CAAC,CAAC;wBACjB,QAAQ,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;oBACvC,CAAC,YAEA,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,GACrB,CACd,CAAC,CAAC,CAAC,IAAI,IACH,GACG,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
import type { IssueFeedFilters } from "../model/issues.js";
|
|
3
|
+
import type { IssueNavigationProps, ThemeModeProp } from "./types.js";
|
|
4
|
+
export interface IssuesFeedProps extends ThemeModeProp, IssueNavigationProps {
|
|
5
|
+
/** Filters the screen opens with. The bar owns them from then on. */
|
|
6
|
+
readonly initialFilters?: IssueFeedFilters;
|
|
7
|
+
readonly testId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function IssuesFeed(props: IssuesFeedProps): ReactElement;
|
|
10
|
+
//# sourceMappingURL=IssuesFeed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IssuesFeed.d.ts","sourceRoot":"","sources":["../../src/default/IssuesFeed.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAc1C,OAAO,KAAK,EAAE,gBAAgB,EAAc,MAAM,oBAAoB,CAAC;AASvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,WAAW,eAAgB,SAAQ,aAAa,EAAE,oBAAoB;IAC1E,qEAAqE;IACrE,QAAQ,CAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAwR/D"}
|