Clarify comments regarding incident visibility and episode display logic in StatusPageAPI

This commit is contained in:
Nawaz Dhandala
2026-02-04 20:33:42 +00:00
parent c031cc2af3
commit df480577ab

View File

@@ -3647,11 +3647,13 @@ export default class StatusPageAPI extends BaseAPI<
statusPage.showEpisodeHistoryInDays || 14,
);
// Get incidents that have monitors on this status page
// Note: We don't filter by incident.isVisibleOnStatusPage here because
// episode visibility is independent of incident visibility.
// An episode should show if episode.isVisibleOnStatusPage is true,
// regardless of whether its member incidents are visible.
/*
* Get incidents that have monitors on this status page
* Note: We don't filter by incident.isVisibleOnStatusPage here because
* episode visibility is independent of incident visibility.
* An episode should show if episode.isVisibleOnStatusPage is true,
* regardless of whether its member incidents are visible.
*/
const incidentQuery: Query<Incident> = {
monitors: monitorsOnStatusPage as any,
projectId: statusPage.projectId!,