Skip to content

feat: add lane configuration model and defaults #382

@joryirving

Description

@joryirving

Parent: #381

Goal

Add a small Dispatch-owned lane configuration layer so lanes are no longer defined only by TypeScript string unions and scattered constants.

This should preserve the current default deployment while making custom lane sets possible.

Proposed config shape

A lane should have at least:

interface LaneConfig {
  id: string;
  title: string;
  claimable: boolean;
  description?: string;
  color?: string;
  defaultAgent?: string;
}

The first implementation can be static config or environment-backed config. The important part is that all lane consumers go through one helper module.

Default config

Ship defaults equivalent to current behavior:

lanes:
  - id: normal
    title: Normal
    claimable: true
  - id: escalated
    title: Escalated
    claimable: true
  - id: backlog
    title: Backlog
    claimable: false

Requirements

  • Add a central lane config helper/module.
  • Validate lane ids.
  • Expose helpers such as:
    • getConfiguredLanes()
    • getClaimableLanes()
    • isValidLane(id)
    • isClaimableLane(id)
    • getBacklogLane() or equivalent non-claimable fallback helper
  • Keep backlog behavior compatible for now.
  • Do not require a database migration unless there is a strong reason.
  • Existing installs should behave exactly the same when no custom config is provided.

Non-goals

  • Do not update external workflow repos.
  • Do not rename existing lanes yet.
  • Do not change queue behavior yet except where needed for tests.

Acceptance criteria

  • Current default lanes are available through the new config helper.
  • A single claimable lane plus backlog can be represented.
  • Multiple claimable lanes plus backlog can be represented.
  • Invalid lane IDs are rejected or ignored with a clear error.
  • Unit tests cover default config and at least one custom config.

Validation

  • npm run lint
  • npm run typecheck
  • npm run test
  • npm run build

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions