feat(ui): animate process startup indicators - #17
Merged
Conversation
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.
This PR replaces the static startup marker with the Bubbles
spinner.Pointsanimation. Inline sends aStartingevent before it asks the operating system to spawn a process. The UI shows the animated spinner during this state.Bubble Tea sends timed
spinner.TickMsgmessages to advance the animation. Inline schedules another tick while at least one process remains inStarting. After the process spawns, the supervisor sends aRunningevent with its PID. The UI then replaces the spinner with the static green status marker.Inline stops scheduling spinner ticks when no process is starting. This prevents unnecessary UI updates after startup. The spinner represents process creation, not application readiness. The animation can appear briefly because local processes usually spawn within milliseconds.
sequenceDiagram participant Supervisor participant UI participant OS as Operating system participant Timer as Bubble Tea timer Supervisor->>UI: Starting event UI->>UI: Show Points spinner UI->>Timer: Schedule spinner tick Supervisor->>OS: Spawn process loop While the process is Starting Timer->>UI: spinner.TickMsg UI->>UI: Advance spinner frame UI->>Timer: Schedule next tick end OS-->>Supervisor: Process PID Supervisor->>UI: Running event and PID UI->>UI: Show static green marker UI-xTimer: Stop scheduling ticksIt shows the transition clearly: