mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
v1.50.1: the v1.50.0 review (HP-1500-01..03)
- HP-1500-02: the stage budget was the absolute document coordinate, so any tall dashboard content before the card was billed as header and the stage collapsed to 0px. Measure our own chrome relative to the card plus a bounded (<=120px) allowance for what the viewport keeps above us; re-measure on window resize, remove the listener in disconnectedCallback. - HP-1500-03, both layers: contentBounds opens a near-zero axis (< ~an icon) up to a 200-unit floor and ignores extra points outside a canvas envelope (-25%..125%) for FRAMING purposes only; the server bounds layout coordinates to +-4 — any finite float used to pass, and one 1e100 hid the plan from every viewer. A thin real room keeps its tight frame; the gate sensor past the edge still stretches it. - HP-1500-01: no automatic double-transform — a correct layout and a stranded one are indistinguishable, and guessing wrong corrupts good data. Explicit admin command houseplan/geometry/repair: dry_run previews, the backup rides the same store write, undo restores, and routine layout writes now preserve unrelated store keys instead of eating the backup. Tests: contentBounds guards (unit), layout coordinate bounds + repair lifecycle (harness), card-below-content smoke. Inventory: 139 / 49 / 42 / 64.
This commit is contained in:
@@ -182,6 +182,17 @@ double click → properties dialog. In markup mode the "Opening" tool handles cl
|
||||
| `houseplan/plans/delete` | `name` | `{ok, removed}` / err `in_use` |
|
||||
| `houseplan/file/set` | `marker_id`, `filename`, `data` (b64) | `{ok,url,name}` (legacy, WS limit) |
|
||||
|
||||
**If the v1.48 migration crashed halfway** (HP-1500-01): the config write
|
||||
landed, the layout write did not, and both triggers are gone — markers of that
|
||||
space sit in the old coordinates and nothing in the data can prove it. The
|
||||
`geom_pending` intent (v1.50.0) prevents this for any future migration, but
|
||||
cannot help an install that was already stranded. There is no safe automatic
|
||||
answer — re-transforming a layout that is actually correct would corrupt it —
|
||||
so the fix is explicit: `houseplan/geometry/repair {space_id, aspect}`
|
||||
re-applies the transform to that one space's positions. `dry_run: true`
|
||||
previews, the previous positions ride the same store write as a one-deep
|
||||
backup, and `undo: true` restores them. Admin-gated like every other write.
|
||||
|
||||
**The canvas is square, the image is not** (v1.48.0). A space used to carry an
|
||||
`aspect`, and coordinates were normalised against it — x by the width, y by the
|
||||
height. That made every geometric question depend on a per-space number for no
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
# Changelog
|
||||
|
||||
## v1.50.1 — 2026-07-29
|
||||
|
||||
**From the v1.50.0 review**
|
||||
|
||||
- **A card below other dashboard content gets its stage back (HP-1500-02).**
|
||||
The v1.50.0 height measurement used the absolute document coordinate, so a
|
||||
tall card before this one was billed as "header" and the stage collapsed to
|
||||
zero. The card now measures only its own chrome plus a bounded allowance for
|
||||
what the dashboard keeps above it, and re-measures on window resize; the
|
||||
listener is removed on teardown.
|
||||
- **The content frame can no longer be degenerate or absurd (HP-1500-03).**
|
||||
A lone marker in an empty space produced a zero-area viewBox — a blank
|
||||
scene; a single stored coordinate like 1e100 (any finite float passed
|
||||
validation) stretched the frame until the plan was a dot, for every viewer
|
||||
of the space. A near-zero axis now opens up to a floor of canvas around the
|
||||
marker, points far outside the canvas envelope no longer command the frame
|
||||
(they still render where they are), and the server refuses layout
|
||||
coordinates outside ±4 — generous slack for an icon dragged past an edge,
|
||||
not an envelope for absurdity. A real thin room keeps its tight frame, and
|
||||
the gate sensor slightly past the edge still counts.
|
||||
- **A repair path for installs stranded by the v1.48 migration window
|
||||
(HP-1500-01).** If the old migration crashed between its two writes, the
|
||||
markers of a space are left in the old coordinates with nothing in the data
|
||||
able to prove it — and re-transforming a correct layout would corrupt it, so
|
||||
nothing automatic is safe. `houseplan/geometry/repair {space_id, aspect}` is
|
||||
the explicit answer: `dry_run` previews the exact moves, the previous
|
||||
positions ride the same store write as a one-deep backup, `undo` restores
|
||||
them, and routine drags no longer erase that backup. The v1.50.0
|
||||
`geom_pending` protocol already protects every future migration; this covers
|
||||
the installs it was too late for.
|
||||
|
||||
## v1.50.0 — 2026-07-28
|
||||
|
||||
**Owner's batch**
|
||||
|
||||
@@ -6,6 +6,37 @@
|
||||
> **Правило проекта:** оба файла пополняются в одном коммите с самим
|
||||
> изменением — как и остальная документация (см. docs/STATUS.md).
|
||||
|
||||
## v1.50.1 — 2026-07-29
|
||||
|
||||
**По ревью v1.50.0**
|
||||
|
||||
- **Карточка ниже другого контента дашборда снова получает сцену
|
||||
(HP-1500-02).** Замер высоты в v1.50.0 брал абсолютную координату документа:
|
||||
высокая карточка перед этой записывалась в «шапку», и сцена схлопывалась в
|
||||
ноль. Теперь меряется только собственная обвязка плюс ограниченная поправка
|
||||
на то, что дашборд держит сверху; перемер — по resize окна, слушатель
|
||||
снимается при демонтаже.
|
||||
- **Рамка содержимого больше не бывает вырожденной или абсурдной
|
||||
(HP-1500-03).** Одинокий значок в пустом пространстве давал viewBox нулевой
|
||||
площади — пустую сцену; одна сохранённая координата вида 1e100 (любое
|
||||
конечное число проходило проверку) растягивала рамку так, что план
|
||||
становился точкой — у всех зрителей пространства. Почти нулевая ось теперь
|
||||
раскрывается до минимального кадра вокруг значка, точки далеко за холстом
|
||||
рамкой не командуют (рисуются, где стоят), а сервер отклоняет координаты вне
|
||||
±4 — щедрый запас для значка, утащенного за край, но не для абсурда. Узкая
|
||||
комната сохраняет тесный кадр, датчик калитки чуть за краём по-прежнему
|
||||
учитывается.
|
||||
- **Путь восстановления для установок, застрявших в окне миграции v1.48
|
||||
(HP-1500-01).** Если старая миграция упала между двумя записями, значки
|
||||
пространства остаются в старых координатах, и по данным это недоказуемо — а
|
||||
повторное преобразование правильных координат их испортит, поэтому ничего
|
||||
автоматического тут быть не может. Явный ответ —
|
||||
`houseplan/geometry/repair {space_id, aspect}`: `dry_run` показывает точные
|
||||
перемещения, прежние позиции уезжают той же записью хранилища как резервная
|
||||
копия глубиной один, `undo` их возвращает, и обычные перетаскивания эту
|
||||
копию больше не затирают. Протокол `geom_pending` из v1.50.0 уже защищает
|
||||
все будущие миграции; это — для тех, кому он опоздал.
|
||||
|
||||
## v1.50.0 — 2026-07-28
|
||||
|
||||
**Задачи владельца**
|
||||
|
||||
+2
-2
@@ -15,12 +15,12 @@
|
||||
|
||||
| Item | State |
|
||||
|---|---|
|
||||
| Version | **v1.50.0** everywhere (manifest, const.py, package.json, CARD_VERSION); deployed to the home instance |
|
||||
| Version | **v1.50.1** everywhere (manifest, const.py, package.json, CARD_VERSION); deployed to the home instance |
|
||||
| Workflow | Since 2026-07-22: minor changes go to branch **`dev`** (build + smokes → deploy home → commit → push, NO release); releases are batched on the owner's command (merge dev→main, one tag, one release with a summary changelog, CI checked on dev beforehand) |
|
||||
| GitHub | https://github.com/Matysh/houseplan-card — **`main` carries every published release, the latest tag is the current version above**; `dev` is where work lands and is merged into `main` at release time (so `dev` is normally equal to or ahead of `main`, never behind). Push via SSH key `ha_jb` (remote git@github.com:…); API releases via the fine-grained PAT in `~/.git-credentials` (Contents R/W, issued 2026-07-23) |
|
||||
| CI | validate.yml (hacs + hassfest + frontend + backend) green; release.yml attaches the bundle on release publish |
|
||||
| HACS | Custom repository works. **Inclusion PR: hacs/default#9004** — open, valid, labeled; ~864 older open PRs but merge rate ≈180/mo; realistic ETA 1–3 months (checked 2026-07-24) |
|
||||
| Home instance | ha.jbstudio.pro (SSH port 323, key `ha_jb`), deployed **v1.50.0** via direct copy (HACS custom repo also installed) |
|
||||
| Home instance | ha.jbstudio.pro (SSH port 323, key `ha_jb`), deployed **v1.50.1** via direct copy (HACS custom repo also installed) |
|
||||
| Localization | UI en/ru (src/i18n/*.json), everything user-visible localized incl. kiosk popover |
|
||||
| Tests | Four layers: frontend unit (`npm test`, node:test over `test-build/`), pure backend (`pytest tests_backend`, runs anywhere), HA-harness backend (same folder, CI only — needs py3.13 + pytest-homeassistant-custom-component), and browser smokes (`demo/smoke_*.mjs`, headless chromium). **Counts are not written down here** — they went stale within two releases while the version line beside them was kept current, which reads as less coverage than exists (review R5-2). Run `npm run inventory` for the current numbers, or read them off the last CI run |
|
||||
| Community | **Telegram chat: https://t.me/ha_houseplan** (created 2026-07-27) — the primary user-facing support channel; GitHub issues stay for bugs/features. Link it from any new release notes and posts |
|
||||
|
||||
@@ -239,6 +239,16 @@ Run the *core flows* (marked ★ below) in each environment at least once per mi
|
||||
on the plan after a reload. Same for each tap action and each fill mode
|
||||
[auto: backend test_every_display_mode_the_editor_offers_is_accepted and
|
||||
neighbours, test_a_marker_showing_its_value_can_be_saved]
|
||||
- [ ] Card below other dashboard content (v1.50.1, HP-1500-02): place the card
|
||||
after a tall card in a normal dashboard — the plan still gets most of the
|
||||
viewport instead of a zero-height stage [auto: smoke_zoom_out]
|
||||
- [ ] Frame never degenerate (v1.50.1, HP-1500-03): a space with one lone
|
||||
marker opens with canvas around it, not an empty scene; an absurd stored
|
||||
coordinate neither hides the plan nor is accepted by the server
|
||||
[auto: unit contentBounds + backend test_layout_coordinates_are_bounded]
|
||||
- [ ] Stranded migration repair (v1.50.1, HP-1500-01): geometry/repair with
|
||||
dry_run previews, applies with a backup, undo restores; wrong space is
|
||||
recoverable [auto: test_geometry_repair_is_explicit_previewable_and_undoable]
|
||||
- [ ] Editors see the whole canvas (v1.50.0, HP-1490-03): a hand-drawn space
|
||||
with one small room opens content-fit in View; switching to the plan
|
||||
editor shows the full square with room to draw a second room far away;
|
||||
|
||||
Reference in New Issue
Block a user