Skip to content

Complete host-driven native close veto lifecycle #87

Description

@wieslawsoltes

AppScene coordination epic: SceneTech/AppScene#66

Problem

Unchanged browser applications use standard window/document APIs for close, focus, fullscreen, visibility, and external navigation. WebScene already translates HTTP(S) anchors and window.open into bounded host requests, but the Runtime contract has no typed close/focus/fullscreen completion path and visibility changes from the native window are incomplete. Code OSS's browser IHostService calls these APIs directly.

Proposed contract

  • Define versioned, typed host requests for external URL, close, focus, and fullscreen enter/exit, with request IDs and explicit completion where JavaScript awaits a result.
  • Publish native visibility/focus/fullscreen changes back into the correct document realm and dispatch the standard events.
  • Keep reload as WebScene navigation using the current URL and navigation-generation cancellation rules.
  • Preserve external HTTP(S) handoff as a system-browser action. Reject unsupported schemes and oversized/malformed values before host dispatch.
  • Bound pending requests and cancel awaited requests on navigation/teardown.
  • Treat auxiliary browsing contexts as a separate capability under AppScene [GPU 19/20] Qualify WebGPU/WebGL conformance, resilience and support claims #41; window.open continues system-browser handoff until that capability is implemented.

Acceptance criteria

  • DOM/API contracts cover window.close/focus, Element.requestFullscreen, Document.exitFullscreen, fullscreen state/events, focus/blur, document.hidden, visibilityState, and reload.
  • Native contracts cover success, host denial, malformed requests/completions, queue saturation, stale completion, navigation, and teardown.
  • A 10,000-operation request/completion gate and a 10,000 visibility/focus transition gate publish elapsed time and bounded high-water metrics without sleep-based correctness.
  • Hosted and packaged Windows, macOS, and Linux jobs plus cross-RID/consumer checks pass.
  • AppScene qualifies external link, fullscreen round trip, reload readiness, and veto-aware close in the packaged Code OSS app with no VS Code source change.

This is a standard browser/runtime boundary. Platform window operations remain AppScene's responsibility.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions