Skip to content

F8.2b: Make Aseprite import context-aware #331

Description

@Flow-Fly

Parent

Goal

Make Aseprite import target an explicit ProjectContext, then route .ase and .aseprite files through the durable import service as new library projects.

Context

The current Aseprite importer mutates module singleton stores. That would overwrite the active drawing when invoked from an OS file launch.

Risk and routing

Risk: low
Readiness: ready-for-agent

This is a behavior-preserving dependency-injection refactor followed by one new import adapter, with fixture-backed tests.

Acceptance Criteria

  • importAseFile writes only to the supplied context.
  • The default context remains supported for existing callers during the transition.
  • Aseprite import creates a new durable project and uses the source filename as its project name.
  • The previously active project remains unchanged.
  • Parse/import failures create no library record.

Suggested Files

  • src/services/aseprite-service.ts
  • src/services/project-file-import.ts
  • Aseprite and import-service tests using repository fixtures

Verification

  • Focused Vitest coverage with an Aseprite fixture and two project contexts.
  • npm run test:run
  • npm run build
  • git diff --check

Dependencies

  • Implement after the import boundary from the previous child issue.

Out of Scope

  • Changing Aseprite parsing fidelity.
  • Aseprite export changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentic-taskChild issue intended for agent implementationready-for-agentReady for a bounded agent implementation passrisk:lowLow-risk, bounded, objectively verifiable worktype:refactorRefactoring without intended behavior change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions