Skip to content

feat: stateful combustion and multi-window torch - #3

Merged
alexrett merged 12 commits into
mainfrom
codex/stateful-combustion-v3
Sep 1, 2026
Merged

alexrett merged 12 commits into
mainfrom
codex/stateful-combustion-v3

Conversation

@alexrett

@alexrett alexrett commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • add stateful moisture, heat, damage, fuel, steam, and char simulation
  • preserve the native window appearance through ignition while improving burned edges and rounded corners
  • let Torch mode burn up to four windows independently, with multiple ignition points per window
  • prepare version 0.3.0 and document multi-window Torch mode

Verification

  • swift format lint --strict --recursive Package.swift Sources Tests
  • swift test (74 tests)
  • swift build -c release --arch arm64 --arch x86_64
  • live multi-window Torch QA with three simultaneous windows
  • Metal API/GPU Validation

Copilot AI lite review requested due to automatic review settings September 1, 2026 18:19
@alexrett
alexrett merged commit 79d1fc6 into main Sep 1, 2026
2 checks passed

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.

🔵 Needs a closer look

It introduces substantial new rendering and capture-path behavior (new Metal compute pipelines, shadow alignment, and multi-session coordination) where correctness/performance regressions are difficult to validate without full runtime review.

Pull request overview

This PR expands WindowBurn’s burn simulation and rendering pipeline to support stateful combustion (moisture/heat/fuel/damage) and multi-window Torch sessions, while improving visual handoff from the native window to the overlay (captured shadow + atomic replacement activation). It also bumps the app version to 0.3.0 and updates documentation/tests to reflect the new behavior.

Changes:

  • Add a CPU-side combustion model + a GPU combustion-state field (compute pipeline) that drives steam/scorch/material visibility.
  • Introduce multi-window Torch session tracking (up to 4 concurrent windows) with routing of clicks to the most recently registered overlapping session.
  • Capture and align the native window shadow and add an explicit “handoff prepared / replacement active” flow to avoid visible window pop during close.
File summaries
File Description
Tests/WindowBurnCoreTests/TorchBurnTests.swift Adds coverage for multi-window Torch session routing, removal, and capacity limits.
Tests/WindowBurnCoreTests/SoakAndBurnTests.swift Adds a regression test for atomic handoff coverage before closing the native window.
Tests/WindowBurnCoreTests/GeometryTests.swift Adds tests for shadow alignment, replacement activation, and rounded-corner masking.
Tests/WindowBurnCoreTests/CombustionModelTests.swift New test suite validating combustion state stepping and visual response behavior.
Tests/WindowBurnCoreTests/BurnVisualProfileTests.swift Adds constraints for new radial contour parameters.
Support/Info.plist Bumps version to 0.3.0 (bundle version to 3).
Sources/WindowBurnCore/TorchBurn.swift Adds TorchWindowSessionRegistry to manage up to 4 concurrent Torch window sessions.
Sources/WindowBurnCore/SoakAndBurn.swift Adds isHandoffPrepared to source coverage to ensure full coverage during handoff.
Sources/WindowBurnCore/CombustionModel.swift Introduces stateful combustion model + visual response helpers.
Sources/WindowBurnCore/BurnVisualProfile.swift Adds radial contour warp/bite parameters and wires them into .cinematic.
Sources/WindowBurnCore/BurnGeometry.swift Adds OverlayDepthModel for shadow sampling offset, shadow opacity, rounded-rect distance helpers.
Sources/WindowBurn/WindowCaptureService.swift Captures an aligned native shadow image and computes a sampling offset.
Sources/WindowBurn/BurnRenderer.swift Adds combustion compute pipelines/textures, radial edge shaping, steam rendering, replacement shadow compositing, and pipeline caching.
Sources/WindowBurn/BurnOverlayController.swift Adds replacement/handoff controls, optional delayed start, and threads through shadow + corner radius inputs.
Sources/WindowBurn/BurnCoordinator.swift Refactors Torch mode into per-window sessions + registry; adds atomic replacement activation before closing windows.
README.md Updates Torch mode documentation to describe up to 4 windows / 8 ignition points each.
Review details
  • Files reviewed: 16/18 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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