Skip to content

Sync upstream main (9f1c9670) - #104

Merged
Atreus-X merged 2 commits into
mainfrom
sync/upstream-9f1c9670
Oct 5, 2026
Merged

Atreus-X merged 2 commits into
mainfrom
sync/upstream-9f1c9670

Conversation

@Atreus-X

@Atreus-X Atreus-X commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Syncs upstream wavetermdev/waveterm main (9f1c967, "Keep slow dev renderer startup recoverable", Keep slow dev renderer startup recoverable wavetermdev/waveterm#3536) into the fork.
  • Upstream changes only emain/emain-window.ts (dev-mode renderer startup diagnostics; production waiting is unchanged). The fork's own close-tab change in that file merged cleanly, with no overlapping hunks.

Notes

  • Reviewed with scripts/upstream-review.sh; this is the only upstream commit not previously taken.
  • npx tsc --noEmit: 0 errors. npx vitest run: 121 tests pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6

augmentcode Bot and others added 2 commits October 5, 2026 10:14
## Summary

The five-second development timeout rejected `initializeTab` before it
could send `wave-init`. A late renderer `ready` IPC still resolved the
original handshake, but startup had already been abandoned, leaving a
hidden/blank renderer.

- Keep five seconds as a one-shot diagnostic threshold for both
`initPromise` and `waveReadyPromise`; reveal the window/DevTools and
continue waiting instead of treating slowness as fatal.
- Target DevTools at the awaited renderer, preserve promise rejection
propagation, and abort development waits on window closure, renderer
destruction, or renderer-process loss.
- Remove timers/listeners on completion or failure. Production waiting
and IPC/hot-spare behavior are unchanged.

A larger fixed timeout would only move the race. A live renderer that
never signals readiness still remains pending with diagnostics
available; automatic crash recovery and production timeouts are outside
this fix.

The final diff is **one production-source file, +39/-20 lines**. The
oversized 212-line mocked Electron test harness was removed following
review; it was disproportionate to this change. The main-process fix is
byte-for-byte unchanged from the version verified in Electron.

## Validation

- Actual `task electron:linuxquickdev`, as `codespace`, with isolated
app data and sandbox intact: naturally crossed the diagnostic threshold
at **19.923s**, sent normal `wave-init` at **20.128s**, and completed
the `wave-ready` wait at **20.332s**. Vite was ready at **13.840s**;
mapped-window timing was not treated as app readiness.
- Inspected rendered app pixels and an integrated terminal executing
`printf 'WAVE_RUNTIME_OK\n'`, producing the marker and returning a
prompt. No runtime delay injection was needed.
- `task check:ts`: 17 existing errors in three preview fixture files. A
read-only compiler comparison against the exact unchanged main-process
source produced identical diagnostics; the fix adds none.
- `git diff --check`: passed, including after removal of the test
harness. Confirmed the runtime-verified main-process source did not
change in that follow-up.
- The initial 14 mocked test cases passed during implementation, but
**are not part of the final PR**. Electron was not rerun merely for
deleting that test-only file.
- Task-generated lockfile metadata churn excluded. No backend/wsh
rebuild or dependency upgrade. Task processes and private scratch
logs/data cleaned up.

[Original investigation, tradeoffs, checks, and timing
report](https://cosmos.augmentcode.com/files/2026-10-01-wave-init-fix-f1e5784d3d4f4aa48de5f6607e583126)
· [Rendered app
screenshot](https://cosmos.augmentcode.com/files/2026-10-01-wave-init-rendered-6d2d145ef3e24be5a1af55ade22f5aaf)
· [Terminal verification
screenshot](https://cosmos.augmentcode.com/files/2026-10-01-wave-init-terminal-c7cd0f8cc3c8484eb859b513e22ebd97)

Cosmos evidence links require VFS permissions. The linked report is a
historical record of the original local-validation stage, including the
test harness subsequently removed; this PR description reflects the
final scope. Raw runtime logs are not uploaded. The upstream first-load
delay remains unproven. Other operating systems, production packaging,
and the full test suite were not run.

---------

Co-authored-by: Mike Sawka <mike@commandline.dev>
@Atreus-X
Atreus-X merged commit 7325113 into main Oct 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant