Conversation
The three-way union was one signature covering two contracts. UI None becomes [], and window.write still takes one frame. Signed-off-by: Set Paing <spaing@nvidia.com>
Collaborator
Author
|
/ok to test 8168208 |
spaingnv
marked this pull request as ready for review
September 15, 2026 19:46
Contributor
|
Same element check PresentationManager.publish already does for model channels. Signed-off-by: Set Paing <spaing@nvidia.com>
Collaborator
Author
|
/ok to test c28f341 |
The runtime check needs a non-StepResult in the list. ty does not honor type: ignore[list-item] on that return. Signed-off-by: Set Paing <spaing@nvidia.com>
Collaborator
Author
|
/ok to test c91b837 |
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.
Closes #562.
What changed
The contract is two files:
flashdreams/flashdreams/api_v2/loop.py—ILoop.step(andIUILoop.step)return
list[StepResult]. A model list is one entry per channel, or[]when the step produced no presentable output (Support multi devices postprocessing in Interactive Drive #605 already defined that).
A UI list is one frame to present, or
[]to present nothing this tick(what used to be
None).flashdreams/flashdreams/runtime_v2/session_runner.py— the UI threadconsumes that list: skip
window.writeon[], write[0]on oneresult,
TypeErroron more than one.window.writestill takes asingle frame.
Everything else is rewiring and docs: Blit / SlangPy / ImGui wrap the frame
they already produced, tests that treated a UI
stepreturn as a bareStepResultunwrap[0], and the api_v2 / runtime_v2 READMEs describethe list.
Why
The three-way type (
StepResult | None | list[StepResult]) was onesignature covering two contracts. Unifying the annotation without the UI
0-or-1 rule would hide that
window.writeis one present.Not in this PR
window.writeis still one present per tick.ILoopor merging the two threads.Validation
uv run --no-sync pytest flashdreams/test_v2 apps/cam2v/tests/test_application.py apps/crazy_robotaxi/tests/test_ui.py -m ci_cpu— 262 passed, 11 skipped.uv run --no-sync pytest apps/cam2v/tests/test_ui_cuda.py -m ci_gpu— 1 passed.