Skip to content

feat(preview): add a crashes panel to the tools sidebar - #112

Open
gwdp wants to merge 4 commits into
gwdp/crash-backendfrom
gwdp/crash-ui
Open

gwdp wants to merge 4 commits into
gwdp/crash-backendfrom
gwdp/crash-ui

Conversation

@gwdp

@gwdp gwdp commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Why

/crashes had no reader. You could curl it, but nothing in the preview told you the app had died.

How

  • Crashes section at the bottom of the Tools panel, with a count so you see it while collapsed
  • A row opens the report: exception, thread, version, the stack with system frames folded away, and the log tail the backend collected
  • Repeats collapse into one row. Older and Newer step through the kept occurrences, each with its own time, pid and tail
  • Download the raw .ips if you want to open it elsewhere
  • When there is no tail it says why, rather than showing an empty box
  • The panel reads a stream instead of polling, so a crash shows up on its own. The device log tail is only kept alive while the section is open, so having the Tools panel open costs nothing
  • The report dialog can be resized by dragging its right edge or using the Left and Right Arrow keys, and it remembers the selected width

Test Plan

  • CI
  • Crashed an app on a booted Sim with the panel open: the row appeared on its own, opened to a ~40 line tail, and stepping the occurrences swapped the time, pid and tail
  • Resized the real crash report by dragging and with the keyboard, then closed and reopened it to verify the saved width
crash-ui.mp4

Devin Review

@gwdp gwdp changed the title [preview] Add a collapsible crashes panel to the tools sidebar feat(preview): add a crashes panel to the tools sidebar Aug 29, 2026
@gwdp
gwdp marked this pull request as ready for review September 11, 2026 23:29
@gwdp
gwdp added this pull request to stack #153 September 11, 2026 23:29
@gwdp
gwdp marked this pull request as draft September 11, 2026 23:30
@gwdp
gwdp marked this pull request as ready for review September 11, 2026 23:42
@gwdp
gwdp requested a review from szdziedzic September 11, 2026 23:46
@gwdp
gwdp removed this pull request from stack #153 September 11, 2026 23:50
@gwdp
gwdp added this pull request to stack #155 September 11, 2026 23:50
@gwdp
gwdp removed this pull request from stack #155 September 11, 2026 23:50
@gwdp
gwdp added this pull request to stack #156 September 11, 2026 23:51
@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

ENG-25676

@gwdp
gwdp force-pushed the gwdp/crash-ui branch 2 times, most recently from 7f68e07 to cd76fee Compare September 16, 2026 06:29
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Comment thread packages/serve-sim/src/client/components/crash-detail-modal.tsx
@gwdp
gwdp force-pushed the gwdp/crash-ui branch 2 times, most recently from 75c0f3c to 16c324d Compare September 23, 2026 03:03
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@gwdp
gwdp force-pushed the gwdp/crash-ui branch 2 times, most recently from 16c4c20 to 429482d Compare September 23, 2026 07:26
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

Devin Review

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Malformed crash bodies remain downloadable

When an incident report retains a valid header but has a malformed body, isSameReport accepts it. parseCrashReport only gates incidentless occurrences, so the detail endpoint returns corrupt raw data without reportError.

(Refers to this code)

Learn more

An IPS report has a JSON header followed by a JSON body. The header can remain valid while the body is truncated or otherwise invalid. For occurrences with an incident ID, isSameReport returns immediately after comparing that header, so it never verifies the body. The route then exposes the malformed file as a valid raw report and leaves reportError null.

Example: The stored occurrence has incident ID INC-1. Its file now contains a valid INC-1 header followed by { "pid":. parseIpsHeader succeeds, the incident IDs match, and the corrupt file is returned instead of the fallback summary error.

Recommended fix: Require parseCrashReport(raw) to succeed before either identity comparison. Then compare incident IDs when present, otherwise compare PID and capture time. Add a route test using a valid header and malformed body.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

This branch has not been deployed

No deployments
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.

2 participants