Skip to content

Import UI modules lazily in the CLI; pass categories to preparation - #583

Merged
trissim merged 7 commits into
mainfrom
integration/live-history-model-20261008
Oct 8, 2026
Merged

trissim merged 7 commits into
mainfrom
integration/live-history-model-20261008

Conversation

@trissim

@trissim trissim commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex work, mostly replaced. 21 of 80 code lines it added are still in main.

cli.py now imports the app, application lifetime and renderer types only when a command needs them. Transcript categories are passed into fragment preparation, and prepared Markdown, the presentation window, streaming Markdown and transcript history are adjusted to use them. conversation.py and the model picker pilot test are also changed.

Keep Click declarations and renderer-choice discovery available to console-entrypoint spawn imports. Move ToadApp into run/acp terminal branches and about, ApplicationLifetime into the three server branches, and annotation-only App/AgentDefinition/Renderer imports behind TYPE_CHECKING. No wrapper entrypoint or alternate pool.

NRA AST traced all CLI declarations/callers and renderer imports across 862 Toad/Core/native production files with zero parse omissions. CLI declaration set, classes, AST signatures, returns and decorators are unchanged. Native help/version output is byte-identical; actual ACP project-option precedence and renderer choices pass.

Actual existing RenderProcessPool spawn borrowed the unchanged installed console script as its original main path, delivered RichRenderTask through PreparationRuntime, and confirmed the worker imported toad.cli without toad.app, application_lifetime or conversation. Worker shutdown left no child. One worker, installed dependencies, no App/provider/build launch.
Keep Click declarations and renderer-choice discovery available to console-entrypoint spawn imports. Move ToadApp into run/acp terminal branches and about, ApplicationLifetime into the three server branches, and annotation-only App/AgentDefinition/Renderer imports behind TYPE_CHECKING. No wrapper entrypoint or alternate pool.

NRA AST traced all CLI declarations/callers and renderer imports across 862 Toad/Core/native production files with zero parse omissions. CLI declaration set, classes, AST signatures, returns and decorators are unchanged. Native help/version output is byte-identical; actual ACP project-option precedence and renderer choices pass.

Actual existing RenderProcessPool spawn borrowed the unchanged installed console script as its original main path, delivered RichRenderTask through PreparationRuntime, and confirmed the worker imported toad.cli without toad.app, application_lifetime or conversation. Worker shutdown left no child. One worker, installed dependencies, no App/provider/build launch.
Snapshot and checkpoint publication pass the actual view categories into unattached history preparation. TranscriptBodyPreparation skips filtered source fragments; TranscriptFragmentView retains their source slots without hidden native children and uses its existing body publisher on reveal.

PreparedContentRange owns extension and replacement construction in four-part mount bursts with existing admission guards and rollback. TranscriptPageView acquires large destination slices through that owner. Preserve StreamingMarkdown prefix ordering in its extension call. Keep original four-fragment page-load admission after larger cohorts regressed.

Source trace covered 862 Toad/Core/native modules with no AST parse omissions. Qualified the real 147MB saved source through the original observer journey: 320 native wheel packets, three reversals, no provider input or application error; max delivery 219.7ms versus retained baseline 393.5ms. Original canonical page read 0.105s. Real category hide/reveal preserved canonical page and collapsed unformatted disclosure identity.

Qualification uses a source overlay on installed dependencies, not an installed delivery. Five-second agent-tab startup remains unresolved; original ACP attachment and metadata precede bounded snapshot publication. No viewport_body or native compositor changes.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 18:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim
trissim merged commit 6d741e7 into main Oct 8, 2026
1 of 2 checks passed
@trissim
trissim deleted the integration/live-history-model-20261008 branch October 11, 2026 20:04
@trissim trissim changed the title Keep model thinking state and bound original transcript preparation Import UI modules lazily in the CLI; pass categories to preparation Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants