fix(desktop): restore sleep/wake session recovery + repair 3 stale renderer tests#148
Merged
Merged
Conversation
…3 stale renderer tests The sleep/wake session resume+retry path in submitPromptText (added in 72f522d) was silently dropped by the session-presence merge (9ac0530) while its test survived. After sleep/wake the gateway's in-memory session table is cleared, so the first prompt.submit returns "session not found" and now surfaces as an error instead of transparently resuming the durable stored session and retrying. Restore the resume-once logic, preserving the Phase 2b sender_device params on both submit attempts. The other three were stale tests that broke when the components legitimately evolved — invisible because CI does not run the vitest UI suite: - model-settings: the same commit that added the "/set up/" assertion also removed the " - set up" dropdown suffix in favor of the inline setup flow. Drop the stale assertion; the unconfigured provider appearing at all is the full-universe signal (inline activation is covered by the next test). - toolset-config-panel: the inline "Set" button became a 3-dot actions menu (EnvVarActionsMenu). Drive the save through the menu, and stub the pointer-capture / scrollIntoView APIs Radix needs under jsdom. - streaming (reasoning code card): reasoning auto-opens while running and streams through SmoothStreamingText, so the old "click to expand" collapsed it and the rAF reveal had not drained. Drop the click and pump the reveal. All 485 renderer tests pass; tsc and eslint clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🔎 Lint report:
|
This was referenced Jun 10, 2026
OmarB97
pushed a commit
that referenced
this pull request
Jun 10, 2026
A unit test could reach a real 'pip install': with the elevenlabs SDK
absent, any agent init whose tool checks touch a lazy feature walks
check_tts_requirements -> ensure("tts.elevenlabs") ->
_venv_pip_install (allow_lazy_installs fails open by design). Under
tests/run_agent/test_create_openai_client_proxy_env.py the install
tunnels through the test's fake proxy env vars and hangs to the suite
timeout — the intermittent test (3) failures on #148/#155.
Set HERMES_DISABLE_LAZY_INSTALLS=1 in _hermetic_environment, next to
the equivalent TIRITH_ENABLED guard: ensure() now raises
FeatureUnavailable immediately and the TTS check degrades to False
deterministically. tests/tools/test_lazy_deps.py already overrides the
var in both directions per test.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
OmarB97
added a commit
that referenced
this pull request
Jun 10, 2026
…te renderer tests in CI (#160) The running-turn timer's per-session clock (upstream NousResearch#41182) was clipped by the upstream-sync's internal merge (e866446): ClientSessionState.turnStartedAt and its tests survived, but all six seed/clear sites in use-message-stream.ts and the view-sync mirror in use-session-state-cache.ts vanished — so the statusbar timer never starts, and a backgrounded turn's elapsed time zeroes on focus (the exact bug NousResearch#41182 fixed). Restored all seven sites to upstream's shape. Renderer suite: 602/602 (first fully-green run; also passes under TZ=UTC). Because nothing in CI ran this suite, the clobber merged silently — same class as the sleep/wake-recovery loss (#148). Add renderer-tests.yml gating `vitest run --environment jsdom src` on every PR so the next one can't. Co-authored-by: Omar Baradei <omar@kostudios.io> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Repairs all 4 failing desktop renderer unit tests. One is a real shipped regression; three are stale tests that drifted from the components they cover.
The regression (real bug)
submitPromptText's sleep/wake recovery — resume the durable stored session and retry once whenprompt.submitreturns "session not found" — was added in72f522d4but silently dropped by the session-presence merge (9ac0530) while its test survived. Result: after the laptop sleeps/wakes and the gateway's in-memory session table is cleared, the next message fails with "session not found" instead of transparently recovering.Restored the resume-once logic, preserving the Phase 2b
sender_deviceparams on both submit attempts.The 3 stale tests
These broke when components legitimately evolved. They went unnoticed because CI doesn't run the vitest UI suite — no workflow invokes
test:ui.model-settings/set up/assertion also removed the " - set up" dropdown suffix (the inline setup flow replaced it)toolset-config-panelEnvVarActionsMenuscrollIntoViewAPIs Radix needs under jsdomstreaming(reasoning card)SmoothStreamingTextVerification
vitest run --environment jsdom: 485 passed (was 4 failed | 481 passed)tsc --noEmit: cleaneslint src/: 0 errorsFollow-up
The root cause of the silent rot is that CI doesn't gate on the vitest UI suite. Wiring
test:uiinto CI (with the non-vitestnode-pty/electron/scripts paths excluded from collection) would catch this class of regression — tracking separately.