Describe the Issue
The "Custom Instructions" panel in the Generator workspace does not persist user inputs.
Problem
If a user takes several minutes writing detailed custom guidelines for their documentation and then accidentally reloads the page, clicks a navigation link, or experiences a micro-disconnection, all their typed configuration text is lost instantly.
Proposed Solution
Save the user's repoUrl and customInstructions in browser sessionStorage or localStorage on input changes, and load them back on component mount.
Proposed Implementation Details
Use React effects to load and store input values:
// On mount:
useEffect(() => {
const savedInstructions = sessionStorage.getItem('generator_instructions');
if (savedInstructions) setCustomInstructions(savedInstructions);
}, []);
// On input change:
const handleInstructionsChange = (e) => {
setCustomInstructions(e.target.value);
sessionStorage.setItem('generator_instructions', e.target.value);
};
Describe the Issue
The "Custom Instructions" panel in the Generator workspace does not persist user inputs.
Problem
If a user takes several minutes writing detailed custom guidelines for their documentation and then accidentally reloads the page, clicks a navigation link, or experiences a micro-disconnection, all their typed configuration text is lost instantly.
Proposed Solution
Save the user's
repoUrlandcustomInstructionsin browsersessionStorageorlocalStorageon input changes, and load them back on component mount.Proposed Implementation Details
Use React effects to load and store input values: