Skip to content

Workflows page shows false empty state when no project/cwd is selected #1173

@orakemu

Description

@orakemu

Summary

  • What broke: The Workflows page shows an empty state and tells the user to add .archon/workflows/ files when no project/cwd is selected, even though bundled default workflows exist.
  • When it started (if known): Observed on a fresh Docker deployment on 2026-04-13.
  • Severity: minor

Steps to Reproduce

  1. Start Archon with the standard bundled defaults present.
  2. Open the Workflows page before selecting/adding a project.
  3. Observe the empty state, or call /api/workflows without a cwd.

Expected vs Actual

  • Expected: Bundled default workflows should be surfaced, or the UI should clearly say that a project/context must be selected first.
  • Actual: /api/workflows returns an empty list and the UI says No workflows found. Add workflow definitions to .archon/workflows/.

User Flow

  User                  Workflows UI               Workflows API
  ────                  ────────────               ─────────────
  opens page ─────────▶ requests /api/workflows ─▶ no cwd / no fallback context
                                                   [X] returns workflows=[]
  sees misleading hint ◀ shows "add .archon/workflows/"

Environment

  • Platform: Web
  • Database: PostgreSQL
  • Running in worktree? No
  • OS: Linux VPS, Docker deployment

Logs

GET /api/workflows response:
{"workflows":[]}

Bundled defaults are present in the image:
/app/.archon/workflows/defaults/archon-assist.yaml
/app/.archon/workflows/defaults/archon-feature-development.yaml
/app/.archon/workflows/defaults/archon-smart-pr-review.yaml

Impact

  • Affected workflows/commands: Workflows page / workflow discovery UX
  • Reproduction rate: Always
  • Workaround available? If so, describe: Select or register a project/codebase first
  • Data loss risk? No

Scope

  • Package(s) likely involved: server|web|workflows
  • Module (if known): server:routes/api (/api/workflows), web:WorkflowList

Potential Root Cause

  • GET /api/workflows returns { workflows: [] } immediately when there is no cwd query param and no registered codebase fallback.
  • In that branch, the endpoint never reaches the normal workflow discovery path that loads bundled defaults.
  • The Web UI then renders a generic empty-state message that implies workflows are missing from disk, even though bundled defaults are present under /app/.archon/workflows/defaults.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priority - Backlog, when time permitsarea: serverHTTP server (packages/server) - API routes, SSE, adaptersarea: webWeb UI (packages/web) - React frontendarea: workflowsWorkflow enginebugSomething is brokeneffort/lowSingle file or function, one responsibility, isolated change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions