We have isssues on the side bar so the next logical step is to have PR's. Maybe tabs on top with the count? #39

Closed
opened 2026-08-28 13:33:42 +01:00 by pedromcaraujo · 1 comment
No description provided.
Author
Owner

Design: PRs in the drawer via tabs

Decided direction: tabs (Issues | PRs) inside the same forgejo panel, each with an open-count. The PR list reuses the existing accordion machinery. A standalone "linked PR inside issue detail" view is a possible later add-on, not v1.

Scope

Sidecar (web/panel.py)

  • GET /panel/<ch>/pulls → open PRs via /repos/{repo}/pulls?state=open, returning number, title, labels, draft (mirrors list_issues).
  • GET /panel/<ch>/pulls/<n> → detail, same markdown-render + URL-rewrite path as issue_detail, plus base/head and mergeable. Comments/attachments already work (PRs share the issue index).
  • can_create stays issues-only (quick-add is an issues affordance).

Module (modules/forge.nix + launcher.nix)

  • Rename the panel type enum forgejo-issuesforgejo, keeping forgejo-issues as an accepted alias so existing channel configs don't break. The panel now means "issues + PRs".
  • Frontend swaps the drawer title link per active tab.

Frontend (web/index.html)

  • renderForgejoIssuesrenderForgejo: a tab strip (Issues / PRs, each with a count chip) above the accordion; registry maps both forgejo and forgejo-issues to it.
  • PR rows reuse issueRow with a state marker + PR-flavored inject text.
  • Remember the active tab per channel in localStorage.

Defaults for v1

  • CI status dot on PR rows: deferred (needs a per-PR /commits/{sha}/status call; keeps v1 at two endpoints). Follow-up.
  • Drafts: shown and marked (hollow marker / "Draft:" prefix).
  • Inject text: look at PR #N: <title> (a bare #N is ambiguous to a human).
  • Count semantics: open only, matching the issues list.
  • Quick-add form: Issues tab only; the PRs tab has no add form.
## Design: PRs in the drawer via tabs Decided direction: **tabs (Issues | PRs) inside the same forgejo panel**, each with an open-count. The PR list reuses the existing accordion machinery. A standalone "linked PR inside issue detail" view is a possible later add-on, not v1. ### Scope **Sidecar (`web/panel.py`)** - `GET /panel/<ch>/pulls` → open PRs via `/repos/{repo}/pulls?state=open`, returning `number, title, labels, draft` (mirrors `list_issues`). - `GET /panel/<ch>/pulls/<n>` → detail, same markdown-render + URL-rewrite path as `issue_detail`, plus `base`/`head` and `mergeable`. Comments/attachments already work (PRs share the issue index). - `can_create` stays issues-only (quick-add is an issues affordance). **Module (`modules/forge.nix` + `launcher.nix`)** - Rename the panel `type` enum `forgejo-issues` → `forgejo`, keeping `forgejo-issues` as an accepted alias so existing channel configs don't break. The panel now means "issues + PRs". - Frontend swaps the drawer title link per active tab. **Frontend (`web/index.html`)** - `renderForgejoIssues` → `renderForgejo`: a tab strip (Issues / PRs, each with a count chip) above the accordion; registry maps both `forgejo` and `forgejo-issues` to it. - PR rows reuse `issueRow` with a state marker + PR-flavored inject text. - Remember the active tab per channel in `localStorage`. ### Defaults for v1 - **CI status dot on PR rows:** deferred (needs a per-PR `/commits/{sha}/status` call; keeps v1 at two endpoints). Follow-up. - **Drafts:** shown and marked (hollow marker / "Draft:" prefix). - **Inject text:** `look at PR #N: <title>` (a bare `#N` is ambiguous to a human). - **Count semantics:** open only, matching the issues list. - **Quick-add form:** Issues tab only; the PRs tab has no add form.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pedromcaraujo/forge#39
No description provided.