fix: address CodeRabbit review on #580

- Preview fallbacks (SSE stream and /display/current) use logical_size({})
  (128x32, the shared default) instead of a hard-coded 128x64.
- display_geometry treats a non-mapping display/hardware block as missing,
  so a malformed config.json falls back to defaults instead of raising
  AttributeError (which turned the Starlark render into an HTTP 500).
- Docs: the static update interval falls back manifest -> plugin config
  -> 60s, in both the API reference and the architecture spec.

Not taken: validating double_sided copies against chain_length/parallel.
An orientation Rotate: or U-mapper pixel mapper decides which axis panels
lie on, so the counts would reject working setups (the existing
vertical-split test is one).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Chuck
2026-09-14 17:51:11 -04:00
co-authored by Claude Opus 5
parent c11fff9760
commit a9e1bd0b72
6 changed files with 42 additions and 18 deletions
+2 -3
View File
@@ -750,12 +750,11 @@ def display_preview_generator():
# Get display dimensions from config: the logical size DisplayManager
# renders at, so double-sided setups preview one screen
from src.display_geometry import logical_size
try:
from src.display_geometry import logical_size
width, height = logical_size(config_manager.load_config())
except (KeyError, TypeError, ValueError, AttributeError, ConfigError):
width = 128
height = 64
width, height = logical_size({})
while True:
try:
+4 -8
View File
@@ -27,16 +27,12 @@ def get_display_current():
# Get display dimensions from config: the logical size DisplayManager
# renders at, so double-sided setups preview one screen
from src.display_geometry import logical_size
try:
if api_v3.config_manager:
from src.display_geometry import logical_size
width, height = logical_size(api_v3.config_manager.load_config())
else:
width = 128
height = 64
config = api_v3.config_manager.load_config() if api_v3.config_manager else {}
width, height = logical_size(config)
except Exception:
width = 128
height = 64
width, height = logical_size({})
# Try to read snapshot file
image_data = None