diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-15 02:48:25 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-15 02:48:25 +0200 |
| commit | 99f95dadee1a3c892bb0bc87e3564f71d07c88e0 (patch) | |
| tree | 47691af252accd7097c0d7f58a9c2d44c10fb6ae /packages/meshbay-hub/tests/test_group_tab_fallback.py | |
| parent | acb0d666540dacb092f596dada25822d1d0466f0 (diff) | |
| download | meshbay-0.14.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.py | 19 |
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"] |