Filter/jump/inject a channel's issues from the palette (#37) #45

Merged
pedromcaraujo merged 1 commit from palette-hash-issues into main 2026-09-18 09:03:13 +01:00

Closes #37.

A leading # in the Alt+K palette switches it to the active channel's open Forgejo issues, keeping issues out of the default channel/action list until asked for:

  • # — list the channel's open issues
  • #auth — filter by title
  • #31 — jump by number

Activation

  • Enter injects look at issue #N: <title> into the terminal (the keyboard twin of clicking the number in the drawer).
  • Ctrl/⌘+Enter (or modifier-click) opens the issue in Forgejo.
  • A top "+ New issue…" row opens the drawer and focuses its quick-add.
  • Channels without a forgejo panel contribute nothing.

Plumbing

  • Per-channel issue cache (30s TTL) shared with the drawer: renderForgejo/refreshIssues warm it, and the palette lazily fills it if the drawer was never opened, so typing # doesn't re-hit the sidecar on every keystroke.
  • The list endpoint's 50-issue cap is logged (client-side filter over the 50 most-recent open issues; server-side search is a later follow-up).
  • A render generation drops stale async results; issue titles are set via textContent, never innerHTML.

Also fixes the shell losing focus when leaving the palette: closePalette() now blurs the palette input before focusTerm(), which otherwise refused to steal focus resting on our own chrome and left the terminal dead after Esc.

Verified with a syntax check plus 18 jsdom behaviour tests (list/filter/jump/inject/open/new-issue, the non-panel channel message, and that Esc blurs the input).

Closes #37. A leading `#` in the Alt+K palette switches it to the active channel's open Forgejo issues, keeping issues out of the default channel/action list until asked for: - `#` — list the channel's open issues - `#auth` — filter by title - `#31` — jump by number **Activation** - **Enter** injects `look at issue #N: <title>` into the terminal (the keyboard twin of clicking the number in the drawer). - **Ctrl/⌘+Enter** (or modifier-click) opens the issue in Forgejo. - A top **"+ New issue…"** row opens the drawer and focuses its quick-add. - Channels without a forgejo panel contribute nothing. **Plumbing** - Per-channel issue cache (30s TTL) shared with the drawer: `renderForgejo`/`refreshIssues` warm it, and the palette lazily fills it if the drawer was never opened, so typing `#` doesn't re-hit the sidecar on every keystroke. - The list endpoint's 50-issue cap is logged (client-side filter over the 50 most-recent open issues; server-side search is a later follow-up). - A render generation drops stale async results; issue titles are set via `textContent`, never `innerHTML`. **Also fixes** the shell losing focus when leaving the palette: `closePalette()` now blurs the palette input before `focusTerm()`, which otherwise refused to steal focus resting on our own chrome and left the terminal dead after Esc. Verified with a syntax check plus 18 jsdom behaviour tests (list/filter/jump/inject/open/new-issue, the non-panel channel message, and that Esc blurs the input).
Filter/jump/inject a channel's issues from the palette (#37)
All checks were successful
CI / check (pull_request) Successful in 9s
75ba6ba1e8
A leading `#` in the Alt+K palette switches it to the active channel's
open Forgejo issues, keeping issues out of the default channel/action
list until asked for:

  - `#`      list the channel's open issues
  - `#auth`  filter them by title
  - `#31`    jump by number

Enter injects `look at issue #N: <title>` into the terminal (the
keyboard twin of clicking the number in the drawer); Ctrl/⌘+Enter opens
the issue in Forgejo; a top "+ New issue…" row focuses the drawer's
quick-add. Channels without a forgejo panel contribute nothing.

Issues come from a per-channel cache (30s TTL) shared with the drawer:
renderForgejo/refreshIssues warm it, and the palette lazily fills it if
the drawer was never opened, so typing `#` doesn't re-hit the sidecar on
every keystroke. The list endpoint's 50-issue cap is logged. A render
generation drops stale async results; issue titles are set via
textContent, never innerHTML.

Also fix the shell losing focus when leaving the palette: closePalette()
now blurs the palette input before focusTerm(), which otherwise refused
to steal focus resting on our own chrome and left the terminal dead.
pedromcaraujo deleted branch palette-hash-issues 2026-09-18 09:03:13 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pedromcaraujo/forge!45
No description provided.