Skip to content

[P1] Tighten window typings and state boundaries in WorkspaceCanvas #12

@nkanf-dev

Description

@nkanf-dev

Summary

Replace permissive any usage around workspace windows with typed interfaces and clearer state boundaries.

Why

WorkspaceCanvas drives high-value interaction logic. Weak typing here increases the risk of subtle state bugs during drag, resize, docking, and activation flows.

Current evidence

  • src/components/workspace/WorkspaceCanvas.tsx uses any[] for windows and any for update payloads.

Scope

  • Use ReaderWindow-based props and update payloads.
  • Make drag/resize helpers type-safe.
  • Clarify which fields are mutable in update callbacks.
  • Avoid broad partial updates where a narrower command model would be safer.

Acceptance criteria

  • WorkspaceCanvas no longer exposes any in its public props.
  • Window interaction logic compiles with strong types.
  • Refactors in window state become safer and easier to review.

Out of scope

  • A full rewrite of the workspace interaction model.

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