Repository navigation
feat(view): open the viewer on the outline, and cancel the run on close (#85) - #93
Merged
Merged
Conversation
gerchowl
added a commit
that referenced
this pull request
Oct 13, 2026
Review round 1 on #93. The viewer was built after Done, in an open window, so a GPU that refused its pipelines closed the window and exited 1 instead of falling back to software, as main did. The pipelines are now built and validated in eframe's creator (pipelines()), where a refusal still hands the load back to the software viewer; only the scene's buffers are checked after Done. STEPV_VIEW_REJECT_PIPELINES forces the refusal for a new window test. Also: the loader takes the channel's sender by value, so a panic closes it; a cancelled report carries message, not error; the harness maps Outcome::Cancelled to a crash verdict; the run_streaming change is in the CHANGELOG under Changed, marked breaking. Refs: #85
gerchowl
added a commit
that referenced
this pull request
Oct 13, 2026
Review round 2 on #93. The scene's buffers are uploaded after Done, in the open window; a refusal closed it with an error, where main drew the scene in software. The window now hands the loaded scene back (app::Back::Loaded) and view::run draws it in software, so every GPU failure that fell back before #85 still does. STEPV_VIEW_REJECT_UPLOAD forces it for a new window test. Also: the hooks are listed in scripts/test-viewer.sh, and the harness has an error verdict for a cancelled run instead of calling it a crash. Refs: #85
stepv view opens its window at once and runs the kernel on a thread of its own, through the CLI's tessellate. The window shows the assembly tree (from a cached outline artifact before the kernel starts, then from the run's Event::Tree) and the run's progress, then swaps in the scene on Done. A failed run closes the window and reports as before (#89). Closing the window mid-load cancels the run: occt::run_streaming takes a cancel flag, supervise kills the kernel when it is set, and the run is the new Outcome::Cancelled; view reports status cancelled, exit 0. The software viewer has no tree and still waits for the run (#90). Refs: #85
Review round 1 on #93. The viewer was built after Done, in an open window, so a GPU that refused its pipelines closed the window and exited 1 instead of falling back to software, as main did. The pipelines are now built and validated in eframe's creator (pipelines()), where a refusal still hands the load back to the software viewer; only the scene's buffers are checked after Done. STEPV_VIEW_REJECT_PIPELINES forces the refusal for a new window test. Also: the loader takes the channel's sender by value, so a panic closes it; a cancelled report carries message, not error; the harness maps Outcome::Cancelled to a crash verdict; the run_streaming change is in the CHANGELOG under Changed, marked breaking. Refs: #85
Review round 2 on #93. The scene's buffers are uploaded after Done, in the open window; a refusal closed it with an error, where main drew the scene in software. The window now hands the loaded scene back (app::Back::Loaded) and view::run draws it in software, so every GPU failure that fell back before #85 still does. STEPV_VIEW_REJECT_UPLOAD forces it for a new window test. Also: the hooks are listed in scripts/test-viewer.sh, and the harness has an error verdict for a cancelled run instead of calling it a crash. Refs: #85
gerchowl
force-pushed
the
feature/85-viewer-outline-first
branch
from
October 13, 2026 01:14
5389cbc to
ec500bf
Compare
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 #85
What
stepv viewopens its window at once and runs the kernel on a thread of its own (run_view/load_viewinsrc/main.rs), through the CLI's owntessellate, so the artifact, the box and the progress code are shared, not duplicated. The loader sends the windowview::Loadmessages over a channel:Tree: a cached outline artifact's tree, sent before the kernel starts, then the run'sEvent::Tree. It's drawn in the tree panel (Tree::from_nodes).Progress: "Transferring the shapes: P%" or "Meshing: P%", with a progress bar.Done: the GPU scene is built and the viewer swaps in, with the full title.Failed: the window closes and the report says why, as before. viewer: keep the tree with an honest message when a load is killed or times out (#63 part 3) #89 will keep the tree with its reason instead.Closing mid-load cancels the run (Q1).
occt::run_streaminggains acancel: Option<&AtomicBool>parameter.supervise's tick may stop the run and kill the kernel, which is the newOutcome::Cancelled.viewreports statuscancelledwith exit 0. This public API change is in the rustdoc and the CHANGELOG.Known limits.
--software, or no usable GPU, still waits for the whole run (#90). A failed run closes the window (#89).Tests (each new one fails on
origin/main)tests/stream.rsa_cancelled_run_is_killed_at_once(nextest):Outcome::Cancelled, no summary, within seconds of a 60 s cap.#[ignore = "needs a window session; …"], run byscripts/test-window-tests.sh, which now counts 7. They go throughHome::view(process group, memory cap,--timeout, screenshot hook). UnderSTEPV_VIEW_SCREENSHOTthe window reports its frames on stderr, because the macOS CI runner never presents a window:the_viewer_shows_the_tree_before_the_geometry: with the kernel stalled 8 s, the loading frame shows the outline's rows and no geometry, then the scene. Onmain:no loading frame with the tree.a_cached_outline_shows_the_tree_before_any_kernel_event: a cached artifact with a mute kernel shows the artifact's rows. Onmain: no loading frame.closing_the_viewer_mid_load_cancels_the_kernel:STEPV_VIEW_CLOSE_LOADING=1with a stalled kernel givescancelled, exit 0, in under 20 s, and the kernel's process is gone. Onmain:(4, "timeout")after 30 s.Review round 1 (ed150e9)
pipelines()insrc/view/app.rs), before the window is the viewer's. A refusal hands the load back, andview::runfalls back to software, as onmain. Only the scene's buffers are checked afterDone.a_gpu_that_refuses_the_pipelines_falls_back_to_software, using theSTEPV_VIEW_REJECT_PIPELINEShook: statusok, backendsoftware, and the screenshot is drawn. At f18f607 it fails withbackend: "metal".Senderby value, so a panic closes the channel. A unit test checks that a panicking loader ends the software viewer's wait.cancelledreport: it carriesmessage, noterror(documented in plan.md); the cancel test asserts it.run_streamingchange is under Changed, marked breaking.Outcome::Cancelledmaps to aCrashverdict with a note, instead ofunreachable!.Gate
cargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo test→ exit 0nix build -L --no-link .#checks.aarch64-darwin.nextest→ exit 0 (248 passed, 11 skipped: 3 existing ignores and the 8 window tests; at ed150e9)just view-test→ its test steps passed: 85 + 8 + the 8 window tests (at ed150e9). Its last step failed only because the recipe hardcodestarget/release/stepv, while this build usedCARGO_TARGET_DIR.scripts/test-viewer.sh <that build>→ exit 0, with every checkok(both themes, software fallbacks, pick, measure, section,--frameson every fixture, failed topology).