Palette: filter/jump/inject the current channel's issues via a # prefix #37
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#37
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?
Follow-on to the side panel (#31): surface the active channel's Forgejo issues in the Alt+K command palette, so you can filter/jump/inject an issue without opening the drawer.
Why it's not as hard as the per-channel nature suggests
paletteItems(q)already rebuilds on every keystroke andactivate()already branches on item kind (channel vs action). Adding anissuekind that reads the current channel's panel is the same pattern — there's no global issue state, it's always "the active channel's issues". The only new machinery is a small per-channel issues cache (the drawer already fetches/panel/<ch>/issues; cache it keyed by channel with a short TTL, and let the palette lazily fetch on open if the drawer was never opened). Channels without aforgejo-issuespanel contribute nothing.Design: a
#prefix modeKeep issues out of the default palette (a repo can have dozens of open issues and it would bury the channel list). Reserve a leading
#in the palette input as an issues filter for the current channel:#→ list the active channel's open issues#auth→ filter them by title#31→ jump to number 31This is free: nobody types
#to find a channel today (you type the name; the#shown is decoration). Default palette behaviour is unchanged; issues appear only on demand.Activation
injectIssue()to typelook at issue #N: <title>into the terminal (the keyboard-only twin of clicking the number in the drawer).#mode, a top "+ New issue…" entry focuses the drawer's quick-add (depends on step 4 / #).Notes / limits
LIST_LIMIT(50), so#-filtering searches the 50 most-recent open issues client-side. Fine for most repos; for a big tracker, add server-side search later (/panel/<ch>/issues?q=…→ Forgejo issue search) and drop the cap. Log the cap for now.Refs #31.