test(cmux-next): HomeDock allow_tabs wait: replacement, end when Home's page goes, no polling (#30826 review follow-ups)
LA
5d ago+70+70+01234567890123456789-10-10-01234567890123456789
Summary
Review follow-ups to #30826 (Home's dock takes tabs once the tree reports its ids). This PR changes tests and one comment only, with no behavior change.
From the independent review of #30826 (https://github.com/manaflow-ai/cmux/pull/30826#issuecomment-6557423419):
- Continuation:
HomeDockAllowTabsTestsno longer loops 2000Task.yieldcalls (REVIEW.md section 6). The recorded request resumes a continuation (Sent.next(after:)), and the test also awaits the wait task itself. The suite's time limit bounds a request that never comes. - UserDefaults cleanup: each test removes its UserDefaults suite (
removePersistentDomain), so no plist is left on the test host. - Two new tests:
aLaterStepReplacesTheWait: two steps with no ids, then the ids. Exactly onecolumn.updategoes, and the first wait ends with none.theWaitEndsWhenHomesPageIsGone: the wait ends when Home's page leaves the tree, and the ids arriving later send nothing.
HomeDock:- A comment says why the wait keeps the
HomeDockacross its await. A window Home makes aHomeDockper connect and keeps none, so a later "fix" to a weak capture would break it. allowTabsWaitisprivate(set)so the tests can await it.
- A comment says why the wait keeps the
Changelog
none
Testing
These are new and changed tests. They cover behavior #30826 already added, so there is no red commit. They pass at the base of this change: the HomeDock behavior is #30826's, unchanged here.
- Compile:
cmux-ci compile-check --app --package CmuxNext --recipe-version 2job 6c98bb17a942958e881d7ac8 passed at 43924e7e552 (before the merge of feat). Job bf17cd1e372f688d77a98f09 runs at the head f842b961924. - Display worker,
CMUX_TEST_REQUIRE_GUI=1,HomeDockAllowTabsTests: GREEN_RESULT
Observed / Not run
- Observed: the compile-check above and
prepush-gate.pywith no new violations. - Not run: the full CmuxNextHomeEngineTests suite.
perf claim: none
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Review follow-ups to #30826; tests and one comment only, with no behavior change.
HomeDockAllowTabsTestsno longer loops 2000Task.yieldcalls — a recorded request resumes a continuation, and each test awaits the wait task itself.- Each test removes its
UserDefaultssuite, so no plist is left on the test host. - Two new tests: a later step replaces the wait (exactly one
allow_tabsrequest when the ids come), and the wait ends when Home's page leaves the tree. HomeDock.allowTabsWaitis nowprivate(set)for the tests, and a comment explains why the wait holds theHomeDockacross its await.