-
Notifications
You must be signed in to change notification settings - Fork 0
[API] Feature — Online Write Support (Commenting, Editing, State Changes) #23
Description
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 commente— edit item fields (title, body, labels, assignees)m— move card to different columnx— 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
-
WritableProviderinterface defined withAddComment,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.