Fix cross-repo script dot tint and reduce sidebar animation CPU#265
Merged
Fix cross-repo script dot tint and reduce sidebar animation CPU#265
Conversation
… selected repository render the correct dot color instead of falling back to green. `scriptsByID` only covered the selected repo's scripts, so sidebar rows for worktrees in other repos couldn't resolve their running-script tint. Shift `runningScriptsByWorktreeID` from `[Worktree.ID: Set<UUID>]` to `[Worktree.ID: [UUID: TerminalTabTintColor]]` and drop the view-side lookup.
PingDot was a measured CPU hotspot (~23% of main thread) because the always-on .repeatForever driver combined with a non-Equatable AnyShapeStyle rebuilt on every parent body evaluation. Swap to phaseAnimator so SwiftUI can pause when occluded, and pass a concrete Color through PingDot/PingRing instead of AnyShapeStyle. Same treatment for the Shimmer sweep and the GhosttySurfaceProgressBar indeterminate sweep. Also drop the redundant .mask(solid black) from the inactive shimmer branch.
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.
Summary
[Worktree.ID: [UUID: TerminalTabTintColor]]) so worktree rows in repositories other than the selected one no longer fall back to green. Drops the view-sidescriptsByIDlookup that only covered the selected repo's scripts..repeatForeveranimations tophaseAnimatorinPingDot/CyclingDot,ShimmerModifier, andGhosttySurfaceProgressBarso SwiftUI can pause them when occluded.PingRingnow takes a concreteColorinstead ofAnyShapeStyle, removing the per-frame rebuild that made the sidebar ping a ~23% main-thread hotspot (Supacode gets sluggish after long multiple sessions #256)..mask(solid black)from the shimmer's inactive branch.Test plan
reduceMotionstill renders the static dot.xcodebuild testonce CI resolvesDependenciesTestSupportlocally (pre-existing tuist wiring issue reproduces onmain).