summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-01 15:18:27 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-01 15:30:53 +0200
commit5c25e5a4f42f2eb05c525a284cd584786324b6e1 (patch)
treeb35204251e3a4458236c151bcaf7f9e77f8bf7ee
parentb83803a91753b38435eb4d3be2e683daae9b4de9 (diff)
downloadmeshbay-5c25e5a4f42f2eb05c525a284cd584786324b6e1.tar.gz
fix(hub): adjust no-group prompt and post-create wizard step
No-group home/explore message: when the hub offers no public groups, drop the "browse public groups" invitation and just ask to be invited by an admin. New home.invite_only key added to all ten catalogues. Create-group wizard done step: reword the message to point at inviting members, and send the button to the group's Settings tab (where the invite form lives) instead of a stale /groups/<id> path that never matched the router. The landing tab is a one-shot session hint, so the usual per-user default-tab preference is left untouched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNPfgH6VWcRzJDZGuzy1jJ
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/app.js8
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/create-group-page.js8
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/group-page.js21
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/de.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/en.js5
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/es.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/it.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js3
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js3
13 files changed, 53 insertions, 16 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js
index 994cb73..06b6c10 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js
@@ -358,7 +358,7 @@ function NotificationFeed({ notifications, onMarkRead, onPurge }) {
`;
}
-function HomePage({ groups, notifications, onMarkRead, onPurge }) {
+function HomePage({ groups, notifications, onMarkRead, onPurge, allowPublicGroups = true }) {
const [setupDismissed, setSetupDismissed] = useState(false);
if (groups.length === 0) {
@@ -373,7 +373,9 @@ function HomePage({ groups, notifications, onMarkRead, onPurge }) {
onMarkRead=${onMarkRead} onPurge=${onPurge} />
<p class="page-message">
${t('home.no_groups')}
- ${' '}${t('home.browse_prefix')}<a href="#/explore">${t('home.browse_link')}</a>${t('home.browse_suffix')}
+ ${' '}${allowPublicGroups
+ ? html`${t('home.browse_prefix')}<a href="#/explore">${t('home.browse_link')}</a>${t('home.browse_suffix')}`
+ : t('home.invite_only')}
</p>
</div>
`;
@@ -846,6 +848,7 @@ function App() {
page = (user.role === 'moderator' || user.role === 'admin')
? html`<${LazyAdminPage} token=${user.token} role=${user.role} />`
: html`<${HomePage} groups=${groups} notifications=${notifications}
+ allowPublicGroups=${allowPublicGroups}
onMarkRead=${markRead} onPurge=${purgeNotifications} />`;
} else if (route === '/settings') {
page = html`<${SettingsPage} user=${user} theme=${theme}
@@ -862,6 +865,7 @@ function App() {
page = html`<${ProfilePage} user=${user} onLogout=${authCtx.logout} />`;
} else {
page = html`<${HomePage} groups=${groups} notifications=${notifications}
+ allowPublicGroups=${allowPublicGroups}
onMarkRead=${markRead} onPurge=${purgeNotifications} />`;
}
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/create-group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/create-group-page.js
index b23b504..d86521f 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/create-group-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/create-group-page.js
@@ -507,7 +507,13 @@ function CreateGroupWizard({ token, username, onCreated, allowPublicGroups = tru
<h2>${t('wizard.done_title')}</h2>
<p class="page-message">${t('wizard.done_message')}</p>
<button class="btn btn-primary" style="margin-top:16px"
- onClick=${() => navigate(`/groups/${groupId}`)}>
+ onClick=${() => {
+ // Land on the group's Settings tab this once — that is where the invite
+ // form is. GroupPage consumes this without disturbing the user's own
+ // default-tab preference for later visits.
+ session.openGroupTab = { groupId, tab: 'settings' };
+ navigate(`/group/${groupId}`);
+ }}>
${t('wizard.go_to_group')}</button>
</div>`;
}
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
index d7c81ad..6b9c82a 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/group-page.js
@@ -35,8 +35,25 @@ function GroupPage({ groupId, group, token, username, userId, userPrefs,
const [descDraft, setDescDraft] = useState('');
const [savingDesc, setSavingDesc] = useState(false);
const defaultTab = (userPrefs && (userPrefs[`default_tab:${groupId}`] || userPrefs['default_tab'])) || 'chat';
- const [tab, setTab] = useState(defaultTab);
- useEffect(() => { setTab(defaultTab); }, [groupId]);
+ // The create-group wizard can request a one-shot landing tab (Settings, where
+ // the invite form is) via session.openGroupTab. It applies once, only to the
+ // group it names, and never touches the user's default-tab preference — every
+ // other way into a group still lands on that preference, or 'chat'.
+ const consumeTabOverride = useCallback(() => {
+ const o = session.openGroupTab;
+ if (o && o.groupId === groupId) { session.openGroupTab = null; return o.tab; }
+ return null;
+ }, [groupId]);
+ const [tab, setTab] = useState(() => consumeTabOverride() || defaultTab);
+ // GroupPage is not remounted when switching groups (see the refreshedRef note
+ // below), so react to a real groupId change here — but not to the initial
+ // mount, where useState already picked the right tab.
+ const tabGroupRef = useRef(groupId);
+ useEffect(() => {
+ if (tabGroupRef.current === groupId) return;
+ tabGroupRef.current = groupId;
+ setTab(consumeTabOverride() || defaultTab);
+ }, [groupId]);
const [groupMuted, setGroupMuted] = useState(() => !!(group && group.muted));
const _lastTouch = useRef(0);
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
index 6c03726..b99a576 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/de.js
@@ -101,6 +101,7 @@ export default {
'home.browse_prefix': 'Sehen Sie sich die ',
'home.browse_link': 'öffentlichen Gruppen',
'home.browse_suffix': ' an oder bitten Sie einen Gruppenadministrator um eine Einladung.',
+ 'home.invite_only': 'Bitten Sie einen Gruppenadministrator um eine Einladung.',
'home.my_groups': 'Meine Gruppen',
// Explore
@@ -819,7 +820,7 @@ export default {
'wizard.indexing_progress': 'Indizierung… {pct}%',
'wizard.indexing_current_dir': 'Wird gescannt: {dir}',
'wizard.done_title': 'Gruppe erstellt',
- 'wizard.done_message': 'Ihre Gruppe ist bereit. Ihr Node hostet sie und die Verschlüsselung ist eingerichtet.',
+ 'wizard.done_message': 'Ihre Gruppe ist bereit — Ihr Node hostet sie und die Verschlüsselung ist eingerichtet. Laden Sie jetzt über den Tab „Einstellungen“ Mitglieder ein.',
'wizard.go_to_group': 'Zur Gruppe',
'wizard.finish_later': 'Einrichtung später abschließen',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
index 88dca15..76a82db 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/en.js
@@ -102,6 +102,7 @@ export default {
'home.browse_prefix': 'Browse ',
'home.browse_link': 'public groups',
'home.browse_suffix': ' or ask a group admin to invite you.',
+ 'home.invite_only': 'Ask a group admin to invite you.',
'home.my_groups': 'My Groups',
// Explore
@@ -531,8 +532,8 @@ export default {
'wizard.indexing_current_dir': 'Scanning: {dir}',
'wizard.finish_later': 'Finish setup later',
'wizard.done_title': 'Group created',
- 'wizard.done_message': 'Your group is ready. Your node is hosting it and encryption is set up.',
- 'wizard.go_to_group': 'Go to group',
+ 'wizard.done_message': 'Your group is ready — your node is hosting it and encryption is set up. Now invite people to it from the Settings tab.',
+ 'wizard.go_to_group': 'Go to the group',
// First-run setup wizard (Electron-only)
'setup.welcome_title': 'Welcome to MeshBay',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
index cf0d6d4..14b1e0b 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/es.js
@@ -99,6 +99,7 @@ export default {
'home.browse_prefix': 'Explore los ',
'home.browse_link': 'grupos públicos',
'home.browse_suffix': ' o pida a un administrador de grupo que le invite.',
+ 'home.invite_only': 'Pida a un administrador de grupo que le invite.',
'home.my_groups': 'Mis grupos',
// Explore
@@ -815,7 +816,7 @@ export default {
'wizard.indexing_progress': 'Indexando… {pct}%',
'wizard.indexing_current_dir': 'Analizando: {dir}',
'wizard.done_title': 'Grupo creado',
- 'wizard.done_message': 'Su grupo está listo. Su node lo aloja y el cifrado está configurado.',
+ 'wizard.done_message': 'Su grupo está listo: su node lo aloja y el cifrado está configurado. Ahora invite a miembros desde la pestaña Ajustes.',
'wizard.go_to_group': 'Ir al grupo',
'wizard.finish_later': 'Finalizar configuración más tarde',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
index 138c2cc..aba14cb 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/fr.js
@@ -100,6 +100,7 @@ export default {
'home.browse_prefix': 'Parcourez les ',
'home.browse_link': 'groupes publics',
'home.browse_suffix': " ou demandez à l'administrateur d'un groupe de vous inviter.",
+ 'home.invite_only': "Demandez à l'administrateur d'un groupe de vous inviter.",
'home.my_groups': 'Mes groupes',
// Explore
@@ -830,7 +831,7 @@ export default {
'wizard.indexing_progress': 'Indexation… {pct} %',
'wizard.indexing_current_dir': 'Analyse : {dir}',
'wizard.done_title': 'Groupe créé',
- 'wizard.done_message': 'Votre groupe est prêt. Votre node l\'héberge et le chiffrement est configuré.',
+ 'wizard.done_message': 'Votre groupe est prêt — votre node l\'héberge et le chiffrement est configuré. Invitez maintenant des membres depuis l\'onglet Paramètres.',
'wizard.go_to_group': 'Aller au groupe',
'wizard.finish_later': 'Terminer la configuration plus tard',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
index 21a7fca..19e812b 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/it.js
@@ -100,6 +100,7 @@ export default {
'home.browse_prefix': 'Dia un’occhiata ai ',
'home.browse_link': 'gruppi pubblici',
'home.browse_suffix': " oppure chieda a un amministratore di gruppo di invitarla.",
+ 'home.invite_only': 'Chieda a un amministratore di gruppo di invitarla.',
'home.my_groups': 'I miei gruppi',
// Explore
@@ -829,7 +830,7 @@ export default {
'wizard.indexing_progress': 'Indicizzazione… {pct}%',
'wizard.indexing_current_dir': 'Scansione: {dir}',
'wizard.done_title': 'Gruppo creato',
- 'wizard.done_message': 'Il suo gruppo è pronto. Il suo node lo ospita e la cifratura è configurata.',
+ 'wizard.done_message': 'Il suo gruppo è pronto: il suo node lo ospita e la cifratura è configurata. Ora inviti dei membri dalla scheda Impostazioni.',
'wizard.go_to_group': 'Vai al gruppo',
'wizard.finish_later': 'Completa la configurazione in seguito',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
index e74750f..98d978b 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/ja.js
@@ -98,6 +98,7 @@ export default {
'home.browse_prefix': '',
'home.browse_link': '公開グループ',
'home.browse_suffix': 'を見てみるか、グループ管理者に招待を依頼してください。',
+ 'home.invite_only': 'グループ管理者に招待を依頼してください。',
'home.my_groups': 'マイグループ',
// Explore
@@ -813,7 +814,7 @@ export default {
'wizard.indexing_progress': 'インデックス中… {pct}%',
'wizard.indexing_current_dir': 'スキャン中: {dir}',
'wizard.done_title': 'グループを作成しました',
- 'wizard.done_message': 'グループの準備ができました。node がホストし、暗号化が設定されています。',
+ 'wizard.done_message': 'グループの準備ができました。node がホストし、暗号化が設定されています。次は「設定」タブからメンバーを招待しましょう。',
'wizard.go_to_group': 'グループを開く',
'wizard.finish_later': 'セットアップを後で完了',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
index 9f15053..d66d914 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/nl.js
@@ -101,6 +101,7 @@ export default {
'home.browse_prefix': 'Bekijk de ',
'home.browse_link': 'openbare groepen',
'home.browse_suffix': ' of vraag een groepsbeheerder om u uit te nodigen.',
+ 'home.invite_only': 'Vraag een groepsbeheerder om u uit te nodigen.',
'home.my_groups': 'Mijn groepen',
// Explore
@@ -831,7 +832,7 @@ export default {
'wizard.indexing_progress': 'Bezig met indexeren… {pct}%',
'wizard.indexing_current_dir': 'Scannen: {dir}',
'wizard.done_title': 'Groep aangemaakt',
- 'wizard.done_message': 'Uw groep is klaar. Uw node host de groep en de versleuteling is ingesteld.',
+ 'wizard.done_message': 'Uw groep is klaar — uw node host de groep en de versleuteling is ingesteld. Nodig nu leden uit via het tabblad Instellingen.',
'wizard.go_to_group': 'Naar groep',
'wizard.finish_later': 'Later voltooien',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
index 069d642..bae3376 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pl.js
@@ -105,6 +105,7 @@ export default {
'home.browse_prefix': 'Warto przejrzeć ',
'home.browse_link': 'grupy publiczne',
'home.browse_suffix': ' albo poprosić administratora grupy o zaproszenie.',
+ 'home.invite_only': 'Proszę poprosić administratora grupy o zaproszenie.',
'home.my_groups': 'Moje grupy',
// Explore
@@ -857,7 +858,7 @@ export default {
'wizard.indexing_progress': 'Indeksowanie… {pct}%',
'wizard.indexing_current_dir': 'Skanowanie: {dir}',
'wizard.done_title': 'Grupa utworzona',
- 'wizard.done_message': 'Grupa jest gotowa. Node ją hostuje, a szyfrowanie jest skonfigurowane.',
+ 'wizard.done_message': 'Grupa jest gotowa — Node ją hostuje, a szyfrowanie jest skonfigurowane. Teraz zaproś członków z karty Ustawienia.',
'wizard.go_to_group': 'Przejdź do grupy',
'wizard.finish_later': 'Dokończ konfigurację później',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
index a1a1352..6825926 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/pt-BR.js
@@ -101,6 +101,7 @@ export default {
'home.browse_prefix': 'Explore os ',
'home.browse_link': 'grupos públicos',
'home.browse_suffix': ' ou peça a um administrador de grupo que o convide.',
+ 'home.invite_only': 'Peça a um administrador de grupo que o convide.',
'home.my_groups': 'Meus grupos',
// Explore
@@ -816,7 +817,7 @@ export default {
'wizard.indexing_progress': 'Indexando… {pct}%',
'wizard.indexing_current_dir': 'Analisando: {dir}',
'wizard.done_title': 'Grupo criado',
- 'wizard.done_message': 'Seu grupo está pronto. Seu node o está hospedando e a criptografia está configurada.',
+ 'wizard.done_message': 'Seu grupo está pronto — seu node o está hospedando e a criptografia está configurada. Agora convide membros pela aba Configurações.',
'wizard.go_to_group': 'Ir para o grupo',
'wizard.finish_later': 'Finalizar configuração depois',
'node.stun_servers': 'STUN Servers',
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
index b0c88ff..b4567e7 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/locales/zh-CN.js
@@ -98,6 +98,7 @@ export default {
'home.browse_prefix': '浏览',
'home.browse_link': '公开群组',
'home.browse_suffix': ',或请群组管理员邀请您。',
+ 'home.invite_only': '请群组管理员邀请您。',
'home.my_groups': '我的群组',
// Explore
@@ -801,7 +802,7 @@ export default {
'wizard.indexing_progress': '正在索引… {pct}%',
'wizard.indexing_current_dir': '正在扫描:{dir}',
'wizard.done_title': '群组已创建',
- 'wizard.done_message': '您的群组已就绪。您的 node 正在托管它,加密已设置完成。',
+ 'wizard.done_message': '您的群组已就绪。您的 node 正在托管它,加密已设置完成。现在可以在“设置”标签页中邀请成员。',
'wizard.go_to_group': '前往群组',
'wizard.finish_later': '稍后完成设置',
'node.stun_servers': 'STUN Servers',