Skip to content

Conversation

@raegislabs
Copy link

@raegislabs raegislabs commented Nov 7, 2025

Dependencies

Summary

Adds project update-post commands to author and view status updates for projects:

  • project update-post create <project-id> --body <markdown> [--health onTrack|atRisk|offTrack]
  • project update-post list <project-id>
  • project update-post get <update-id>

Motivation

Teams need a fast way to record project status updates (with health) from the CLI. Prior work enhanced project display; this adds the missing write/list/get flows for updates.

Changes

New Features

  • Create project update posts with optional health (onTrack | atRisk | offTrack)
  • List recent updates for a project
  • Get a single update with author and timestamps

Implementation Details

  • pkg/api/queries.go
    • Add CreateProjectUpdate, ListProjectUpdates, GetProjectUpdate operations
  • cmd/project.go
    • Add project update-post command group with create/list/get
    • Flags: --body (required), --health (validated enum)
    • Plaintext/JSON rendering for all commands
  • cmd/project_cmd_test.go
    • Add TestProjectUpdatePostCreate with mock client, DI, and stdout capture

Usage Examples

# Create an update
linctl project update-post create 3c7b1d1a-1234-5678-9abc-dededededede --body "Monthly progress" --health onTrack

# List updates
linctl project update-post list 3c7b1d1a-1234-5678-9abc-dededededede

# Get an update
linctl project update-post get update-123

Validation

  • --body is required for create
  • --health supports: onTrack, atRisk, offTrack
  • Clear errors for missing/invalid inputs

Testing

Unit Tests

  • Create flow with mock client and output verification

Smoke/Build

  • go test ./... passes
  • make fmt applied

Breaking Changes

None – additive commands only.

Architecture Notes

  • Keeps dependency injection via projectAPI for testability
  • Matches existing Cobra patterns and output conventions
  • Uses explicit flag detection for partial inputs

Checklist

  • Tests added and passing
  • Code follows existing patterns
  • Help text comprehensive and matches behavior
  • Manual sanity checks performed
  • No breaking changes
  • Smoke tests passing
  • References RAE-362 (Project Management Epic 1)

Contributor Checklist (Contributing.md)

  • Go 1.22+ environment
  • make deps as needed
  • make fmt applied
  • make test passes (read‑only smoke tests)
  • No release actions in this PR (handled on tag per Release Checklist)

raegislabs and others added 6 commits November 6, 2025 13:04
Add --project flag to issue create and update commands to enable
project assignment/removal from the CLI without switching to Linear UI.

Features:
- Add --project flag accepting project UUID or 'unassigned'
- UUID format validation before API calls
- Improved error messages for invalid projects
- Project display in all output formats (table, plaintext, JSON)

Technical changes:
- cmd/issue.go: Flag registration, input building, error handling
- pkg/api/queries.go: GraphQL mutations include project field
- cmd/*_test.go: Unit tests for flag parsing and validation

All acceptance criteria tested and passing.

Story: 1.1 - Issue-Project Assignment
Status: review → in-progress (addressing review feedback)
Story completed for personal use and testing. Will consider contributing
upstream PR after thorough testing period.
- Add CreateProject() and ArchiveProject() API methods
- Implement project create command with validation
- Implement project archive command with name output
- Add comprehensive tests for API and CLI
- Enhanced GetTeam to support key lookup with ID fallback
- All acceptance criteria met (AC #1-dorkitude#7)

Closes Story 1.2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit implements comprehensive project update functionality and enhances
display of project information in list and detail views.

## What's New

**Project Update Command:**
- Added `linctl project update PROJECT-UUID` command
- Multi-field update support: name, description, state, priority
- Partial update pattern using cmd.Flags().Changed()
- Comprehensive validation for state and priority values
- Clear error messages when no fields provided or invalid values

**Enhanced Display:**
- project list: Added State and Priority columns
- project get: Shows state, priority, initiatives, labels, description
- All output formats supported: table, JSON, plaintext

**API Client:**
- Added UpdateProject() method with GraphQL mutation
- Enhanced GetProject query to include initiatives, labels
- Enhanced GetProjects query to include priority field
- Fixed initiatives field structure (connection type, not singular)

## Technical Details

**Validation:**
- State: planned, started, paused, completed, canceled
- Priority: 0-4 (None, Urgent, High, Normal, Low)

**Architecture:**
- Dependency injection pattern maintained (projectAPI interface)
- Flag change detection for partial updates
- Mock updated for testing

## Test Results

✅ 10/11 acceptance criteria passing
❌ AC 3.2 (shortSummary update) - Linear API limitation

**Tested:**
- Single/multi-field updates
- Input validation (state, priority)
- Error handling
- Enhanced display in all formats
- Unit tests pass

## Known Limitations

Linear's ProjectUpdateInput does NOT support shortSummary field.
This is an API limitation, not an implementation issue.

## Files Modified

- pkg/api/queries.go: UpdateProject method, enhanced queries, Initiatives type
- cmd/project.go: projectUpdateCmd, enhanced display, updated interface
- cmd/project_cmd_test.go: Mock UpdateProject method
- docs-bmad/*: Story completion and status tracking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@raegislabs raegislabs changed the title feat: add project update-post commands (create/list/get) feat: Project Update Posts – create/list/get Nov 7, 2025
memyselfandm pushed a commit to memyselfandm/linctl that referenced this pull request Dec 7, 2025
Add project update-post management commands:
- project update-post create: Create status updates with health tracking
- project update-post list: List all updates for a project
- project update-post get: Get details of a specific update

Supports health indicators: onTrack, atRisk, offTrack

Based on PR dorkitude#19
@memyselfandm
Copy link

Manually merged in commit 4e0e9ca. The PR branch was stale and had conflicts with master's API changes. The core functionality (project update-post commands) has been successfully integrated into master.

@memyselfandm
Copy link

Manually merged in commit 4e0e9ca. The PR branch was stale and had conflicts with master's API changes. The core functionality (project update-post commands) has been successfully integrated into master.

The PR can now be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants