summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/app.js')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/app.js37
1 files changed, 24 insertions, 13 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js
index 1530ff5..5ec1ac8 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js
@@ -926,11 +926,15 @@ function CreateGroupWizard({ token, username, onCreated }) {
{ label: t('wizard.step_attach'), status: 'pending' },
];
steps.push({ label: t('wizard.step_index'), status: 'pending' });
- // Only a step at all when it does something — the common case (every
- // app left on, the default) has nothing to set and no reason to show a
- // step for it. After indexing (see the execution order below for why).
- if (enabledApps.length < APPS.length)
- steps.push({ label: t('wizard.step_apps'), status: 'pending' });
+ // Always a step: the node's own default for a brand-new group is
+ // `chat, files` only (Roster.DEFAULT_APPS) — narrower than "every app
+ // checked" here, which is this wizard's own default. Skipping this call
+ // whenever nothing was *unchecked* used to assume those two defaults
+ // agreed; they don't, so leaving every box checked — the common,
+ // recommended case — silently left Videos/Music/Photos disabled on the
+ // node (found live 2026-08-25: no `set_enabled_apps`/"Enabled apps for
+ // group" ever logged for a group created with every app left on).
+ steps.push({ label: t('wizard.step_apps'), status: 'pending' });
if (roots.length > 1)
steps.push({ label: t('wizard.step_add_roots'), status: 'pending' });
steps.push({ label: t('wizard.step_gek'), status: 'pending' });
@@ -1009,7 +1013,10 @@ function CreateGroupWizard({ token, username, onCreated }) {
update('done');
advance();
- // 4. Narrow the enabled apps down, if the operator unchecked any.
+ // 4. Set the enabled apps — unconditionally (see the step-list
+ // comment above on why "only if narrowed" was wrong: the node's own
+ // default is not "every app", so leaving every box checked must still
+ // be told to the node explicitly).
// Used to run *before* the scan above, reasoning that a member
// joining mid-scan should never briefly see an app meant to be off —
// but nobody can join before the group is hosted either (same
@@ -1019,13 +1026,11 @@ function CreateGroupWizard({ token, username, onCreated }) {
// indefinite "Group not hosted on this node" (found live against a
// real, several-thousand-file library: withRetry's five attempts
// don't come close to covering a scan that takes minutes).
- if (enabledApps.length < APPS.length) {
- update('running');
- await withRetry(() => platform.node.call(
- 'PUT', `/api/groups/${gid}/apps`, { apps: enabledApps }));
- update('done');
- advance();
- }
+ update('running');
+ await withRetry(() => platform.node.call(
+ 'PUT', `/api/groups/${gid}/apps`, { apps: enabledApps }));
+ update('done');
+ advance();
// 5. Add extra roots (if >1)
if (roots.length > 1) {
@@ -1038,6 +1043,12 @@ function CreateGroupWizard({ token, username, onCreated }) {
upload: i === uploadIdx,
}));
}
+ // Each add above only schedules its scan (platform.js's
+ // waitForRootsIndexed docstring) — wait for it to actually finish,
+ // reusing the same progress bar step 3 fed, or this step reports
+ // "done" while the node is still hashing gigabytes behind the
+ // scenes (found live 2026-08-25).
+ await platform.waitForRootsIndexed(gid, setIndexProgress);
update('done');
advance();
}