Repository navigation
perf(tui): avoid repeated skill discovery before the first frame - #364
Merged
Merged
Conversation
Contributor
Author
|
@kit-code-agent review |
1 similar comment
Contributor
|
@kit-code-agent review |
danielkov
reviewed
Dec 1, 2026
Contributor
There was a problem hiding this comment.
Compose formats the catalog enumerated by its builder while preserving live skill discovery for refresh, permission checks, and invocation. The Unix terminal probe reads queued bytes directly while retaining its deadline, byte limit, and stop at the terminal status reply. No active findings remain.
Took 2 min 3 sec
danielkov
approved these changes
Dec 1, 2026
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.
Change
Configure compose before attaching its live child registry and format the catalog already enumerated by the builder. Derive skill names and descriptions from the same discovery pass. Permission checks, live refreshes, and invocation still consult current tools. On Unix, read already-queued terminal capability replies without polling before every byte. No work is deferred until the first keystroke.
End-to-end release benchmark
macOS arm64; unmodified
315557cvs this branch. From launching the real TUI process through the completed first frame containing the selected model and ready message editor; includes ACP child launch, session creation, model discovery and terminal negotiation. Fresh isolated HOME/workspace and a loopback OpenRouter catalog on each launch. One warm-up pair, then 15 alternating pairs per scenario; medians:At 1,000 skills the editor was ready 644 ms sooner (3.7× as fast).
Reproduce with the one-off benchmark script at the measured commit:
python3 benchmark-tui-launch.py /path/to/base/kit /path/to/candidate/kit --skills 50 --runs 15. This isolates local launch costs, not production provider/network latency; individual runs vary.Validation
Focused runtime/compose/skill tests (including catalog parity and skill changes after startup), 9 terminal-probe tests and 7 startup-picker integration tests passed. Formatting and diff checks passed.
Behavior check at 1,000 skills: Captured the first provider request from both release binaries against a local test server. Their
toolsfields were identical, including tool descriptions and schemas, and all 1,000 generated skill names were present. A separate regression test confirms that a skill added after startup is still advertised and callable. This removes redundant scans rather than deferring discovery to the first prompt.