Skip to content

feat(ui-app): provide per-window context to chrome and web-pane hooks #6

Description

@phall1

Problem

Current Options.web_panes receives only the model (src/runtime/ui_app.zig:753), while panes are reconciled for every window. An app cannot state which window owns a pane, so secondary-window rebuilds can resolve a pane anchor against the wrong tree. Chrome has the same limitation: there is no per-window build hook for chrome-generated terminal content.

Scope

Introduce a shared ChromeContext naming canvas label, window id, size, tokens, and whether it is the main window. Add an opt-in build_window hook and pass the same context to web_panes; preserve current hooks for existing apps.

Acceptance

  • A secondary window can render window-specific chrome.
  • Web-pane hooks return only the panes owned by the requested window.
  • Existing single-window apps retain their behavior.

Upstream candidate

Medium-sized port from the Cockpit fork. Split from the terminal work; it is independently useful for multi-window apps.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions