UCI Pages still lack a complete save workflow.
Some months ago we have a rather lengthy IRC chat on the topic with @jow-
I open this issue with the conclusions, to keep record and to track development:
<ianchi> Or perhaps it is simpler to cache both apply_sid and apply_user, and grant the commit if either match with the "confirm"
<jow> indeed
<jow> and the strictness or rather "looseness" can be set with the apply request
<jow> like uci/apply { rollback: true, allow_same_user: true }
<ianchi> ok
<ianchi> So, we seem to have found a middleground. I'll try to sum up to recheck:
<ianchi> 1) Do save - apply - confirm
<ianchi> 2) if confirm goes thru -> happy ending
<ianchi> 3) if it takes too much notify the user and urge to test new address, or config, or ..
<ianchi> 4) if still we are on the same page and the deadline is reached, notify that a rollback is being done
<ianchi> 5) do a resync to reload the reverted config
<ianchi> alternatively
<ianchi> 6) the user changed the address
<ianchi> 7) after "all" first load luci-ng send a "confirm", if it is rejected ignore it. If it is accepted, we could inform the user of successfull save.
<jow> yes
<ianchi> On step 4, we could also offer the option of resaving without rollback protection
<jow> optionally, but we would need to find a way to reach the device first in order to cancel pending rollbacks
<ianchi> but at that point in time the rollback deadline is already reached and so should have been performed. If a final confirm gets thru but gets rejected, we know we are back and rollbacked
<jow> right, okay
<ianchi> All this assumes that we change rpcd-uci to add the "allow_same_user" option
Summary of the main problems being addressed:
Enable the rollback mechanism to ensure protection against missconfigurations
Have a simple intuitive workflow for the general user, without many "complicated" options
Keep a feature similar to the "pending changes" that many people use to learn about how various UI changes manifest in the config
Have uci data to re-sync itself on save to rule out any possible out-of-sync scenario (errors, changes made from other sources)
Solve the cross-domain problem to store/reclaim sid when the router's ip changes after some config change (needed to confirm the changes and cancel the rollback)
UCI Pages still lack a complete save workflow. Some months ago we have a rather lengthy IRC chat on the topic with @jow- I open this issue with the conclusions, to keep record and to track development:
Summary of the main problems being addressed: