Skip to content

Windows: single-sash mode + external roller shutter layer — closes #73, #74 - #75

Merged
nicosandller merged 1 commit into
mainfrom
feat/window-modes
Jul 26, 2026
Merged

Windows: single-sash mode + external roller shutter layer — closes #73, #74#75
nicosandller merged 1 commit into
mainfrom
feat/window-modes

Conversation

@nicosandller

Copy link
Copy Markdown
Owner

Two window asks in one PR — same subsystem, same glyphs.

#73 — single-sash windows

Swing windows always drew two casement leaves; single-sash windows had no honest representation (the reporter fakes them with doors). New Sashes dropdown on swing windows: Double (default — byte-identical to today) or Single — one full-width sash with its swing arc, hinged at either jamb via the Hinge field (which now appears for single-sash windows, not just doors).

#74 — window + external roller shutter in one gap

New Shutter field on windows (shutterEntity, cover-filtered): the roll curtain from #45 layers over the sash in the same wall gap, driven by its own entity with its own accent state. The window's entity keeps driving the sash — so an open window behind a shut shutter draws both truthfully (verified: leaves swung open under a full-height curtain). Fail-closed like every other entity binding: an unavailable shutter draws shut.

Implementation notes: the curtain body was extracted into a shared rollCurtain() used by both the roll-up opening and the shutter layer; shutterAmount/shutterActive are pure and mirror resolveOpeningAmount/openingIsActive semantics; shutter colors pass through #65's cssColorOr; collectWatchedEntities includes shutters so state changes re-render; the dev-harness opening emulator grows a position slider per shutter.

Verification

tsc clean, 366/366 tests (single/double glyph structure, hinge mirroring, shutter layering/independence, shutterAmount/shutterActive matrix incl. outage fail-closed, watched-entity coverage, form field visibility + patches). Harness: single-sash window renders one leaf + one arc; shutter at position 40 → scaleY(0.6) curtain; shutter to 0 → full curtain while the open window's leaves stay swung underneath.

Backwards compatibility

No stored value reinterpreted; absent sash/shutterEntity render exactly as today.

Closes #73. Closes #74.

🤖 Generated with Claude Code

…closes #74)

- sash: "single" draws one full-width casement sash hinged at a jamb
  (Hinge picks which), instead of forcing the two-leaf look — users were
  faking windows with doors. Default "double" is byte-identical to today.
- shutterEntity: a cover for the external roller shutter sharing the
  window's wall gap. The roll curtain (extracted from the #45 glyph into a
  shared rollCurtain helper) layers over the sash with its own state, so
  an open window behind a shut shutter renders both truthfully. Watched
  entities include the shutter; the dev harness emulator grows a slider
  per shutter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@nicosandller nicosandller self-assigned this Jul 17, 2026
@nicosandller
nicosandller merged commit b1b56b1 into main Jul 26, 2026
4 checks passed
nicosandller added a commit that referenced this pull request Jul 26, 2026
One conflict, in render.test.ts: both sides appended suites at the end of
the file. Union — this branch's attribute/stateColor suites plus main's
windowSash/shutter/watched-entity suites. The conflict region cut mid-
block, so the "ours" side's closing braces had to be restored (the shared
trailing context only closed one side); typecheck caught it.

Verified no duplicate definitions after the auto-merge and that the
merged features compose: one climate item renders 21.5 · 45 while a
temperature label steps white -> red across thresholds, on a plan whose
single-sash window carries a 30%-open external shutter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

both window internal with external shutter third mode for windows

1 participant