trackslash
VAULT-124 P2 For an agent

Mac app: a new item's row is clipped vertically in the list until it lays out again

0
All issues

Description

Found by Bradley on the Mac app (2026-10-10). After adding an item, its row first appears clipped vertically in the Items list, so some of its content is cut off. It looks right later, once the list lays out again.

Where to look

  • The Items list is List(dataModel.items, selection:) in VaultMacMainView, with one VaultMacItemRow per item.
  • A macOS List measures a row's height when the row is inserted. If the row grows afterwards, the list can keep the old height, and the content is clipped until something makes it lay out again.
  • Likely ways the row grows: a code's text, timer or Show Next Code appearing once the code is first generated after insertion; tags or the account line arriving after the first layout; or the row being measured while its editor sheet is still closing.
  • Check codes and notes, with and without tags, with an issuer and account name, and with Show Next Code on.

Change

  • A new row has its full height from the start. For example, the row could reserve its final layout before the code is generated, with a placeholder the code's size. Or the row's height could be stable whatever is still loading, or the list could be made to measure the row again when its content changes size.
  • Editing an item doesn't clip its row either.

Tests

  • A snapshot or layout test of a just-added code's row and a just-added note's row, at their full height.
  • If it can be pinned that way, a Mac UI test that adds a code and checks the row's frame is as tall as an existing row's.

Done when

A new item's row shows all its content as soon as it appears, for every kind of item, and a test pins it.

Linked issues

1

Sub-issues

0

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Fixed in #733. The Mac's list measures the rows it has when it first shows them, but gives a row it inserts later its default 24 points: a probe that added two codes showed the second, inserted above the first, 24 points tall while its content needed 49, and still 24 three seconds later. Listing the rows with ForEach didn't change it. Every row in the Items list now has a minimum height of 49 points (defaultMinListRowHeight, a @ScaledMetric), the tallest kind of row, so an inserted row has its full height from the start; with it, the probe showed both rows at 49. Rows without a subtitle are now the same height as the rest. The Items list snapshots are re-recorded.

New Mac UI test MacItemEditingTests.test_newCode_addedAboveAnother_isListedAtItsFullHeight pins it, but hasn't run yet: the Mac UI tests were skipped for this PR, and VAULT-126 runs them.