Skip to content

deployment: Errors tab (application error detection)#270

Merged
acoshift merged 1 commit into
mainfrom
error-detection
Jun 21, 2026
Merged

deployment: Errors tab (application error detection)#270
acoshift merged 1 commit into
mainfrom
error-detection

Conversation

@acoshift

@acoshift acoshift commented Jun 21, 2026

Copy link
Copy Markdown
Member

PR 4/7 of application error detection (Sentry-lite — SPEC-error-detection.md). Mines the deployment log stream for application-level errors (panics, exceptions, stack traces) and surfaces them as grouped, deduplicated issues.

This PR adds the console Errors tab; it consumes the deployment.errors / deployment.errorGet / deployment.errorUpdate API landed in earlier PRs.

What the tab does

  • New Errors tab on the deployment detail view, alongside Logs/Events — shown for non-Static deployments only, gated the same way Logs is.
  • Issue list: each row shows a language kind badge (Go/Java/Py/Node/Ruby/Generic), the issue title, occurrence count, last-seen relative time, and a status chip (open / resolved / muted). Status filter pills (Open default / Resolved / Muted / All) + a client-side text filter. Default sort lastSeen desc; Load more follows the offset nextCursor.
  • Issue detail (expand-in-place): the full sampleMessage stack in a monospace surface, plus recent occurrences (pod + relative time). Actions Resolve / Mute / Reopen are GuardedButtons gated by deployment.logs; clicking calls deployment.errorUpdate then refetches.
  • States: empty ("No application errors detected."), forbidden (no deployment.logs), and location-unavailable ("Error detection isn't available for this location yet." — when the list returns the unavailable error).

Reused patterns

  • GuardedButton + the permission context can() for the triage actions.
  • api.invoke<T>() envelope handling (error.forbidden, error-message matching for the unavailable case).
  • The detail-tab load shape (+page.ts pulls the deployment from the parent layout, mirroring logs/metrics).
  • The rail/surface/mono visual language from the Events/Logs tabs.
  • Mock handlers added to src/lib/server/mock.ts (synthetic issues across kinds + statuses, two-page cursor paging, sg1 location simulating no log capture) so bun dev:mock renders the tab end-to-end.

Small helpers (pod-hue, relative-time, kind/severity) are kept local to the page$lib/deployment/logFormat.ts is deliberately not created or imported (owned by another unmerged PR), and no "view in History" deep-link is added (same reason).

bun check → 0 errors, 0 warnings. bun lint → clean.

Screenshots

Errors tab with an issue expanded (sample stack + recent occurrences + triage actions), 1320px.

Light Dark
light dark

🤖 Generated with Claude Code

https://claude.ai/code/session_011d4bVuGLnCbcJD9ZvastPH

Add an Errors tab to the deployment detail view (non-Static) that surfaces
grouped, deduplicated application-error issues from the error-detection
pipeline (SPEC-error-detection.md, PR 4/7).

- New route deployment/errors with issue list (kind badge, title, count,
  last-seen, status chip), Open/Resolved/Muted/All status pills, client-side
  text filter, and offset-cursor "Load more".
- Expand-in-place issue detail: full sample stack in a monospace surface,
  recent occurrences (pod + relative time), and Resolve / Mute / Reopen
  GuardedButtons gated by deployment.logs.
- States: empty, forbidden (no deployment.logs), and location-unavailable.
- Add deployment.errors / errorGet / errorUpdate request+result types to
  src/types/api.d.ts and mock handlers (multi-kind/-status fixtures, two-page
  cursor paging, sg1 = location-unavailable) for bun dev:mock.

All helpers (pod hue, relative-time, kind/severity) are local to the page;
logFormat.ts is deliberately not created or imported (owned by another PR).

bun check and bun lint are clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011d4bVuGLnCbcJD9ZvastPH
@deploys-app deploys-app Bot temporarily deployed to pr-270 June 21, 2026 12:47 Destroyed
@deploys-app

deploys-app Bot commented Jun 21, 2026

Copy link
Copy Markdown

Preview deleted (PR closed).

@acoshift acoshift merged commit fb975b0 into main Jun 21, 2026
5 checks passed
@acoshift acoshift deleted the error-detection branch June 21, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant