aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests/test_group_tab_fallback.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-15 02:48:25 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-15 02:48:25 +0200
commit99f95dadee1a3c892bb0bc87e3564f71d07c88e0 (patch)
tree47691af252accd7097c0d7f58a9c2d44c10fb6ae /packages/meshbay-hub/tests/test_group_tab_fallback.py
parentacb0d666540dacb092f596dada25822d1d0466f0 (diff)
downloadmeshbay-99f95dadee1a3c892bb0bc87e3564f71d07c88e0.tar.gz
fix(ui): a group opened directly lands on the preferred app once preferences load0.14
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XuNrwLf5EFWCMHzfoEvnpm
Diffstat (limited to 'packages/meshbay-hub/tests/test_group_tab_fallback.py')
-rw-r--r--packages/meshbay-hub/tests/test_group_tab_fallback.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_group_tab_fallback.py b/packages/meshbay-hub/tests/test_group_tab_fallback.py
index 6310b9c..634c5eb 100644
--- a/packages/meshbay-hub/tests/test_group_tab_fallback.py
+++ b/packages/meshbay-hub/tests/test_group_tab_fallback.py
@@ -67,6 +67,25 @@ def test_a_preference_that_names_nothing_falls_back(cases):
assert cases["preference names nothing real"]["active"] == 0
+def test_a_preference_that_arrives_after_the_group_opened_applies(cases):
+ """The reported bug: Videos chosen in Settings, and a group opened directly
+ (a reload, a link) still landed on Chat.
+
+ app.js fetches the preferences after sign-in; GroupPage chose its tab at
+ mount and never looked again.
+ """
+ case = cases["preference arrives after the group opened"]
+ assert case["active"] == 2, (
+ f"the preference arrived and was ignored: landed on tab {case['active']}")
+
+
+def test_a_late_preference_does_not_undo_a_tab_the_reader_chose(cases):
+ """Arriving late must not yank someone off a tab they just clicked."""
+ case = cases["tab chosen before the preference arrives"]
+ assert case["active"] == 1, (
+ f"the reader clicked Files and was moved to tab {case['active']}")
+
+
def test_a_preference_the_group_offers_is_kept(cases):
"""The fallback must not become 'always the first app'."""
case = cases["preferred app present"]