Skip to content

feat(seer): Add monitor cleanup workflow UI - #123978

Merged
trevor-e merged 39 commits into
masterfrom
telkins/codex/monitor-cleanup-ui
Sep 15, 2026
Merged

trevor-e merged 39 commits into
masterfrom
telkins/codex/monitor-cleanup-ui

Conversation

@trevor-e

@trevor-e trevor-e commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Adds a flag-gated “Run…” menu to the Autofix workflows page, initially offering a monitor scan. Runs update with findings, property comparisons, monitor and alert links, and agent debug links. Incomplete and unsupported results remain distinct from completed scans with no findings; users follow monitor links to delete duplicates.

The page consumes strategy-specific API run types directly, sharing polling and filtering while deriving display status and summaries per strategy. Trigger source comes from the API; unknown sources display --. Uses the execution backend from #123966 (merged) and requires the source field from #124379 to land first.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 10, 2026
@github-actions

github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

Metric Before After Delta
Coverage 95.50% 95.50% ±0%
Typed 139,961 140,020 🟢 +59
Untyped 6,600 6,601 🔴 +1
🔍 3 new type safety issues introduced

Type assertions (as) (3 new)

File Line Detail
static/app/views/seerWorkflows/index.tsx 111 as WorkflowStrategy[] — decodeList(location.query.strategy) as WorkflowStrategy[]
static/app/views/seerWorkflows/index.tsx 112 as WorkflowDisplayStatus[] — decodeList(location.query.status) as WorkflowDisplayStatus[]
static/app/views/seerWorkflows/strategies.tsx 69 as WorkflowStrategy[] — Object.keys(STRATEGY_META) as WorkflowStrategy[]

This is informational only and does not block the PR.

@sentry

sentry Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 503 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/seerWorkflows/index.tsx Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/seerWorkflows/index.tsx Outdated
Comment thread static/app/views/seerWorkflows/index.tsx

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/seerWorkflows/index.tsx
@linear-code

linear-code Bot commented Sep 14, 2026

Copy link
Copy Markdown

AIML-3470

@trevor-e
trevor-e force-pushed the telkins/codex/monitor-cleanup-demo branch from 4a7d6a7 to 2d8185c Compare September 14, 2026 18:41

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/seerWorkflows/index.tsx Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/seerWorkflows/index.tsx
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Sep 14, 2026
@github-actions github-actions Bot removed the Scope: Backend Automatically applied to PRs that change backend components label Sep 14, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread static/app/views/seerWorkflows/agenticTriage.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 787dced. Configure here.

Comment thread static/app/views/seerWorkflows/index.tsx
trevor-e added a commit that referenced this pull request Sep 15, 2026
Adds a top-level nullable `source` field to workflow run responses,
using a shared `WorkflowRunSource` literal type (`cron` or `manual`).
Reuses Night Shift’s existing `extras.options.source`; monitor scan
callers pass the source explicitly, with the user-facing endpoint
passing `manual`. Runs without a recorded source return `null`.

Backend prerequisite for #123978. The existing Night Shift extras remain
available for older clients. Existing history tests cover recorded and
unknown sources, and preserving source through scan completion.
@trevor-e
trevor-e marked this pull request as ready for review September 15, 2026 16:11
Comment on lines +143 to +146
Array.from(new Set(runs.map(run => run.strategy))).map(strategy => ({
value: strategy,
label: STRATEGY_META[strategy].label,
})),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Unsafe property access on STRATEGY_META using an unvalidated strategy key from an API response can cause a runtime crash if the key is unknown.
Severity: HIGH

Suggested Fix

Implement runtime validation for the API response, for instance with a Zod schema. Alternatively, use optional chaining (STRATEGY_META[strategy]?.label) and provide a fallback value (e.g., ?? 'Unknown Strategy') to gracefully handle cases where an unknown strategy is received from the API, preventing a crash.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: static/app/views/seerWorkflows/index.tsx#L143-L146

Potential issue: The code uses the `strategy` string from an API response to access
properties on the `STRATEGY_META` object. There is no runtime validation to ensure the
`strategy` value from the API is a valid key in `STRATEGY_META`. If the API returns an
unexpected or new strategy string, the lookup `STRATEGY_META[strategy]` will result in
`undefined`. The subsequent access to the `.label` property will throw a `TypeError`,
causing a runtime crash. This could occur due to API version mismatches or a backend
bug.

Also affects:

  • static/app/views/seerWorkflows/index.tsx:424~426

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will handle in follow-up, not an issue rn

@trevor-e
trevor-e merged commit c637376 into master Sep 15, 2026
72 of 73 checks passed
@trevor-e
trevor-e deleted the telkins/codex/monitor-cleanup-ui branch September 15, 2026 16:29

This branch was successfully deployed

1 active deployment
Preview — a4ba3ae0 Deployed Sep 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants