Skip to content

Console: start a Fix run from a Ready for review row #1788

Closed

Description

@JacobStephens2

Split out from #1784.

Once the Console HTTP API from #1142 (ADR 0026) lands, let the Day shift start a Fix run directly from the Console on a Ready for review row that has CI red or a Merge conflict (replacing or complementing the interim Copy fix command button added in #1784).

Activity

  1. added
    enhancement
    needs-triage
    in-progress
    and removed
    needs-triage
    on Nov 5, 2026
  2. JacobStephens2 commented on Nov 10, 2026

    @JacobStephens2
    OwnerAuthor

    This was generated by AI during triage.

    Agent Brief

    Investigation of #1788 against main at d6bee52 confirms the missing row action. Implement this as one Ticket using the existing Console start infrastructure.

    Confirmed evidence

    • src/logs/reading/inbox.rs:183 offers fix_command only for Ready for review rows with a pull request and CI red or Merge conflict.
    • src/console/row.html:11 renders only Copy fix command. Command details retain the same fallback in src/console/peek.html.
    • src/console.rs:434 already exposes POST /api/v1/runs under the run scope. src/console/start.rs supports command=fix and pull_request, preserving CLI admission and execution.
    • src/console/assets/start.js and start_confirm.html already provide confirmation, CSRF-protected submission, result feedback and protection against automatic retries after an uncertain response.
    • src/console/fleet_control.rs provides owning-machine forwarding and current effective run permissions. src/console/assets/console.js morphs Inbox rows during refreshes.
    • Referenced Specs Spec: the Fleet in the Console #1142, Spec: starting work and administering a machine through the Console API #1768 and Spec: Fix run #1784 are closed. The relevant API, Fleet controls and Fix run infrastructure are present locally.

    Implementation and acceptance

    1. Add a Start Fix run action beside the existing Copy fix command on eligible Ready for review rows. Retain the copy fallback.
    2. Build a structured request containing command=fix, repository=owner/name and the row's pull_request URL. Use the pull request identity, including when no issue is linked; do not parse the displayed shell command or replay the earlier Command's execution options. Omitted options follow the owning machine's User config and CLI defaults.
    3. Reuse the existing confirmation flow. Identify the pull request, repository and owning machine before submission. Cancel or Escape must start nothing. Submit locally through /api/v1/runs or through the existing Fleet forwarding route for a remote row; never silently start remote work locally.
    4. Offer the action only where the destination currently permits run and the repository has a known Launch directory. Preserve Other-account Commands as read-only and retain existing server authorization, CSRF checks and requester attribution. This Ticket adds a client control to the established API, without changing its authorization rules.
    5. Make the action work on initial rows and rows introduced or replaced by live refresh. Show the returned Command or failure, prevent repeated submission while pending, and retain the existing warning against automatic retries after an uncertain response. Let the existing later-Command hand-off move the earlier waiting row.
    6. Cover CI-red and conflict eligibility, absence on other rows, confirmation/cancellation, the exact targeted request, current run permissions, owning-machine routing, Other-account exclusion, and operation after live refresh. Exercise desktop and phone layouts using the existing Console browser fixtures. Reuse tests/console/start.rs for API coverage and console/tests/inbox.test.cjs and start.test.cjs for browser behavior.
    7. Update docs/guide.md:149 and its Fix runs section, plus the Copy fix command descriptions in site/index.html, site/how-it-works/index.html and site/architecture/index.html. Regenerate the manual with npm run docs --prefix site and run the prescribed affected checks.

    Validation and limits

    Existing API-start coverage passed, including Fix and requester attribution. The existing run-scope and unknown-repository refusal test also passed. scripts/affected-tests main reported no changed files and no affected tests. Browser tests were inspected but not executed; the new row action requires implementation and browser verification. No source files, Git history or GitHub state were changed.

  3. added
    ready-for-agent
    in-progress
    and removed
    in-progress
    ready-for-agent
    on Nov 10, 2026
  4. removed
    in-progress
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions