trackslash
VAULT-65 P2

Rows that open a sheet ignore the first tap after changing step in the item editor

0
All issues

Description

Found while testing VAULT-16 in the simulator.

The bug: in the create and edit sheets, after moving to another step, the first tap on a row that opens its own sheet does nothing. The Tags, Encryption and Password rows all need two taps. Colour swatches and Continue are unaffected.

Repro: New Item → Note → type something → Continue → tap Tags once. Nothing happens. A second tap opens it.

Evidence: each ignored tap logs a UIKit warning:

Attempt to present … on PresentationHostingController … which is already presenting …

The QA agent's present-warnings.log and screenshots are in ~/Library/Caches/vault-sprint2/qa/VAULT-16/ on the Mac Studio.

Likely cause: the steps are swapped with .id(displayedStep) in DetailEditorView, while .sheet(isPresented:) sits inside each step. The outgoing step's presentation state probably lingers during the transition, so the first presentation collides with it.

Fix: present the rows' sheets from one place that outlives the step swap, such as a single .sheet(item:) on the editor. Or otherwise make sure no stale presentation remains after a step changes.

Tests: a regression test, or at minimum a check in the simulator that each sheet-opening row opens on the first tap in create and edit, after moving between steps both ways.

Sub-issues

0

Linked issues

0

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Fixed in https://github.com/badbundle/vault-app/pull/645 (merged as 4a4f8e1f).

Cause: it wasn't the .id(displayedStep) step swap; the bug happened without it too. Each row's .sheet was chained onto its Section, and a section applies modifiers to each of its parts, the footer included. That bound two sheets to one tap. SwiftUI presented one, then tried to replace it with the other, and UIKit refused, so nothing appeared.

Fix:

  • The Tags row and the Encryption/Password row now carry their sheet on the row button.
  • The note page's Select Text sheet (#637) moved onto its row too.

Regression test: SectionPresentationTests scans the sources for sheet, fullScreenCover or popover chained onto a Section, and fails on the old code. It shares a generalised ViewCallScanner with VAULT-54's SecretTextInputDeclarationTests.

Checked in the simulator: every sheet row opened on the first tap after moving between steps both ways. That covered create (note, code and recovery phrase) and edit, with Reduce Motion off and on, and no presentation warnings were logged.