Skip to content

fix(app): prevent TimelineRow.key crash on undefined row#29693

Open
jjserenity wants to merge 1 commit into
anomalyco:devfrom
jjserenity:dev
Open

fix(app): prevent TimelineRow.key crash on undefined row#29693
jjserenity wants to merge 1 commit into
anomalyco:devfrom
jjserenity:dev

Conversation

@jjserenity
Copy link
Copy Markdown

@jjserenity jjserenity commented May 28, 2026

Issue for this PR

Closes #29682

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Desktop renderer crashes with TypeError: Cannot read properties of undefined (reading '_tag') at TimelineRow.key when message data contains unexpected structure. This creates an infinite crash loop — Electron restarts, reloads the same session data, and crashes again.

TimelineRow.key is called from Array.map() on timeline rows. If any row is undefined (e.g., from malformed deserialized data), accessing row._tag throws.

Added a null guard at the top of TimelineRow.key — if row is falsy, return "unknown" as the key. This prevents the renderer crash and allows the session to load gracefully.

How did you verify your code works?

Changes are a single-line null guard with no side effects — the function simply returns early for falsy input. Verified the existing type signature accepts the change.

Screenshots / recordings

N/A — not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@jjserenity jjserenity requested a review from adamdotdevin as a code owner May 28, 2026 07:21
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

Desktop client crashes: Cannot read properties of undefined (reading 'tag') at TimelineRow2.key

1 participant