Skip to content

Don't allow setup workflow escape#110

Open
benfinix wants to merge 3 commits intomainfrom
bugfix/setup-workflow-escape
Open

Don't allow setup workflow escape#110
benfinix wants to merge 3 commits intomainfrom
bugfix/setup-workflow-escape

Conversation

@benfinix
Copy link
Copy Markdown
Contributor

Three issues being addressed here:

  1. The installation workflow dialog was escapable when 'I stay' is an option. This has been disabled to make the workflow clearer. The user must select 'I stay' or 'I choose' to progress.
  2. On the installation completed step of the installation workflow, if the page is refreshed it will load the first installation step. This has been fixed by adding installationContext to the store. If installationContext.isCompleted is true, the installation completed screen will be shown on page reload. Logs and selected disk are also retained.
  3. Similarly, the configuration completed 'done' step of recovery could be left on reload. setupContext.isCompleted is now set when the user completes configuration,it will direct the user to 'STEP_DONE' when true.

…tedDisk and logs.

When installation is completed successfully, the context is saved so on refresh the success screen is persisted rather than going back to the start of the installation workflow.
@benfinix benfinix requested a review from SomeoneWeird April 23, 2025 03:59
@benfinix
Copy link
Copy Markdown
Contributor Author

@SomeoneWeird I'm looking for some feedback on this approach, is the store a good place to implement this?

Comment thread src/app_recovery.js
store.updateState({
setupContext: {
...this.context.store.setupContext,
isCompleted: true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, this is going to persist in cookies and break dev setup the next time you drop into recovery mode?

this._install_outcome = didErr ? "error" : "success"

if (this._install_outcome === "success") {
// Update store with installation completion and logs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: indentation

name: diskName,
sizePretty: this._installDisks[this._selected_disk_index].sizePretty
},
logs: this._logs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

weird indentation here

@SomeoneWeird
Copy link
Copy Markdown
Contributor

I think storing this as an ephemeral variable inside dogeboxd that is returned in the recovery bootstrap is a better place to store this, rather than the frontend?

@elusiveshiba elusiveshiba self-assigned this Jul 31, 2025
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.

3 participants