Prevent diff-heavy task renderer crash loops#3430
Draft
k11kirky wants to merge 2 commits into
Draft
Conversation
Avoid reloading the same task route after a repeated renderer crash, while retaining bounded automatic recovery. Generated-By: PostHog Code Task-Id: f0303120-22c3-4c5a-b134-2590d01fdc6e
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Share the bounded conversation diff worker configuration across both thread renderers so diff-heavy task histories cannot start the default eight highlighter workers. Generated-By: PostHog Code Task-Id: f0303120-22c3-4c5a-b134-2590d01fdc6e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Opening a diff-heavy task in the experimental chat thread could crash the Electron renderer. That renderer omitted the worker-pool limit used by the production conversation view, allowing the syntax highlighter to create its much larger default worker pool; recovery then reloaded the same task route and repeated the crash.
Changes
How did you test this?
pnpm exec biome check packages/ui/src/features/sessions/conversationDiffPoolOptions.ts packages/ui/src/features/sessions/conversationDiffPoolOptions.test.ts packages/ui/src/features/sessions/components/ConversationView.tsx packages/ui/src/features/sessions/components/chat-thread/ChatThread.tsxpnpm --filter @posthog/ui typecheckpnpm --filter @posthog/ui exec vitest run src/features/sessions/conversationDiffPoolOptions.test.ts src/features/sessions/components/new-thread/buildThreadGroups.test.ts src/features/sessions/components/incrementalConversationItems.test.tspnpm --filter @posthog/code typecheckpnpm --filter @posthog/code exec vitest run src/main/utils/renderer-crash-recovery.test.ts src/main/utils/crash-diagnostics.test.tsAutomatic notifications
Created with PostHog Code