Skip to content

r202639: draw the reported position range - #23

Merged
cayossarian merged 2 commits into
prerelease/0.10from
feat/positions
Oct 9, 2026
Merged

cayossarian merged 2 commits into
prerelease/0.10from
feat/positions

Conversation

@cayossarian

Copy link
Copy Markdown
Member

r202639: the grid draws the breaker positions the panel reports.

  • The panel size is taken only when it is a positive integer. A panel that does not know its size reports 0, and the card took that as the size and refused to load. A size of 0, below zero, fractional or not a number now counts as absent, and the size comes from the circuits. The entity fallback reads its panel_size attribute the same way.
  • Rows follow the reported positions. Topology may carry first_position and last_position. The grid draws one row per two positions over that range, labelled with the positions' own numbers. A range starting at 9 draws no slots 1 to 8, and a breaker above the panel size is drawn when the range reaches it. A panel that reports size 0 with its positions loads.
  • Without reported positions the range is 1 to the size, as before. It always widens to every tab a circuit occupies, so no circuit is dropped.
  • buildGridHTML takes a PositionRange in place of a row count. A 1 to 32 range renders byte-identical to a 32-space panel that reports no range.

The size check is its own first commit.

dist/ is not rebuilt here; the release rebuilds it.

Checks

  • npm test: 592 passed in 57 files (561 in 56 before)
  • npm run typecheck, npm run lint, node scripts/validate-i18n.mjs: clean
  • npm run build: clean
  • pre-commit hooks (prettier, eslint, typecheck, i18n) passed on every commit

A panel that does not know its size reports 0, which the card took as the
size and then refused to load. A size of 0, below zero, fractional or not a
number is now treated as absent, and the size comes from the circuits.

Part of the spanos3/r202639/03 batch 2 work.
Topology may report the panel's first and last breaker positions. The grid
draws rows over that range, labelled with the positions' own numbers, instead
of 1 to the panel size, so a breaker above the size is drawn and no empty
slot appears below the first position. A panel that reports size 0 with its
positions loads. Without reported positions the range is 1 to the size, as
before, and it always widens to every occupied tab.

Part of the spanos3/r202639/03 batch 2 work.
@cayossarian
cayossarian merged commit 70ee789 into prerelease/0.10 Oct 9, 2026
2 checks passed
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