Skip to content

Add configurable workspace camera animation mode #1623

Description

@HendrikD2005

Purpose

Add a configurable workspace camera animation mode so users can choose whether workspace pan and zoom changes remain immediate (Minimal) or transition smoothly (Smooth) during scroll and zoom gestures. Minimal preserves the current direct behavior. Smooth should feel comparable to canvas tools such as Miro: zooming in or out eases toward the target view instead of snapping instantly.

Agent Execution Mode

  • Single-agent
  • Agent team
  • Audit-only
  • Refactor-only
  • Feature delivery
  • Audit/verification-heavy
  • Human-led / agent-assisted

Agent Routing Hints

  • Lead agent: developer.
  • Suggested specialist agents: test-engineer, performance-engineer, a11y-auditor, verifier.
  • Primary area label: area: workspace.
  • Expected write ownership: packages/keiko-ui/src/app/components/desktop/** and focused tests for workspace camera behavior.

Existing Capability Review

  • Existing workspace UI surfaces and ADR constraints were inspected before implementation.
  • The existing useWorkspace camera state and DOM workspace renderer will be reused.
  • The implementation is a real capability gap: the workspace currently coalesces view updates but does not visually interpolate camera movement.
  • No parallel canvas, graph, camera store, server route, or durable persistence store is introduced.

Expected Verification

  • Required GitHub check: ci.
  • Focused unit/component coverage for Minimal, Smooth, and reduced-motion behavior.
  • Studio browser quality gate when validating visible workspace behavior.
  • Studio performance awareness because the feature touches pan/zoom rendering.
  • Visual regression evidence if reviewers request it for the settings or workspace surface.

Scope

  • Add a workspace camera animation mode with the values Minimal and Smooth.
  • Preserve current scroll and zoom behavior when Minimal is active.
  • Add smooth interpolation for viewport pan and zoom changes when Smooth is active.
  • Keep the canonical workspace state model owned by useWorkspace and rendered by the existing DOM workspace.
  • Respect reduced-motion preferences so users who prefer less motion are not forced into animated camera transitions.
  • Cover the behavior with focused tests and relevant local CI checks.

Out of Scope

  • New canvas or graph substrate adoption.
  • Server-side persistence, account-level preferences, or new BFF routes.
  • Reworking workspace object layout, window registry, connection rendering, fit-to-view, grouping, or keyboard graph navigation.
  • Large-scale visual redesign of the workspace shell.

Deliverables

  • Workspace camera animation mode type/configuration and settings integration.
  • Smooth camera interpolation for scroll/zoom transitions while preserving Minimal parity.
  • Reduced-motion fallback that behaves like Minimal.
  • Focused tests for minimal vs smooth behavior and reduced-motion behavior.
  • Local verification notes for the relevant CI commands.

Acceptance Criteria

  • Minimal mode keeps current workspace pan and zoom behavior immediate.
  • Smooth mode eases scroll and zoom camera changes toward the target view without changing final coordinates or zoom constraints.
  • Smooth zoom keeps the pointer/world-coordinate anchoring behavior consistent with the existing zoom implementation.
  • Reduced-motion preferences disable camera animation even when Smooth is selected.
  • The implementation extends the existing useWorkspace/Workspace.tsx substrate and does not introduce a parallel camera state owner.
  • Focused tests pass locally, and the implementation remains compatible with the required ci pipeline.

Engineering Notes

  • ADR-0026 establishes useWorkspace as the workspace editor, the DOM as renderer, and View { zoom, x, y } as the canonical camera record.
  • ADR-0027 keeps workspace UI state ownership in keiko-ui; this feature should not add a new durable store.
  • ADR-0028 should be respected if commands/events are touched; viewport animation should not alter undo semantics.
  • Keep runtime dependencies minimal. Prefer requestAnimationFrame, deterministic easing, and cleanup on unmount over adding an animation library.
  • The smooth path should animate display projection while preserving a single canonical target view to avoid drift, stale persistence, or inconsistent connection rendering.

Metadata

Metadata

Assignees

Labels

status: in progressActively being worked ontype: taskImplementation, documentation, release, or security task

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions