Palette: add channel-context actions (open repo, restart ttyd, copy upload path) #17

Open
opened 2026-07-29 17:18:34 +01:00 by pedromcaraujo · 0 comments

Moved from pedromcaraujo/nixos#82 (originally migrated there from that repo's
TODO.md § Forge). It belongs here — the code lives in web/index.html and
modules/launcher.nix.

State of play

The original issue asked to "extend the Alt+K palette to take actions". That
generic mechanism has since shipped — web/index.html:532-537 registers six
actions today, all tmux pane operations:

  • Claude split right / split below
  • Shell split right
  • Zoom pane (toggle)
  • Kill side pane
  • Lazygit popup

What's still missing

None of the three actions the original issue actually named exist. They're all
channel-context actions rather than pane operations, so they need the palette
to know things about the current channel that it doesn't track yet:

  • Open the current channel's repo in Forgejo — needs a per-channel remote
    URL. Either derive it from git -C <cwd> remote get-url origin in the
    channels.json sidecar, or add an optional repoUrl to the channel
    attrset in modules/forge.nix.
  • Restart the current channel's ttyd — distinct from the existing
    keybar button, which only reconnects the client. This would need the
    sidecar to systemctl restart the channel's ttyd unit, which means giving
    it a narrow polkit rule or a setuid-ish helper. Worth weighing whether it
    earns that privilege.
  • Copy the channel's upload path — cheapest of the three;
    uploadDir/<channel> is already known client-side. Needs a clipboard write
    that works over OSC 52 in the browser terminal context.

Reasonable to land these independently — the third is nearly free, the first is
small, the second needs a privilege decision first.

Moved from `pedromcaraujo/nixos#82` (originally migrated there from that repo's `TODO.md` § Forge). It belongs here — the code lives in `web/index.html` and `modules/launcher.nix`. ## State of play The original issue asked to "extend the Alt+K palette to take actions". That generic mechanism has since shipped — `web/index.html:532-537` registers six actions today, all tmux pane operations: - Claude split right / split below - Shell split right - Zoom pane (toggle) - Kill side pane - Lazygit popup ## What's still missing None of the three actions the original issue actually named exist. They're all *channel-context* actions rather than pane operations, so they need the palette to know things about the current channel that it doesn't track yet: - [ ] **Open the current channel's repo in Forgejo** — needs a per-channel remote URL. Either derive it from `git -C <cwd> remote get-url origin` in the `channels.json` sidecar, or add an optional `repoUrl` to the channel attrset in `modules/forge.nix`. - [ ] **Restart the current channel's ttyd** — distinct from the existing `⟳` keybar button, which only reconnects the *client*. This would need the sidecar to `systemctl restart` the channel's ttyd unit, which means giving it a narrow polkit rule or a setuid-ish helper. Worth weighing whether it earns that privilege. - [ ] **Copy the channel's upload path** — cheapest of the three; `uploadDir/<channel>` is already known client-side. Needs a clipboard write that works over OSC 52 in the browser terminal context. Reasonable to land these independently — the third is nearly free, the first is small, the second needs a privilege decision first.
Sign in to join this conversation.
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#17
No description provided.