Prox OS Internal Docs
PlatformArchitectureSpaces

Window Group Layout Presets

This document defines the architecture direction for app-agnostic window group

Status

This document defines the architecture direction for app-agnostic window group layout presets. It does not implement a preset picker, persistence schema, or new app UI.

Purpose

Prox OS should not grant one app special global layout power. A layout preset should arrange a Space, a selected window group, or selected windows. Apps can declare capabilities and preferences, but the shell owns global window layout.

Core Rule

Layout presets belong to window groups, selected windows, or a Space. They do not belong to one privileged app.

App manifests may provide hints:

  • Minimum window size.
  • Preferred window size.
  • Whether split view is useful.
  • Preferred slot role.

Those hints help the shell place windows. They do not let an app decide global layout policy.

Conceptual Model

type WindowGroupLayoutPreset = {
  id: string
  name: string
  description?: string
  scope: 'space' | 'window-group' | 'selected-windows'
  slots: WindowLayoutSlot[]
}

type WindowLayoutSlot = {
  id: string
  role: 'primary' | 'secondary' | 'reference' | 'utility'
  xRatio: number
  yRatio: number
  widthRatio: number
  heightRatio: number
  minWidth?: number
  minHeight?: number
}

type AppWindowLayoutHints = {
  minWindowSize?: { width: number; height: number }
  preferredWindowSize?: { width: number; height: number }
  supportsSplitView?: boolean
  preferredSlotRole?: 'primary' | 'secondary' | 'reference' | 'utility'
}

Slots should use ratios so the same preset can adapt to different browser window sizes and shell safe areas.

Relationship With Spaces

A Space may:

  • Remember its last window group layout.
  • Recommend a default window group preset.
  • Apply a preset to currently opened windows.
  • Save a user-adjusted preset later.

Presets should be data-driven and app-agnostic. A Space can say "use the Dev Space tri-pane preset"; it should not say "let the Docs app own the left side forever."

Preset Examples

Dev Space Preset

Goal: keep implementation context visible while coding.

Suggested slots:

  • Primary: Docs.
  • Secondary: Storybook or UI Workshop.
  • Reference: API Explorer or Scalar.
  • Utility: Nx Graph or Architecture Observatory.

This preset is useful for documentation-driven feature work, package changes, API worker review, and architecture exploration.

Founder Space Preset

Goal: keep commercial, roadmap, and prompt context together.

Suggested slots:

  • Primary: Pricing.
  • Secondary: Waitlist or founder CRM.
  • Reference: Roadmap.
  • Utility: Prompt doc or investor note.

This preset is useful for launch planning, packaging experiments, and narrative iteration.

Personal Space Preset

Goal: group everyday personal tools without making any one app the layout owner.

Suggested slots:

  • Primary: Calendar.
  • Secondary: Email.
  • Reference: Contacts.
  • Utility: Weather.

This preset is useful for personal productivity and future connector-driven Spaces.

Applying Presets

The shell should apply a preset by:

  1. Selecting the target scope: Space, window group, or selected windows.
  2. Matching windows to slots by user selection, app role, manifest hints, and recent usage.
  3. Computing ratio-based geometry against the current safe area.
  4. Respecting each window's min/max constraints.
  5. Clamping the result so controls remain reachable.
  6. Preserving app route state and runtime state.

If there are more windows than slots, the shell can stack, minimize, overflow, or leave extras unchanged. If there are fewer windows than slots, unused slots should remain empty.

Anti-patterns

  • Do not encode a global layout preset inside a single app manifest.
  • Do not add privileged snap behavior for one app.
  • Do not make one app import shell-private window manager code.
  • Do not hardcode app ids throughout the shell to express a preset.
  • Do not save absolute pixel-only layouts as cross-device presets.

On this page