Skip to content

fix(app): filter non-renderable part types from browser store#18926

Merged
adamdotdevin merged 1 commit intoanomalyco:devfrom
BYK:byk/fix-skip-parts
Mar 24, 2026
Merged

fix(app): filter non-renderable part types from browser store#18926
adamdotdevin merged 1 commit intoanomalyco:devfrom
BYK:byk/fix-skip-parts

Conversation

@BYK
Copy link
Contributor

@BYK BYK commented Mar 24, 2026

Issue for this PR

Closes #18922

Type of change

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

What does this PR do?

Part types patch, step-start, and step-finish have no PART_MAPPING entry and are never rendered by SessionTurn (partState() returns undefined for them). However, they are loaded into the SolidJS reactive store via both SSE events and the initial page load. For sessions with large snapshot diffs (e.g. 17 MB patch with 99K file entries), SolidJS creates deep reactive proxies over massive arrays, freezing the browser.

Adds a SKIP_PARTS set and filters these types at both store entry points:

  • event-reducer.ts: early break in message.part.updated handler
  • sync.tsx: filter parts during page load before store insertion

For the problematic session this reduces data in the browser store from 24 MB to ~7 MB.

How did you verify your code works?

  • bun test passes for packages/app (291/291)
  • Verified the problematic session has 50 patch parts (17 MB), 238 step-finish parts, 239 step-start parts — all now filtered

Checklist

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

Skip patch, step-start, and step-finish parts at the store boundary.
These types have no PART_MAPPING entry and are never rendered by
SessionTurn. For sessions with large snapshot diffs (e.g. 17 MB patch
with 99K file entries), this prevents SolidJS from creating deep
reactive proxies over massive arrays that freeze the browser.
@BYK BYK requested a review from adamdotdevin as a code owner March 24, 2026 10:56
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 24, 2026
@github-actions
Copy link
Contributor

Hey! Your PR title perf(app): filter non-renderable part types from browser store doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@BYK BYK changed the title perf(app): filter non-renderable part types from browser store fix(app): filter non-renderable part types from browser store Mar 24, 2026
@github-actions github-actions bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 24, 2026
@github-actions
Copy link
Contributor

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

@adamdotdevin adamdotdevin merged commit 431e058 into anomalyco:dev Mar 24, 2026
13 checks passed
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.

Non-renderable part types (patch, step-start, step-finish) loaded into browser store

2 participants