Right-side panel drawer with pluggable content (first plugin: Forgejo issues) #31
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#31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Why
Forge channels map 1:1 to repos, and Forgejo issues are per-repo, so a channel has an obvious "companion" view. Today that companion is a manual browser split. This adds a right-side drawer to the launcher whose content is a plugin, so issues are just the first of several things the drawer can host (embedded URL, command output, notes, … later).
The drawer (infrastructure)
web/index.html's<main>is today a single fullscreen<iframe id="frame">. Make it a flex row: terminal iframe + a right panel column.localStorage, mirroring the existing theme toggle.panelconfig shows no drawer arrow.Plugin contract
Each plugin is three parts:
panel.type+ type-specific fields, added to thechannelsattrset inmodules/forge.nix.forge-panelsidecar (copy the FastAPI pattern ofweb/upload.py/web/tmux_ctl.py, wired inmodules/launcher.nixas a systemd service on a loopback port + nginxlocation). The sidecar dispatches bytypeunder/panel/<channel>/…. The plugin holds the secret and does all backend calls server-side — tokens never reach the browser.type, handed the panel data plus a channel context so it can call the existing/typeendpoint (inject text into the active tmux session, exactly as the upload dropzone does) and its own server handlers.Adding a future plugin = one config type + one server handler + one renderer.
First plugin:
forgejo-issuesExercises the whole contract (list read, lazy detail read, create write, inject action, external link).
#number · titlewith state/label chips. Click a row to expand; click the issue number to injectlook at issue #N: <title>into the active session.html_urlfrom the API). No comments (send people to Forgejo for the thread)./markdownrender API and returns sanitized HTML; the frontend just injects it (no XSS surface, matches Forgejo's own rendering, restyled by Forge's theme).POSTs a new issue, then refetches the list. Directly serves the repo's own rule of capturing tasks as issues.Configuration (sketch)
Security
sessionEnvFiles) — never a literal in the.nix(module values land in the world-readable/nix/store) and never sent to the browser.issue:write). A channel that should only watch can use a read-only token; the plugin must degrade gracefully (hide quick-add) when the token can't write.Suggested build order
panelconfig plumbing (no data).forge-panelsidecar +forgejo-issuesread path (accordion + lazy detail + markdown-API rendering + open-in-Forgejo link)./type.## Options+## Layoutupdates; mobile overlay pass.Acceptance criteria
panelconfig shows a right-edge arrow; clicking it expands a drawer that stays open across reloads (per-device).Notes
This can be split into a "drawer + plugin contract" issue and a "forgejo-issues plugin" issue if the single issue gets unwieldy during implementation.