infinitered / infinitered/reactotron

Timeline command components crash on unexpected payload shapes

Open
#1,600 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.6k
Forks
972
PR merge metrics
No merged PRs in 30d

Description

Several timeline command components assume specific payload shapes and will throw if the data doesn't match. An error boundary was added in #1598 to prevent these from crashing the app, but the components themselves should add defensive guards.

Vulnerable components:
- **`AsyncStorageMutationCommand`** — `payload.data.key` accessed without null check
- **`ApiResponseCommand`** — `payload.request` and `payload.response` destructured without null checks
- **`StateValuesChangeCommand`** — insufficient type checking before `Object.keys()`
- **`BenchmarkReportCommand`** — `payload.steps` array accessed without validation, crashes on empty array
- **`SagaTaskCompleteCommand/Stateless`** — `payload.children.length` and `.map()` without array check

These were safe when the only payload source was the client SDK, but with the MCP server (#1598) there's now a second source of commands that may produce different shapes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate AsyncStorageMutationCommand, ApiResponseCommand, StateValuesChangeCommand, BenchmarkReportCommand, and SagaTaskCompleteCommand/Stateless, then inspect each payload access described in the issue. Exercise the components with null, wrongly typed, and empty payload values; done means none of these shapes throws while valid payloads still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.