Skip to content

Add project processes/notifications commands and enhance service list#242

Open
fxck wants to merge 8 commits intomainfrom
ar-processes-format
Open

Add project processes/notifications commands and enhance service list#242
fxck wants to merge 8 commits intomainfrom
ar-processes-format

Conversation

@fxck
Copy link
Member

@fxck fxck commented Feb 4, 2026

Summary

  • Add zcli project processes command to list running and pending processes for a project
  • Add zcli project notifications command to list notifications with pagination support
  • Extend zcli service list with active app version info, service type column, --format flag (table/json), and running processes section
  • Suppress version check warnings and config file messages when using --format json for clean machine-readable output
  • Add CLAUDE.md developer guide for AI-assisted development

New Commands

zcli project processes

Lists all currently RUNNING and PENDING processes for a project (deployments, builds, service starts/stops, etc.).

zcli project processes -P <project>
Column Description
id Process UUID
action Action name (e.g., "serviceStack.create")
status RUNNING or PENDING
services Affected service names
created by User email/name or "system"
created Timestamp

zcli project notifications

Lists notifications for a project with pagination support.

zcli project notifications -P <project> [--limit 50] [--offset 0]
Flag Description
--limit Max notifications to return (1-100, default: 50)
--offset Skip N notifications for pagination (default: 0)

Enhanced zcli service list

Now includes service type, active app version info, running processes, and a --format flag:

zcli service list -P <project> [--format table|json]

New table columns: type, app version id, app version created

Running/pending processes are displayed below the service table.

JSON output (--format json)

{
  "services": [
    {
      "id": "...",
      "name": "api",
      "type": "nodejs@20",
      "status": "RUNNING",
      "appVersionId": "...",
      "appVersionCreated": "2026-01-25 10:30:00"
    }
  ],
  "processes": [
    {
      "id": "...",
      "action": "deploy",
      "status": "RUNNING",
      "services": ["api"],
      "createdBy": "user@example.com",
      "created": "2026-01-25 10:29:00"
    }
  ]
}

When using --format json, all non-JSON output is suppressed (version check warnings, config file messages, "Selected project" info line).

Changes

New Files

  • src/cmd/projectProcesses.go - Processes command
  • src/cmd/projectNotifications.go - Notifications command
  • src/entity/userNotification.go - UserNotification entity
  • src/entity/repository/userNotification.go - Notification repository
  • src/uxHelpers/process.go - Process list rendering
  • src/uxHelpers/notification.go - Notification list rendering
  • CLAUDE.md - Developer guide

Modified Files

  • src/cmd/project.go - Register new subcommands
  • src/cmd/serviceList.go - Add --format flag, pass config to PrintServiceList
  • src/entity/process.go - Add fields (Created, LastUpdate, Started, CreatedByUser, ServiceNames, CreatedBySystem)
  • src/entity/service.go - Add ActiveAppVersionId, ActiveAppVersionCreated fields
  • src/entity/repository/process.go - Add GetRunningAndPendingProcessesByProject
  • src/entity/repository/service.go - Map ActiveAppVersion in serviceFromEsSearch
  • src/uxHelpers/service.go - Add type/app version columns, JSON output, processes section
  • src/uxBlock/styles/styles.go - Add shared DateTimeFormat constant
  • src/cmdBuilder/createRunFunc.go - Move flag binding before version check, suppress warnings for JSON format
  • src/cmdBuilder/scopeProject.go - Suppress "Selected project" info for JSON format
  • src/flagParams/handler.go - Suppress "Using config file" message for JSON format
  • src/i18n/en.go - Add translations
  • src/i18n/i18n.go - Add i18n constants

Test Plan

  • Run zcli project processes -P <project> and verify output shows running/pending processes
  • Run zcli project notifications -P <project> and verify pagination works with --limit/--offset
  • Run zcli service list -P <project> and verify type and app version columns appear
  • Run zcli service list -P <project> --format json and verify clean JSON output (no warnings/info lines)
  • Run zcli service list -P <project> --format table and verify table output matches default
  • Verify empty state messages display correctly when no processes/notifications exist
  • Run go build ./... - passes
  • Run go test ./src/... - passes
  • Run make lint - passes

fxck and others added 8 commits January 27, 2026 17:01
Add two new subcommands under 'zcli project':

- `project processes`: Lists running and pending processes for a project,
  showing process ID, action, status, services, creator, and creation time.
  Results limited to 100, sorted by creation time descending.

- `project notifications`: Lists notifications for a project with pagination
  support (--limit, --offset flags). Shows notification ID, action, type,
  services, creator, creation time, and acknowledgment status.

Changes include:
- New Process entity fields (Created, LastUpdate, Started, CreatedByUser,
  ServiceNames, CreatedBySystem) and ProcessFields variable
- New UserNotification entity with repository functions
- New uxHelpers for rendering process and notification tables
- Shared DateTimeFormat constant in styles package
- i18n translations for all new commands and messages

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extend 'zcli service list' command to display the active app version ID
and creation timestamp for each service.

Changes:
- Add ActiveAppVersionId and ActiveAppVersionCreated fields to Service entity
- Map ActiveAppVersion from EsServiceStack in serviceFromEsSearch
- Update service list table to show 'app version id' and 'app version created'
  columns, displaying '-' when no active version exists
- Normalize table headers to lowercase for consistency

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive developer documentation for Claude Code assistance,
covering project architecture, command framework, entity models, UX
components, build/release process, and common development patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Display running and pending processes when listing services,
giving users a complete operational view of their project.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Support table (default) and json output formats for `zcli service list`.
JSON output includes both services and running processes in a structured format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add type field to service list output (table and JSON)
- Align JSON keys with table headers (snake_case)
- Suppress version check and config file warnings for --format json
- Rename JSON fields: actionName→action, serviceNames→services

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant