πŸš€ yoAnimeServer – March 2026 Stability & Architecture Update

β€’

Category: Stability β€’ Integrated Mode β€’ WPF Improvements β€’ Interop Hardening
Release Date: March 2026

🧠 Overview

The March 2026 release is the most significant stability and architectural refinement the yoAnimeServer platform has ever shipped.

This update strengthens every layer of the Integrated Mode runtime:

  • DPI correctness
  • WPF sizing and rendering
  • Interop reliability
  • Parenting authority
  • Crash capture
  • WebSocket security
  • Startup and shutdown determinism

But more importantly:

πŸ”₯ This release introduces a deterministic, order-independent runtime architecture that guarantees consistent behavior regardless of startup timing, connection order, or UI readiness.


πŸ†• Architecture Principles (NEW)

This release establishes a unified runtime model built on:

  • Deferred lifecycle orchestration
  • Authority-based component roles
  • Multi-phase readiness gating
  • Snapshot + epoch-based state management
  • Late-join recovery guarantees
  • Idempotent event processing

πŸ†• 1. Deferred Startup & Lifecycle Orchestration

Integrated Mode now uses a Deferred Startup pipeline to ensure initialization only occurs when PowerPoint is truly ready.

Key Behavior

  • Startup is delayed until:
    • A valid document window is detected
    • UI context is stable
  • Triggered via:
    • WindowActivate
    • First real document HWND

Result

  • Eliminates invalid HWND usage
  • Prevents premature COM access
  • Guarantees deterministic initialization timing

πŸ†• 2. Authority Model & Role Separation

The system now enforces a clear authority model between components.

ComponentResponsibility
Add-inPowerPoint integration, HWND tracking
WPFUI orchestration, rendering, state control

Key Principle

Authority is negotiated, not assumed.

Lifecycle States

  • Disconnected (WPF not present)
  • Connected (pipe established)
  • Authoritative (WPF controls UI)

Result

  • Eliminates dual ownership conflicts
  • Prevents race conditions
  • Ensures clean responsibility boundaries

πŸ†• 3. Multi-Phase Readiness & Gate Synchronization

The runtime now uses explicit readiness gates:

WV   = WebView ready
Page = UI loaded
JS = Script bridge ready
Pipe = IPC connected
HS = Handshake complete

Rule

βœ… FULLY READY = All gates satisfied

Result

  • No premature UI updates
  • No race conditions
  • Fully synchronized startup

πŸ†• 4. Late Handshake Recovery & State Rehydration

The system now supports late-joining components.

Flow

  1. Add-in runs independently
  2. WPF connects later
  3. Handshake completes
  4. System triggers:
    • Readiness re-evaluation
    • Pane restoration
    • Context replay

Guarantee

The system always converges to a correct state, regardless of connection timing.


πŸ†• 5. Snapshot-Based Context & Epoch Replay

The geometry and context system is now fully snapshot-driven.

Features

  • Context computed even before WPF connects
  • Stored as epoch-bound snapshots
  • Replayed after handshake

Safeguards

  • Duplicate suppression
  • Epoch fencing
  • Already-seeded protection

Result

  • Deterministic UI state
  • No redundant recomputation
  • Stable overlay positioning

πŸ†• 6. Order-Independent Startup Architecture

The runtime now behaves correctly regardless of startup order.

Supported Flows

Path A

WPF β†’ launches PowerPoint β†’ Add-in connects

Path B

PowerPoint β†’ Add-in starts β†’ WPF joins later

Guarantee

System behavior is deterministic regardless of startup order


πŸ†• 7. Pre-Connection Behavior & Safe Degradation

Before IPC connection:

  • Messages are NOT buffered
  • Context is computed locally
  • System operates safely without WPF

Result

  • No stale message replay
  • No invalid state propagation
  • Clean recovery after connection

πŸ†• 8. Idempotent Event Processing & Deduplication

The event system now guarantees idempotency.

Mechanisms

  • Duplicate suppression windows
  • Initial seed protection
  • Epoch-based filtering

Result

  • No flicker
  • No redundant UI updates
  • Stable rendering pipeline

9. DPI-Perfect MainWindow Sizing

MainWindow sizing now uses physical monitor resolution + true window DPI (GetDpiForWindow).

Improvements

  • Accurate monitor detection (MonitorFromWindow)
  • px β†’ DIP conversion using real DPI
  • Eliminates fractional scaling drift

Result

Perfect overlay coverage at all scaling levels (100–175%).


10. Status Bar Visibility (Standalone β†’ Integrated)

Introduced controlled topmost toggling:

  • SetHudTopmost(true) in Welcome mode
  • SetHudTopmost(false) in Integrated Mode

Result

Status messages are always visible when needed.


11. Crash Reporting Banner Logic Fixed

  • Removed incorrect unconditional β€œREADY” banner
  • Display only when CrashReportingEnabled == true

12. Full Parent Integrity Monitor (V2)

Now fully aligned with the authoritative parenting pipeline.

Highlights

  • Gate-aware (respects readiness)
  • Ignores transient parents
  • No direct SetParent calls
  • Debounced + throttled corrections

13. Resize Coalescing & WM_WINDOWPOSCHANGED Cleanup

  • Resize storms suppressed
  • Single resize per update cycle
  • Stable behavior during UI transitions

14. Visibility & Minimized Guards

All operations now skip automatically when PowerPoint is:

  • Hidden
  • Minimized
  • Temporarily reparented

15. Strengthened Unified Parenting Pipeline

All parenting now flows through a centralized pipeline.

Enhancements

  • PID parity validation
  • DPI-aware sizing
  • Backoff + retry logic
  • Rich diagnostic beacons

16. Early MainWindow Visibility

MainWindow now appears earlier in Standalone mode:

  • Transparent
  • Non-activating
  • Safe

17. Integrated Documentation System

Structured documentation tiers:

  • Lifecycle / Startup
  • VSTO activation
  • Parenting / DPI / UIPI

18. WebSocket Runtime Policy & Security

  • Unified runtime policy
  • Constant-time token validation
  • Origin policy diagnostics
  • Safe offline behavior

19. Interop Determinism & HWND Identity Hardening

Major stabilization of interop layer.

Key Systems

Strict HWND Authority Model

LayerResponsibility
Host HWNDLifecycle
Document HWNDGeometry
WebView HWNDRendering

WebView Identity Isolation

  • No fallback to incorrect HWNDs
  • Strict mapping validation

Epoch-Based Geometry System

  • Monotonic epoch IDs
  • Snapshot reuse
  • Deterministic computation

Finalization Gate Fix

  • Eliminates 15s stalls
  • Ensures immediate completion

Snapshot-Only Selection Pipeline

  • No redundant COM calls
  • Smooth updates
  • Flood protection

πŸ†• 20. UI Automation Stabilization (Selection β†’ UIA Pipeline)

This release introduces a fully deterministic UI Automation pipeline, resolving long-standing instability caused by querying UI state during active mutation.

Previously, UIA queries were executed while PowerPoint’s UI and COM selection state were still evolving, leading to inconsistent AutomationElements, incorrect geometry, and intermittent failures.

The root cause was a violation of temporal consistency between COM-driven state and UI Automation execution.

This has been resolved through:

  • A snapshot-first execution model (COM β†’ managed β†’ UIA)
  • Debounced UI stabilization windows
  • Cancellation-driven event deduplication
  • Strict reentrancy guards

As a result:

  • UIA now operates exclusively on stable UI state
  • AutomationElements are consistent and reliable
  • Bounding rectangles are accurate
  • Rapid interaction scenarios are fully supported without degradation

UI Automation is now fully aligned with the snapshot + epoch architecture, ensuring deterministic behavior across all interaction scenarios.

🎯 Conclusion

The March 2026 update represents a fundamental architectural milestone.

You now have:

  • Deterministic startup
  • Order-independent execution
  • Stable parenting pipeline
  • Snapshot-based UI state
  • Fully synchronized readiness model

🧠 Final Statement

yoAnimeServer is no longer just an integration layer β€”
it is now a fully orchestrated, state-driven, cross-process UI runtime.


This release lays the foundation for:

πŸš€ April 2026 β€” Flow Realtime

Leave a Reply

Your email address will not be published. Required fields are marked *