Add the forge-panel sidecar + forgejo-issues read path (#31) #33
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!33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "panel-forgejo-issues"
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 2 of #31, stacked on #32 (base branch
panel-drawer). Fills the drawer with its first plugin: read-only Forgejo issues.What's here
web/panel.py— new loopback sidecar. Reads a module-generatedpanels.json(channel → plugin config, secrets by path only) and exposes:GET /panel/<channel>/issues— open issues (number, title, state, labels). PRs excluded viatype=issues.GET /panel/<channel>/issues/<n>— detail, with the body rendered to sanitized HTML by Forgejo's own/markdownAPI.It holds the repo + token and never hands them to the browser; the token is read from its file per request so rotation reaches a running service. Upstream error bodies are never forwarded (they can echo the token) — only the status.
modules/launcher.nix— generatepanels.json, add theforge-panelsystemd service (runs as the session owner so it can read the deploy's tokenFiles; TLS pinned viapkgs.cacert), and an nginx/panel/route. Both gated on at least one channel declaring a panel.web/index.html— theforgejo-issuesrenderer: an accordion of open issues that lazily fetches detail on expand (single-expand), shows label chips, the rendered body, and an Open in Forgejo link, plus a drawer refresh button. A smallPANEL_RENDERERSregistry keyed by panel type keeps this pluggable. Only Forgejo-sanitizedbody_htmlis ever set viainnerHTML; everything else usestextContent.Verification
py_compilepass; fullnixosSystembuild producespanels.json({"app":{…}}, plain channel dropped) and the/panel/route./issuesreturns the 10 open issues (PR #32 correctly excluded),/issues/31renders ~7.7 KB of sanitized HTML with author/labels/link, and an unknown channel 404s.Deferred
Click-to-inject (step 3), quick-add (step 4), and README/docs + mobile polish (step 5).
Refs #31.
c8022b0cd0a036fbf18c