Skip to content

FFS-3880: delete on exit when creating an activity#1550

Open
millerti wants to merge 5 commits intomainfrom
TIMO/delete-on-close
Open

FFS-3880: delete on exit when creating an activity#1550
millerti wants to merge 5 commits intomainfrom
TIMO/delete-on-close

Conversation

@millerti
Copy link
Copy Markdown
Contributor

@millerti millerti commented Mar 31, 2026

FFS-3880

Changes

Now, when you exit the activity flow during creation only, the records we created along the way will be deleted. As such, you will no longer see a representation of the incomplete activity on the Activity Hub when you return to it. This should work whether you hit the exit button, the back button, or even navigate to the hub manually via URL.

Context for reviewers

I considered doing this by modifying the behavior of the exit button in the header; we could react to the lack of from_edit to recognize when we're in a creation flow, then issue a delete command. But I chose this way because it works even with the back button and there were fewer necessary changes. I'm open to feedback on this choice, though.

Testing instructions

  1. Verify that exiting early (before hitting save on the review page) results in your progress being discarded in all 6 activity flow types (all 4 self-attested flows and 2 validated flows). You can verify that this is working because when you return to the hub you should not see a card for your work, whereas before you would.
  2. Verify that when you exit a flow when editing an activity from a hub, your work is still saved. Nothing should be deleted. This too needs to be verified in all 6 flow types.
  3. Try exiting flows using the back button or by manually changing your URL to be /activities to go back to the hub. Your work should be deleted no matter what when you're in a creation flow.

Acceptance testing

  • Acceptance testing in PR Environment
    • This change can be verified in a PR environment. Run this Github Action with the existing PR and most recent git sha.

Preview environment

@millerti millerti marked this pull request as ready for review April 2, 2026 21:21
@github-actions github-actions bot requested a review from daphnegold April 2, 2026 21:22
Copy link
Copy Markdown
Contributor

@daphnegold daphnegold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great so far! Let me know what you think about adding logic for which flow owns the deletions.

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.

2 participants