~amolith/willow#12: 
Handle going back to select a different forge

Selecting RSS then going back to select git doesn't actually clone the repo, it either continues using RSS or it retrieves the data from the database rather than fetching it from some remote. Needs more poking around and thinking to figure out a solution.

Status
REPORTED
Submitter
~amolith
Assigned to
No-one
Submitted
1 year, 2 months ago
Updated
1 year, 1 month ago
Labels
backend bug frontend v0.0.1

~amolith 1 year, 1 month ago

We currently persist state by keeping data in URL parameters. Implementing sessions could not only make the URLs cleaner, but also help solve #12 (this ticket). When creating the HTML template, fill a hidden form field with a generated token that the backend uses to keep track of the submitted data. If the user clicks their browser's back button and selects a different forge, the session cookie associates the new submission with the old submission that had different values.

At startup, spawn a goroutine to clean up expired sessions. It should last the lifetime of the app and wake up on a timer, similar to how fetching releases currently works.

https://wiki.secluded.site/hypha/willow/meeting_2023-12-01#Stateful_forms

~amolith referenced this from #12 1 year, 1 month ago

Register here or Log in to comment, or comment via email.