Skip to content

T-9: Introduce @FocusedValue<WindowID> for menu command targeting #203

@kirich1409

Description

@kirich1409

Part of EPIC #193. Depends on #201.

Description

Add a FocusedValues key currentWindowID: WindowID?. In each scene-root view, call .focusedValue(\.currentWindowID, windowID). Inside .commands { }, read via @FocusedValue(\.currentWindowID) and dispatch actions into the scoped store of the focused window.

Acceptance Criteria

  • Cmd+T in window A creates a tab in window A, not in B
  • Cmd+Shift+W in window A closes the project only in A
  • All existing keyboard shortcuts continue to work
  • When the key window is Welcome (not Main), main-only commands (New Tab, Close Project) are correctly .disabled()
  • Build passes, swiftlint lint --strict clean

Module / Layer

Relay / RelayApp + scene roots

Complexity

Medium

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions