Skip to content

Render declared fields alongside solved velocity in pyflow play (TASK-051) - #88

Merged
AdamClemens merged 1 commit into
mainfrom
feat/combined-velocity-declared-field-playback
Sep 9, 2026
Merged

Render declared fields alongside solved velocity in pyflow play (TASK-051)#88
AdamClemens merged 1 commit into
mainfrom
feat/combined-velocity-declared-field-playback

Conversation

@AdamClemens

Copy link
Copy Markdown
Owner

Summary

Closes Stage 8's Completion Criterion 7 -- and with it, the entire
Stage 8 reopening (see #83, #84, #87, #86): all nine criteria are now
met. pyflow play no longer rejects a config combining
simulation.velocity_solved with declared fields (Smoke Transport's
own shape), and instead renders both the flow's own arrows and each
declared field's configured panel together.

  • Extracted bootstrap.py's own private panel-rendering helpers
    (_panel_colors, _panel_caption, _PanelRenderState,
    _add_panel_legend) into rendering/field_visualization.py as
    public functions, the same "extract before reusing" precedent
    TASK-045 set for simulation_run.py.
  • build_panel_legend became a pure builder in the process (no
    window parameter, returns objects instead of mutating a scene
    directly) rather than moving as-is -- the original shape would have
    violated field_visualization.py's own "owns no window" rule.
  • The extraction was verified behaviour-preserving by the full
    pre-existing test suite most likely to be affected (117 tests across
    test_bootstrap.py, test_field_visualization.py, every
    tests/golden/ module) passing unmodified, before anything new
    was added.
  • playback.py's combined path renders both arrows and panels
    together -- a real, deliberate widening beyond what bootstrap.py's
    own live pyflow run path currently does for the identical config
    shape (that path draws panels but never arrows alongside them, a
    pre-existing, separately flagged gap -- not fixed here, out of
    scope).

Test plan

  • Strict TDD throughout
  • Behaviour-preservation verified for the extraction before adding
    anything new
  • make lint and every relevant make check-* target clean
  • make test -- 1178 passed, 21 skipped, exit 0
  • Verified by hand against the real CLI and the real rendered
    scene: a Smoke Transport record-then-play round trip produced
    259,649 non-background pixels across 1,719 distinct colours, with
    window.scene holding exactly the expected shapes -- 2 legends
    (128 vertices each), 2 field panel meshes (1,024 vertices each),
    the 2-vertex scrub-bar track, and a 1,536-vertex arrow object

🤖 Generated with Claude Code

…-051)

Closes Stage 8's Completion Criterion 7, and with it the entire Stage 8
reopening: all nine criteria are now met. pyflow play no longer rejects
a config that combines simulation.velocity_solved with declared
fields -- Smoke Transport's own shape -- and instead renders both the
flow's own arrows and each declared field's configured panel together.

Extracted bootstrap.py's own private panel-rendering helpers
(_panel_colors, _panel_caption, _PanelRenderState, _add_panel_legend)
into rendering/field_visualization.py as public functions so playback.py
could reuse them, the same "extract before reusing" precedent TASK-045
set for simulation_run.py. build_panel_legend became a pure builder in
the process (no window parameter, returns objects instead of mutating
a scene directly) rather than moving as-is, since the original shape
would have violated field_visualization.py's own "owns no window"
rule. The extraction was verified behaviour-preserving by the full
pre-existing test suite most likely to be affected (117 tests across
test_bootstrap.py, test_field_visualization.py, every tests/golden/
module) passing unmodified before anything new was added.

playback.py's combined path renders both arrows and panels together --
a real, deliberate widening beyond what bootstrap.py's own live
pyflow run path currently does for the identical config shape (arrows
only ever existed for velocity-only playback; the live path draws
panels but never arrows alongside them, a pre-existing, separately
flagged gap). Verified against a real Smoke Transport record-then-play
round trip: 259,649 non-background pixels, and window.scene holding
exactly the expected shapes (2 legends, 2 field panels, the scrub
track, and a real arrow object).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@AdamClemens
AdamClemens merged commit 69c7565 into main Sep 9, 2026
2 checks passed
@AdamClemens
AdamClemens deleted the feat/combined-velocity-declared-field-playback branch September 9, 2026 19:15
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.

1 participant