Skip to content

[API] Feature — Online Write Support (Commenting, Editing, State Changes) #23

@0xheartcode

Description

@0xheartcode

Overview

Currently lazydash is read-only. Eventually users will want to comment on issues, change labels, move cards between columns, close/reopen issues, and assign people — all from the terminal.

Current State

Read-only. No write operations. Users must open the browser for any modifications.

Proposed Solution

Extend the Provider interface with write methods:

type WritableProvider interface {
    Provider  // embeds all read methods
    AddComment(ctx context.Context, itemID string, body string) error
    UpdateItem(ctx context.Context, itemID string, changes ItemUpdate) error
    MoveCard(ctx context.Context, projectID string, cardID string, columnID string) error
    SetLabels(ctx context.Context, itemID string, labels []string) error
}

Not all providers need to implement writes (a read-only GitLab backend is still useful). Use a separate WritableProvider interface.

TUI keybindings on the detail view:

  • c — write a comment
  • e — edit item fields (title, body, labels, assignees)
  • m — move card to different column
  • x — close/reopen issue

All write operations require connectivity. If offline, show a message rather than silently failing. Local notes remain the offline-safe alternative.

Why This Is Separate from Offline Notes

Local notes are private, instant, offline-safe, never leave your machine. Comments are public, require API calls, require connectivity, visible to the team. Keeping them distinct avoids accidentally publishing a private note as a public comment.

Priority

Do later. Read-only with offline notes covers the 80% case. Write support is complex (authentication, error handling, conflict resolution, optimistic updates).

Acceptance Criteria

  • WritableProvider interface defined with AddComment, UpdateItem, MoveCard, SetLabels
  • At least GitHub provider implements write methods
  • TUI keybindings for comment, edit, move, close/reopen
  • Write operations fail gracefully when offline with a clear message
  • Local notes and online comments remain separate features

Epic: This is an epic-sized issue covering API design, multiple write operations, error handling, and conflict resolution. Will need to be broken down into smaller sub-issues when work begins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiGitHub API / GraphQLfeatureNew functionalitymajor-featureDays of work, large scope

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions