This commit is contained in:
2026-09-02 09:14:04 +07:00
parent 6f1256757f
commit c054f61593
10 changed files with 373 additions and 41 deletions
+7 -5
View File
@@ -124,7 +124,7 @@ Current PR creation (`RepoStore::open_pull_request`, `crates/signed_state/src/re
| Draft on create | no | optional 1633 status (P1) |
| Merge provenance | plain 1631 | `merge-commit`/`applied-as-commits` (P4) |
### Phase 1 — Correctness & interop (small, surgical)
### Phase 1 — Correctness & interop (small, surgical) ✅ implemented
1. **Compute and publish `merge-base`, `branch-name`, `r` EUC** in `open_pull_request`:
- Target tip = `RepoStore.head` ref from the state announcement (`refs`/`head`, `crates/signed_state/src/repo.rs:28-30`); add `signed_git::merge_base(repo, a, b)` (shell out like `apply_patch`).
@@ -134,6 +134,8 @@ Current PR creation (`RepoStore::open_pull_request`, `crates/signed_state/src/re
3. **Fix `latest_update`** (`crates/workspace/src/views/repo_detail/pull_request_detail.rs:1125`): filter by the root PR's author (nak and ngit both restrict tip updates to the PR author).
4. **Draft toggle** in the new-PR dialog: publish a 1633 status right after the PR event (reuse `set_status`).
**Status:** items 1 (partial — `branch-name` + `r` EUC done; `merge-base` remains `None` because the paste-based flow has no access to the author's git objects to compute a merge base; it becomes computable in Phase 2 when the patch is generated from a local checkout), 2, 3, 4 are implemented.
### Phase 2 — UX: replace the paste
5. **Local-repo picker** replaces the paste textarea (keep it as an advanced fallback): user picks a git checkout (or the app's `GitCache` mirror), source branch and target branch. The app then:
@@ -154,10 +156,10 @@ Current PR creation (`RepoStore::open_pull_request`, `crates/signed_state/src/re
### Checklist
- [ ] P1: merge-base + branch-name + `r` EUC on creation.
- [ ] P1: `update_pull_request` (1619) + UI button; author check.
- [ ] P1: `latest_update` author filter.
- [ ] P1: draft toggle on create.
- [x] P1: merge-base + branch-name + `r` EUC on creation (merge-base deferred to P2 — not computable from a pasted patch).
- [x] P1: `update_pull_request` (1619) + UI button; author check.
- [x] P1: `latest_update` author filter.
- [x] P1: draft toggle on create.
- [ ] P2: local checkout picker + generated patch + pre-publish apply check.
- [ ] P3: push tip to grasp, truthful `clone` tags, size-aware series.
- [ ] P4: merge status tags.
+13 -4
View File
@@ -2,10 +2,19 @@
## Fork support
- [ ] Add UI for fork (see `PLAN.md` section 1):
- [ ] Fork badge on repo list cards (`repo_list.rs::render_card`).
- [ ] "Forked from …" text button in the repo detail header (`repo_detail/mod.rs::render_header`) and About dialog.
- [ ] Clicking the upstream opens it as a center panel (shared `open_repo_panel` helper).
- [x] Add UI for fork (see `PLAN.md` section 1):
- [x] Fork badge on repo list cards (`repo_list.rs::render_card`).
- [x] "Forked from …" text button in the repo detail header (`repo_detail/mod.rs::render_header`) and About dialog.
- [x] Clicking the upstream opens it as a center panel (shared `open_repo_panel` helper).
## Pull request improvement (see `PLAN.md` section 2)
- [x] P1: `branch-name` tag + `r` EUC tag on PR creation; draft checkbox in the new-PR dialog.
- [x] P1: `RepoStore::update_pull_request` (kind 1619 + root-revision patch) with an author-only "Update" button on the PR detail header.
- [x] P1: `latest_update` filters by PR author.
- [ ] P2: local checkout picker + generated patch + pre-publish apply check (also enables `merge-base`).
- [ ] P3: push tip to grasp, truthful `clone` tags, size-aware patch series.
- [ ] P4: `merge-commit`/`applied-as-commits` tags on merge status.
## Performance: render path