Skip to content

feat: Add API Spinner Proxy for automatic loading spinners #11

@gnapse

Description

@gnapse

Summary

Refactor API client to automatically wrap all API calls with loading spinners using a Proxy pattern.

Details

Port the API Spinner Proxy pattern from todoist-cli:

  • Define spinner messages per API method in a config object
  • Use JavaScript Proxy to intercept API calls and wrap them with spinners automatically
  • Remove manual spinner wrapping from individual calls

Current State

outline-cli already has SPINNER_MESSAGES mapping in api.ts but wraps each call manually.

Benefits

  • Cleaner API wrapper code
  • Automatic spinner management
  • Easier to add new endpoints

Effort

1 day

Reference

Based on todoist-cli pattern in src/lib/api/core.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions