|
| 1 | +# Proposed: dismissing an editor preserves invested input |
| 2 | + |
| 3 | +Status: proposed cross-surface decision, not ratified policy. |
| 4 | + |
| 5 | +Leaving an unsent composition through Cancel, close, back, swipe, Escape or a |
| 6 | +change of target should preserve the draft with its destination, or ask for an |
| 7 | +explicit discard decision. Empty editors can close directly. Explicit Discard |
| 8 | +is itself a decision; it does not need a second confirmation. |
| 9 | + |
| 10 | +This applies to web and Electron review editors and React Native review sheets |
| 11 | +and task composers. Controls can differ by platform. A draft belongs to its |
| 12 | +environment and thread or pull request, plus its file, revision and selected |
| 13 | +lines where applicable. Retaining words without that context risks sending them |
| 14 | +to the wrong place. |
| 15 | + |
| 16 | +Submission failure must retain the input. Success may clear only the submitted |
| 17 | +snapshot, including attachments; new input entered during submission is still a |
| 18 | +draft. Moving a review comment into the task composer is a submission boundary |
| 19 | +for its editor, even though the agent has not received it yet. |
| 20 | + |
| 21 | +Use existing draft stores when they already own the composition. Otherwise, |
| 22 | +protect removal at the navigation boundary so native back and swipe cannot |
| 23 | +bypass an on-screen button. Do not add confirmations to ordinary navigation |
| 24 | +that already preserves drafts. This decision does not promise recovery after |
| 25 | +process termination for editors whose existing lifetime is the current session. |
| 26 | + |
| 27 | +The rationale is recoverability with minimal interruption, informed by Apple's |
| 28 | +[Undo and redo](https://developer.apple.com/design/human-interface-guidelines/undo-and-redo) |
| 29 | +and [Modality](https://developer.apple.com/design/human-interface-guidelines/modality) |
| 30 | +guidance. These references do not prescribe identical controls across platforms. |
| 31 | + |
| 32 | +Acceptance cases: |
| 33 | + |
| 34 | +- An empty editor closes without a prompt; text alone or attachments alone |
| 35 | + cannot disappear through an ambiguous dismissal. |
| 36 | +- Keeping a draft after a discard prompt preserves its text, files and target; |
| 37 | + confirming Discard closes it. Repeated dismissal attempts do not stack prompts. |
| 38 | +- Close, back, swipe, Escape and parent navigation obey the same data-loss rule. |
| 39 | +- Reopening preserved input restores its original destination. A new selection |
| 40 | + cannot silently retarget an editor that is already open. |
| 41 | +- Adding to a full destination draft fails without partial transfer or loss; |
| 42 | + correcting the capacity problem permits a retry. |
| 43 | +- Successful transfer closes without a discard prompt and preserves destination |
| 44 | + content. Any later edits remain available for the next submission. |
0 commit comments