Skip to content

Slice 5 — User can open a PR from a branch and merge it from the web UI #5

@safayavatsal

Description

@safayavatsal

What to build

The PR primitive — the smallest version that supports both human-authored and (eventually) Agent-authored PRs.

  • Web UI: from a Repository, a "New Pull Request" flow lets the user pick a source and destination branch, see the diff, and submit. PR detail page shows the diff, a top-level comment field, and a "Merge" button.
  • platform-api: POST /repos/:o/:n/pulls, GET /repos/:o/:n/pulls, GET /pulls/:id, POST /pulls/:id/comments, POST /pulls/:id/merge.
  • GitRepository.Diff and GitRepository.Merge extended to support PR diff and merge-commit creation.
  • On merge: destination branch advances, PR transitions to merged, a pr.merged event is published.
  • On PR creation: a pr.opened event is published. (Reviewer Agent in slice 10 consumes this.)
  • Comments stored in platform.pr_comments. Author is either a human user or, later, the Reviewer Agent (a special system actor).

Acceptance criteria

  • A user can push a branch, open a PR against main, see the diff, and merge it.
  • After merge, git clone reflects the merged state on main.
  • PR list page shows open and closed PRs separately.
  • A comment posted on a PR shows up immediately on reload.
  • pr.opened and pr.merged events are emitted to the EventBus and observable in logs.
  • Attempting to merge a PR with conflicts returns a clean error and does not corrupt the repo.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    afkImplementable without architectural decisionsready-for-agentTriaged and ready for an AFK agent to pick uptracer-bulletVertical slice through all integration layers

    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