Show a non-empty Step 5 for Community Edition upgrades instead of skipping it

3.1.0 CE already includes the app stores, so Step 5 doesn't need to
ask its usual deviceTool/devmode question in that path -- but an
empty or skipped step reads worse than a short one, so it now shows
"App Stores are already installed in 3.1.0, but you may want to visit
them to check for updates and to see what's new," auto-selected same
as Step 4's CE branch.

Broadened wosaChoose's filter-dependent invalidation to fire on any
answer within a filter step, not just the top-level device category:
Step 3's own "upgrade to Community Edition" sub-answer, one level
deeper, now also needs to invalidate Step 4/5's stored path so a
previously-chosen index (e.g. picking "No" among Step 5's two normal
options) can't point past the end of a freshly-narrowed one-item list.
This commit is contained in:
jonwise committed 2026-09-04 16:49:28 -04:00
1 parent 2b4beaa365
commit f60306f182
2 files changed
+34 -12

No files matched your search

+8
View File
@@ -121,6 +121,14 @@ function wosaChoose(stepId, level, idx) {
wosaState.path[otherId] = [idx];
}
}
}
/* Any answer within a filter step -- not just the top-level device
category -- can change what filter-dependent steps should show
(e.g. Step 3's own "upgrade to Community Edition" sub-answer, one
level deeper than the device category). Invalidating on every
change here is cheap and always correct, since filter-dependent
options are re-derived fresh from state on every render anyway. */
if (isFilterStep) {
wosaInvalidateFilterDependents();
}
+26 -12
View File
@@ -428,20 +428,34 @@ var STEP5_DEVMODE_NODE = {
}
};
var STEP5_OPT_CE_INSTALLED = {
label: "App Stores are already installed in 3.1.0, but you may want to visit them to check for updates and to see what's new.",
content: "<p><button type='button' class='continue-btn' onclick='wosaGoto(6)'>Continue to Step 6 &rarr;</button></p>"
};
var STEP5_NODE = {
q: "Did your device just finish Step 4 (deviceTool)?",
options: [
{
label: "Yes",
content: "<p>Good &mdash; deviceTool already enables homebrew installs, so there's nothing extra to turn on.</p>",
next: STEP5_WOSQI_NODE
},
{
label: "No, it was already activated and working",
content: "<p>You'll need to turn on Developer Mode first, to allow homebrew app installs.</p>",
next: STEP5_DEVMODE_NODE
q: function () {
return wosaIsCEUpgrade() ? "" : "Did your device just finish Step 4 (deviceTool)?";
},
/* A Community Edition upgrade already includes the app stores --
nothing to install, just worth a visit for updates. */
options: function () {
if (wosaIsCEUpgrade()) {
return [STEP5_OPT_CE_INSTALLED];
}
]
return [
{
label: "Yes",
content: "<p>Good &mdash; deviceTool already enables homebrew installs, so there's nothing extra to turn on.</p>",
next: STEP5_WOSQI_NODE
},
{
label: "No, it was already activated and working",
content: "<p>You'll need to turn on Developer Mode first, to allow homebrew app installs.</p>",
next: STEP5_DEVMODE_NODE
}
];
}
};
var STEP6_NODE = {