Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
AI

The AI Prompt That Checks a Multi-Step Wizard Form for State That Silently Gets Lost the Moment a User Navigates Back a Step

- 31.10.26 - ErcanOPAK

🤖 The AI Prompt That Checks a Multi-Step Wizard Form for State That Silently Gets Lost the Moment a User Navigates Back a Step

A multi-step wizard form usually keeps each step’s data in memory inside whichever component currently renders that step, which works perfectly as long as the user only ever moves forward, since each step mounts fresh, collects its own input, and hands the combined result off to whatever submits at the end. The moment a user clicks Back to review or change an earlier step, that step’s component has to either still exist with its previous values intact or be rebuilt from a value that was actually saved somewhere outside the component itself, and a wizard built without that second part quietly re-mounts the earlier step as blank, discarding whatever the user typed there even though the step after it, and the wizard’s own progress indicator, both still believe that step was completed.

🔎 The Prompt

You are reviewing a multi-step wizard form for state that gets
lost when a user navigates backward through the steps.

For the wizard implementation described below, check:

1. Where each step's field values actually live -- inside that
   step's own component state, in a shared parent or store that
   persists across steps, or nowhere at all beyond whatever the
   DOM currently holds.
2. What happens to a step's component, and its values, specifically
   when the user clicks Back: whether it stays mounted, gets
   rebuilt from a previously saved value, or gets rebuilt from
   nothing and silently resets to its defaults.
3. Whether the wizard's own completion indicator for a step gets
   reset to match that step's actual current values after going
   back and forward again, or keeps showing a step as complete
   even after its values were silently wiped out.
4. Any step whose fields depend on an earlier step's answer (a
   region dropdown that depends on a previously chosen country,
   for example), and whether going back to change that earlier
   answer correctly invalidates or refreshes the dependent step
   instead of leaving it showing options for an answer that no
   longer applies.

--- WIZARD COMPONENT STRUCTURE AND STATE MANAGEMENT CODE ---
<paste the wizard's step components and however state is passed
or stored between them></paste>

✅ What This Prompt Catches

  • A step component that initializes its input fields from empty defaults every time it mounts, with no check for a previously entered value, so clicking Back and then Next again silently shows that step as blank even though the user already filled it in once.
  • A wizard that stores each step’s value only in that step’s own local component state with nothing lifted to a shared parent, so the framework fully discards the state the instant the step unmounts on navigation, with no error or warning that anything was lost.
  • A progress indicator that marks a step as complete the first time its values pass validation and never re-checks that status afterward, so it keeps showing a checkmark for a step whose actual values were silently reset to blank several clicks ago.

🚨 Why This Is Dangerous

  • This prompt can only point out where a wizard’s architecture makes silent state loss possible, it can’t run the exact click sequence a real user will take, so treat every flagged step as a reason to test that specific back-and-forward path by hand, not as proof the bug has already been confirmed to happen.

A wizard form that only ever tests moving forward is testing the one path through it that was never actually at risk, since every real user eventually clicks Back to fix something, and that’s exactly the path nobody built the state to survive.

— AI Power User

Related posts:

The AI Prompt That Turns a Week of Baby Feeding and Diaper Log Notes Into a Pattern Summary to Bring...

The AI Prompt That Turns a Week of Baby Feeding and Diaper Log Notes Into a Pattern Summary to Bring...

AI Prompt — Code Refactoring With Constraints

AI Prompt — Code Refactoring With Constraints

AI Prompt: Generate API Documentation from Code

AI Prompt: Generate API Documentation from Code

Views: 8

Post navigation

CSS: Fix a Native CSS Nesting Rule That Silently Stops Matching Because the Nested Type Selector Needed an Explicit Ampersand and Never Got One
HTML5: Fix the inert Attribute Not Actually Blocking Tab Focus Inside a Modal’s Background Content Because a Focus-Trap Script Runs Before inert Takes Effect

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (981)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (653)
  • Add Constraint to SQL Table to ensure email contains @ (609)
  • Average of all values in a column that are not zero in SQL (570)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (547)
  • Find numbers with more than two decimal places in SQL (475)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit
  • SQL Server: Fix ROW_NUMBER Ties Reordering Between Identical Runs
  • C#: Fix an Enum HasFlag Returning True for the Zero Value
  • WordPress: Fix Featured Images Vanishing After a CDN Migration
  • Photoshop: Fix Content-Aware Fill Smearing a Repeating Pattern
  • Asp.Net Core: Fix Antiforgery Tokens Rejected Behind a Reverse Proxy

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (981)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (858)
  • How to select distinct rows in a datatable in C# (854)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com