5.5 KiB
TODO
Fork support
- 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_panelhelper).
Pull request improvement
New pull request panel (replaces the dialog)
- "New pull request" (PR list header + repo header
New PR) opens a center panel instead of the paste dialog:- Base/compare branch selectors fed from a user-chosen local checkout (GitHub-style; defaults: announced HEAD for base, checkout's current branch for compare).
- Files/Commits tabs like the repo panel: diff of
merge-base..compare(sharedDiffPanewidget, also extracted for the commit diff panel) + virtual commit list with count badge; clicking a commit opens its diff panel. - Only two inputs: title (required, gates the Create button) and description (optional).
- Patch is generated from the checkout at submit time (
format_patch_betweenon the stored merge base); panel closes after publishing, errors surface in the PR list banner.
- Removed with the dialog: paste textarea, draft checkbox, branch-name input and the mirror-clone apply-check hint (store behavior unchanged:
open_pull_requeststill publishes the series +branch-name/merge-base/rtags and pushes the tip).
Send patch panel (classic paste flow)
-
"Send patch" entry in the repo header PRs dropdown (
RepoAction::SendPatch) and a "New pull request ▾ Send patch" dropdown replacing the PR list's plain new-PR button. -
send_patch.rscenter panel: title + optional description +git format-patchpaste area; submits throughRepoStore::open_pull_request(no checkout, nobranch-name/merge-base). Synchronous store errors (malformed/oversized patch, sign-in) keep the panel open with an inline error; the panel closes once the publish is underway. -
P1:
branch-nametag +rEUC tag on PR creation; draft checkbox in the new-PR dialog (dialog since replaced by the panel above). -
P1:
RepoStore::update_pull_request(kind 1619 + root-revision patch) with an author-only "Update" button on the PR detail header. -
P1:
latest_updatefilters by PR author. -
P2: local checkout picker in the new-PR dialog (folder picker + source/target branches + Generate):
signed_git::{merge_base, format_patch_between, patch_applies};merge-basetag now published; best-effort apply check shown under the patch field (superseded by the panel's live compare view). -
P3: push tip to grasp servers under
refs/nostr/<event-id>before publishing (from the local checkout); multi-commit series published as NIP-10-chained 1617 events with a 60 KB per-patch cap; PR list shows dismissible error/warning banners (incl. push failures). -
P4: merge status tags —
merge_pull_requestpublishes 1631 withapplied-as-commits+rper applied commit andq/e-reply tags per applied patch event.
Pull request follow-ups
- GRASP-06
/prs/<npub>/<id>.gitcontributor endpoints + kind-10317 user grasp-list fallback. - Merge button in the PR detail view (
merge_pull_requestis store-only today), then fetch-and-merge (merge-commit) when the push backend is guaranteed. - Local-checkout generation for the update-PR dialog (currently paste-only); once it lands, push update tips to the same
/prs/set under the PR's stable ref. - Fork-aware compare in the New PR panel: the compare side can come from an announced fork repository (u-tag/EUC-related, own forks first) whose branches are imported into the base repo's GitCache mirror under
refs/fork/<owner>/<id>/*;merge-base/diff/format-patch/push all run in the mirror against full refs. The panel's source picker switches between local checkouts and announced forks. - GRASP-06 author hosting: PR tips are pushed to the author's own grasp servers under
/prs/<author-npub>/<repo-id>.git(kind-10317 grasp list, settings defaults as fallback) before the base announcement's servers; theclonetag carries the/prs/URLs first. - Checkout suggestions ("ready to contribute"): remembered/matched local checkouts prefill the New PR panel; a repo-panel banner suggests creating a PR when a branch is ahead with no open PR. Sidebar "Ready to contribute" group is v2 (deferred).
Performance: render path
- Virtualize issue/PR comment threads (
issue_detail.rs::render_comments,pull_request_detail.rs::render_comments). Harder than the list tabs: comment cards have variable heights and live inside a scrolling page together with the body and the comment form, so this needs either measured item sizes or restructuring the whole discussion tab into one virtual list. (Comment bodies are already cached asSharedString, so re-renders are cheap element constructions, not byte copies.)
Performance: relay/subscription behavior
- Narrow
RepoStore'sBackendEvent::NostrUpdaterelevance filter (crates/signed_state/src/repo.rs:65-98): any comment/status/label/deletion from anywhere wakes every open repo store; match only events referencing this repo's roots or coordinate. - Reconsider
ban_relay_on_mismatch(true)(crates/signed_nostr/src/backend.rs:49): combined with many short-lived auto-close subscriptions, a late event after EOSE can permanently ban a relay for the session. - Relays added for a repo stay in the pool forever and grow unboundedly (
crates/signed_state/src/backend.rs); consider removing repo relays when the last panel for that repo closes.