Skip to content

[codex] promote current dev branch to main - #15

Merged
JS-banana merged 11 commits into
mainfrom
dev
Apr 11, 2026
Merged

JS-banana merged 11 commits into
mainfrom
dev

Conversation

@JS-banana

Copy link
Copy Markdown
Owner

Summary

This draft PR promotes the current dev branch into main.

The branch already contains accumulated cleanup and product-scope changes on top of main, and the latest work in this publish step completes the Windows Rust-first service-host recovery so Windows no longer depends on frontend-managed service windows.

What Changed

  • recovers Windows service-host ownership in Rust and removes the frontend dock-manager path
  • preserves current-page state on normal Windows restore/activation instead of navigating back to service home
  • makes Windows refresh reload the current page URL first, with fallback to the service root URL
  • keeps OAuth, popup, and compatibility logic on the Rust side for Windows hosts
  • carries forward the existing dev branch cleanup and scope-reduction work already staged on the branch relative to main

Why

The dev branch is the current integration line for the Tauri-based AnyChat app. The latest blocker before publishing this branch was the Windows host split between TypeScript and Rust, which created lifecycle regressions around tray/restore and page-state retention. This PR publishes the branch after fixing that issue.

Impact

  • Windows service hosts now follow one control plane in Rust
  • tray hide/show and close-to-background can hide service hosts consistently
  • in-page session state is preserved better on Windows restores
  • this PR is broader than a single bugfix because it publishes the current dev branch state to main

Root Cause

The recent Windows stabilization work moved service-window lifecycle into the frontend. That removed one failure mode but split host creation and compatibility behavior across two layers, which caused restore and refresh regressions. The fix was to move Windows host ownership back into Rust while keeping the frontend as a thin command client.

Validation

  • pnpm exec vitest run
  • pnpm exec tsc --noEmit
  • pnpm build
  • cargo test --manifest-path src-tauri/Cargo.toml
  • cargo build --manifest-path src-tauri/Cargo.toml
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check
  • git diff --check

Remaining Manual Checks

  • Win10 / Win11 smoke for tray hide/show
  • settings open/close restore behavior on Windows
  • focus restore behavior on Windows
  • OAuth popup flows on Windows

Windows stabilization had moved service host ownership into the frontend,
which fixed the child-webview path but split lifecycle and compatibility
logic across TypeScript and Rust. This change pulls Windows host creation,
tray/close visibility sync, popup handling, and restore behavior back into
Rust while keeping the frontend as a thin command client.

Constraint: Windows host lifecycle must avoid frontend-managed WebviewWindow creation while preserving OAuth and compatibility behavior
Rejected: Keep the frontend dock manager and patch parity gaps | control-plane split caused restore and refresh regressions
Confidence: high
Scope-risk: moderate
Reversibility: messy
Directive: Do not reintroduce frontend-owned Windows service hosts unless tray/restore/OAuth parity is re-verified on real Windows machines
Tested: pnpm exec vitest run (57 tests), pnpm exec tsc --noEmit, pnpm build, cargo test --manifest-path src-tauri/Cargo.toml, cargo build --manifest-path src-tauri/Cargo.toml, cargo fmt --manifest-path src-tauri/Cargo.toml --check, git diff --check
Not-tested: Real Windows 10/11 smoke for tray hide/show, settings restore, focus restore, and OAuth popup flows
@JS-banana
JS-banana marked this pull request as ready for review April 11, 2026 09:40
@JS-banana
JS-banana merged commit 5d36fa6 into main Apr 11, 2026
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