Add a PRs tab to the forgejo panel drawer #44
No reviewers
Labels
No labels
bug
docs
enhancement
good first issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pedromcaraujo/forge!44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pr-tabs-in-drawer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #39.
The per-channel drawer listed a repo's open issues; this adds its open pull requests alongside them as a second tab. Tabs sit at the top of the panel, each with a live open-count, over the same accordion — a PR row is an issue row plus a
draftmarker and PR-flavoured inject text (look at PR #N: …). Active tab is remembered per channel; the drawer title link follows the active tab.Changes
web/panel.py): new read-onlyGET /panel/<ch>/pullsand/pulls/<n>, sharing the issue detail's markdown-render + URL-rewrite path via a_detail_payloadhelper. PR detail also carriesbase/head/mergeable/draft.modules/forge.nix,modules/launcher.nix): the paneltypeenum gains"forgejo"(issues + PRs); the former"forgejo-issues"stays an accepted alias, so existing channel configs keep working with nothing to migrate. The title link'surlis now the repo root so the frontend appends/issuesor/pullsper active tab.web/index.html):renderForgejopaints the two tabs; quick-add stays on the Issues tab only. A failed/pullsfetch degrades to an empty list rather than breaking the drawer.Deferred
/commits/{sha}/statuscall per PR). Follow-up if wanted.Test plan
python -m py_compile web/panel.pynode --checkon the extracted<script>nix-instantiate --parseon both modulesThe per-channel drawer listed open issues; add open pull requests alongside them as a second tab. Tabs sit at the top of the panel, each with a live open-count, over the shared accordion — a PR row is an issue row plus a draft marker and PR-flavoured inject text ("look at PR #N: …"). - Sidecar: new read-only GET /panel/<ch>/pulls and /pulls/<n>, sharing the issue detail's markdown-render + URL-rewrite path via a _detail_payload helper. PR detail also carries base/head/mergeable/draft. - Module: the panel `type` enum gains "forgejo" (issues + PRs); the old "forgejo-issues" stays an accepted alias, and the title link's `url` is now the repo root so the frontend can append /issues or /pulls per active tab. - Frontend: renderForgejo paints the two tabs; the active tab is remembered per channel. Quick-add stays on the Issues tab only. A failed PR fetch degrades to an empty list rather than breaking the drawer. CI status dots on PR rows are deferred (one extra status call per PR).