Put the whole layout tuning surface on a reusable panel - #367
Merged
Conversation
The simulation has eighteen settings and no consuming application could reach them without writing its own sliders. The demo had written some - covering fifteen of the eighteen, with StabilityThreshold, OverlapMargin and MaxOverlapCorrection unreachable - and every other application would have had to write the same thing again and drift from it. PhysicsSettingsPanel.Draw(ref PhysicsSettings) draws all eighteen, grouped by the force each belongs to and captioned on hover with what moving it does. DrawDiagnostics(engine) reports energy, whether the graph has settled, and the substep count and rate, which is what says whether a change to a setting helped: a graph that will not settle shows it in the energy long before the eye catches the drift, and one that settles instantly was probably damped into stillness before it finished arranging itself. Exposing the whole record rather than a chosen subset is deliberate. The forces interact and none can be judged alone - raising repulsion changes what the spring's rest length means, and levelling links only works in the room repulsion made - so a setting left off the panel is a setting nobody can reach without recompiling. Every control marks itself with ktsu.ImGui.Probes, the way the ktsu widgets do, so a UI test addresses it by the label the user sees rather than by geometry. That is what lets the demo's suite drive all seventeen sliders through the library's own panel, so what is covered is the control a consuming application gets rather than a copy of it. The demo now draws that panel instead of its own, losing 203 lines, and keeps only its two presets, which are demo content rather than library surface. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D2KNUKr1xJPTEdDmeF2tQN
KTSU0003 asks for Ensure.NotNull over ArgumentNullException.ThrowIfNull, for framework compatibility, and dropping the now-unused System using that left behind satisfies IDE0005. Reproduced locally first. This container had been building with the ktsu analyzers dropped, because its SDK is 10.0.111 whose Roslyn is older than the analyzer package wants and every build failed CS9057; CI runs 10.0.400 and so sees rules this environment could not. Installing that SDK alongside reproduces the failure exactly and, with it, the whole solution builds clean with 0 warnings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D2KNUKr1xJPTEdDmeF2tQN
|
This was referenced Sep 9, 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.



Why
The simulation has eighteen settings and no consuming application could reach them without writing its own sliders. The demo had written some — covering fifteen of the eighteen, leaving
StabilityThreshold,OverlapMarginandMaxOverlapCorrectionunreachable — and every other application would have had to write the same thing again and drift from it.What
PhysicsSettingsPanel.Draw(ref PhysicsSettings)draws all eighteen, grouped by the force each belongs to and captioned on hover with what moving it does:plus the run toggle and a reset that restores the defaults while leaving the run flag alone.
PhysicsSettingsPanel.DrawDiagnostics(engine)reports energy, whether the graph has settled, and the substep count and rate. That readout is what says whether a change helped: a graph that will not settle shows it in the energy long before the eye catches the drift, and one that settles instantly was probably damped into stillness before it finished arranging itself.Exposing the whole record rather than a chosen subset is deliberate. The forces interact and none can be judged alone — raising repulsion changes what the spring's rest length means, and levelling links only works in the room repulsion made. A setting left off the panel is a setting nobody can reach without recompiling.
Every control marks itself with
ktsu.ImGui.Probes, the way the ktsu widgets do rather than the Hexa-backed ones, so a UI test addresses it by the label the user sees instead of by geometry. That is what lets the demo's suite drive all seventeen sliders through the library's own panel — so what is covered is the control a consuming application gets, not a copy of it.Demo
CleanImNodesDemonow draws that panel instead of its own, losing 203 lines, and keeps only its two presets, which are demo content rather than library surface. Two settings that had been narrowed by float sliders (ImGuiedits floats; these are all doubles) now round-trip: a setting the user never touches keeps its full precision rather than being rounded by being looked at.Verification
ImGuiAppDemo.UITestsClean ImNodes 4/4 — including a new test that expands each of the six groups and drags every slider in it, and one that checks all five diagnostics readouts render.ImGui.NodeEditor.Tests71/71.Two slider labels were made unique along the way (
Repulsion strength,Gravity strength): both had been plain "Strength", which is ambiguous to the probe and to a reader following a tooltip.Not verified visually — this environment is headless. The panel's layout is ordinary ImGui collapsing headers and sliders, but how it reads at the demo's pane width is not something I can check from here.
🤖 Generated with Claude Code
https://claude.ai/code/session_01D2KNUKr1xJPTEdDmeF2tQN
Generated by Claude Code