You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(web): load thread automations only when shown - #33797
Thread details statically import the automations panel, which pulls scheduled-task settings code into the thread route even when Automations is hidden, the details card is closed, or the thread is a draft. This focused performance fix defers that single panel behind its existing render condition. Its query and task controls are unchanged; Suspense preserves the existing empty loading state, and the existing render boundary provides a local error with Reload if chunk loading fails.
Production builds from upstream b48b8ea2 and this patch reduce the thread route's static JS closure by 102,959 raw bytes / 33,169 gzip bytes. ThreadAutomationsPanel, ScheduledTasksSettings, and settings layout leave the closure. Calendar remains eager through other paths. A visible full-density automations panel immediately loads the new chunk, so this is deferred transfer, not a claim that every session transfers less data. Build manifests, module list, and reproducible measurement.
Validation: both production builds succeeded; the existing automations permissions, details-card browser, and chunk-reload tests passed (3 files, 14 tests); vp run check:changed passed.
The primary agent checked the built web client against isolated synthetic state with Replay (dev): on a cold full-density thread with Automations hidden, the baseline requested the scheduled-task settings/layout chunks; this patch requested none of the panel/settings/layout chunks. Revealing Automations fetched all three and displayed a bound task. Resume, Pause, Run now (completed Replay turn), Edit, and Manage worked. An injected HTTP 503 for the panel chunk produced the local error/Reload state while chat and composer stayed usable; removing the failure and clicking Reload recovered. Runtime transcript · task controls recording.
Limits: compact/essential/draft gates were inspected in source, not separately runtime-tested. Desktop shares this web UI but was not separately exercised; mobile has separate UI and is unchanged. Measurements/captures use b48b8ea2 and d98c7eda; the final rebase only added unrelated server-side Claude fixes and left this behavior diff unchanged.
This is submitted under CONTRIBUTING's very small focused obvious-fix exception: it removes one unnecessary eager dependency without adding a feature or changing product defaults. Related work: #18594 extracts schedule labels and defers the whole details card but does not split this panel; #16042 and #21779 cover other optional panels. This PR does not include those changes.
Reviewed with review-loop: 1 round with Claude Opus 5.5. Reviewer verdict: approved.
Created with GPT-6.1 Sol (extra-high reasoning) in Codex through T3 Code.
Macroscope's review found this PR approvable — The automations panel now loads only when its existing visibility conditions are met, with a local error message and reload control if loading fails. Automation behavior, permissions, and product defaults remain unchanged.
You can add or adjust custom eligibility rules. Learn more.
ThreadDetailsPanel now loads ThreadAutomationsPanel on demand. It renders no fallback while the panel loads. If rendering fails, it shows an alert and a Reload control that reloads the page. The existing visibility conditions remain unchanged.
Changes: Thread automations loading
Layer / File(s)
Summary
Lazy loading and error handling apps/web/src/components/chat/ThreadDetailsPanel.tsx
ThreadDetailsPanel dynamically imports ThreadAutomationsPanel and wraps it in suspense and error boundaries. Loading renders no fallback. Render errors show an alert and a Reload control.
pingdotgg/t3code#29304: The issue describes failures in chunks loaded after startup. This change adds a reload action for failures in the automations panel, but the available evidence does not show that it prevents the issue’s reload-loop behavior.
Suggested reviewers:t3dotgg, macroscopeapp
Merge Risk: Low · up to 5bed4
Automations could remain on the error screen after switching threads, but the inspected paths do not establish a recoverable case. This is a bounded risk for merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title clearly and concisely describes the main change: defer loading the thread automations panel until it is shown.
Description check
The description explains the problem and change, gives the focused-scope rationale, and reports build, test, runtime, and UI verification results. It does not use the template’s section headings, but …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description explains the problem and change, gives the focused-scope rationale, and reports build, test, runtime, and UI verification results. It does not use the template’s section headings, but it includes the required information and is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
250-250: Minor · Stability & Availability · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Reset the error boundary when the thread changes.
If the automations panel throws, RenderErrorBoundary keeps its failed state until its resetKeys change. Server-thread navigation reuses ChatView, so the next thread can show the error instead of its automations. Pass resetKeys={[props.environmentId, props.threadId]} to the boundary. (raw.githubusercontent.com)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
This branch has not been deployed
No deployments
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
size:M30-99 changed lines (additions + deletions).vouch:unvouchedPR author is not yet trusted in the VOUCHED list.
1 participant
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.
Thread details statically import the automations panel, which pulls scheduled-task settings code into the thread route even when Automations is hidden, the details card is closed, or the thread is a draft. This focused performance fix defers that single panel behind its existing render condition. Its query and task controls are unchanged; Suspense preserves the existing empty loading state, and the existing render boundary provides a local error with Reload if chunk loading fails.
Production builds from upstream
b48b8ea2and this patch reduce the thread route's static JS closure by 102,959 raw bytes / 33,169 gzip bytes.ThreadAutomationsPanel,ScheduledTasksSettings, and settings layout leave the closure. Calendar remains eager through other paths. A visible full-density automations panel immediately loads the new chunk, so this is deferred transfer, not a claim that every session transfers less data. Build manifests, module list, and reproducible measurement.Validation: both production builds succeeded; the existing automations permissions, details-card browser, and chunk-reload tests passed (3 files, 14 tests);
vp run check:changedpassed.The primary agent checked the built web client against isolated synthetic state with Replay (dev): on a cold full-density thread with Automations hidden, the baseline requested the scheduled-task settings/layout chunks; this patch requested none of the panel/settings/layout chunks. Revealing Automations fetched all three and displayed a bound task. Resume, Pause, Run now (completed Replay turn), Edit, and Manage worked. An injected HTTP 503 for the panel chunk produced the local error/Reload state while chat and composer stayed usable; removing the failure and clicking Reload recovered. Runtime transcript · task controls recording.
Panel after reveal · Chunk failure fallback.
Limits: compact/essential/draft gates were inspected in source, not separately runtime-tested. Desktop shares this web UI but was not separately exercised; mobile has separate UI and is unchanged. Measurements/captures use
b48b8ea2andd98c7eda; the final rebase only added unrelated server-side Claude fixes and left this behavior diff unchanged.This is submitted under CONTRIBUTING's very small focused obvious-fix exception: it removes one unnecessary eager dependency without adding a feature or changing product defaults. Related work: #18594 extracts schedule labels and defers the whole details card but does not split this panel; #16042 and #21779 cover other optional panels. This PR does not include those changes.
Reviewed with review-loop: 1 round with Claude Opus 5.5. Reviewer verdict: approved.
Created with GPT-6.1 Sol (extra-high reasoning) in Codex through T3 Code.