fix(tui): render the home prompt before plugins settle - #48575
Closed
rekram1-node wants to merge 1 commit into
Closed
fix(tui): render the home prompt before plugins settle#48575rekram1-node wants to merge 1 commit into
rekram1-node wants to merge 1 commit into
Conversation
Mount the production Home prompt as soon as the built-in theme is ready instead of waiting for plugin reconciliation. Reserve the responsive logo and footer geometry while plugins load, then fill that chrome without remounting or moving the focused prompt. Session and continue launches remain gated. Delay terminal-title output until after the first frame so it does not serialize ahead of useful terminal output. In compiled interleaved runs, prompt bytes improve from 215.5ms to 168ms and first accepted input from 124ms to 76ms. Full chrome settles roughly 15ms later.
Collaborator
Author
|
Closing after correcting the benchmark harness. terminal-control 0.3.0 drained a bounded 1 KiB output queue one chunk per daemon loop, so the earlier prompt-byte result overstated the benefit of changing initial frame contents. With a non-backpressured PTY reader over 30 randomized interleaved compiled runs, this patch improves prompt bytes by only ~10-12ms and visible echo by ~9ms while stable chrome regresses ~8-10ms. That does not justify the progressive-render UX and maintenance cost. The underlying palette optimization in #48570 remains a real ~331ms win under the corrected harness. |
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
Stacked on #48570.
Mount the real production Home prompt as soon as the built-in theme is ready instead of waiting for plugin reconciliation. Responsive skeleton space reserves the logo and built-in footer geometry; plugin chrome fills in without remounting or moving the focused prompt. Initial session and continue launches remain gated so they never flash a Home prompt.
Terminal-title output also waits until after frame one so it cannot serialize ahead of useful terminal output.
Performance
20 warm interleaved exact Bun 1.4.2 compiled runs:
Tradeoff: the prompt appears alone for roughly 70-80ms before logo/footer/plugin chrome fills in; complete chrome settles about 15ms later.
A forced 500ms plugin delay preserved immediate input, focus, textarea identity, and exact prompt position through the upgrade.
Verification
External plugins may intentionally replace the Home footer with nonstandard height; that can still reflow after activation. The reserve exactly matches built-in chrome.