Skip to content

fix(widgets): min-height resize no longer re-enters the legacy migration (F-379)#92

Merged
th3-br41n merged 1 commit into
mainfrom
fix/widget-min-resize-migration
Jul 3, 2026
Merged

fix(widgets): min-height resize no longer re-enters the legacy migration (F-379)#92
th3-br41n merged 1 commit into
mainfrom
fix/widget-min-resize-migration

Conversation

@th3-br41n

@th3-br41n th3-br41n commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What

Resizing a dashboard widget to its minimum height teleported it ×10 off-screen (to ~y 4000px) on the next dashboard load, and follow-up writes baked the wrong position in — the card looked deleted after a restart.

Why

migrateWidgetRecord treats a record as a pre-7.3b legacy footprint when w ≤ 6 OR h ≤ 6 cells and scales it ×10. But WIDGET_MIN_H is exactly 6, so a current-format widget at min height re-enters the migration. The "self-terminating" invariant only ever held for width (WIDGET_MIN_W 8 > 6).

Fix

Discriminate on width alone: every current-format record has w ≥ 8 > LEGACY_WIDGET_MAX_CELL; legacy footprints were ≤ 4 icon cells wide. Comment updated with the invariant + F-379 reference.

Tests

  • new: min-footprint record (8×6) is returned untouched (the F-379 boundary)
  • new: legacy 4×2 record still migrates ×10
  • bun --bun vitest run …/dashboard/grid.test.ts …/app-icon-cache.test.ts → 30/30 green.

Found in dogfood session 375 (harness PR #24, tests/dogfood/sessions/375-widgets-dogfood.spec.ts) — friction log F-379 has the full decode of the teleported record.

🤖 Generated with Claude Code

…ion (F-323)

migrateWidgetRecord classified a record as pre-7.3b legacy when w<=6 OR
h<=6 cells — but WIDGET_MIN_H is exactly 6, so resizing a widget to its
minimum height made the next load scale its x/y (and footprint) x10 and
teleport the card ~3200px below the fold (dogfood session 375). Width
alone discriminates the formats: current-format min width (8) is above
the legacy ceiling (6), legacy footprints were <=4 cells wide.

Regression tests pin the h=6 boundary and the legacy path.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@th3-br41n th3-br41n merged commit a6bb100 into main Jul 3, 2026
3 checks passed
@th3-br41n th3-br41n deleted the fix/widget-min-resize-migration branch July 3, 2026 20:12
@th3-br41n th3-br41n changed the title fix(widgets): min-height resize no longer re-enters the legacy migration (F-323) fix(widgets): min-height resize no longer re-enters the legacy migration (F-379) Jul 3, 2026
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