Quick-add issues from the panel drawer (#31) #38
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!38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "panel-quick-add"
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?
Step 4 of #31 — create a Forgejo issue without leaving Forge. With this, #31's acceptance criteria are all met (drawer + read + inject + quick-add + secrets server-side + mobile overlay).
Changes
web/panel.pyPOST /panel/<channel>/issues{title, body}→ creates the issue via the write-scoped token, returns{number, title, state, html_url}. Title is required; body optional.can_create, derived from the repo'spush/adminpermission — so a read-only channel simply never shows the form (graceful degradation, as #31 asked).web/index.html— a quick-add form atop the drawer (title required; optional description behind a+ descriptiontoggle), rendered only whencan_create. On submit it POSTs, then refreshes the list in place while keeping the form and its focus, so you can add several in a row; errors surface inline. New CSS reuses the existing theme vars (works in dark/e-ink/light).No
launcher.nixchange: the existing/panel/nginx route already proxies POST.Verification (read-only; no junk issues created)
py_compile+ JS parse pass.GET /panel/forge/issuesnow returnscan_create: truealongside the list.Deploy note
nix-dev pins the forge flake input, so rolling this out is the usual merge →
nix flake lock --update-input forge→ redeploy cycle (can be bundled with the focus fix #36).Closes #31.
Step 4 of the side panel: create a Forgejo issue without leaving Forge. - panel.py: POST /panel/<channel>/issues { title, body } creates the issue via the write-scoped token and returns its number/url. The issue-list response gains a can_create flag (derived from the repo's push/admin permission) so a read-only channel simply doesn't show the form. - index.html: a quick-add form atop the drawer (title required, optional description behind a toggle) — shown only when can_create. On submit it POSTs, then refreshes the list in place while keeping the form and its focus, so you can add several in a row; errors surface inline. Closes #31 (drawer + read + inject + quick-add). Palette # mode (#37) and docs/mobile polish remain as follow-ups.Added a second commit: the drawer "Issues" title now links to the repo's Forgejo issues page. The module derives a public
url(baseUrl/repo/issues) into thechannels.jsonpanel descriptor — no secret — and the drawer renders the title as a link when present, plain text otherwise. Verified: JS parse + a build showingurl: https://git.rdbytes.pt/pedromcaraujo/forge/issueson a paneled channel, none on a plain one.