Skip to content

Add custom Claude buttons configurable in settings#23

Merged
flipbit03 merged 1 commit intomainfrom
feat/custom-claude-buttons
Apr 21, 2026
Merged

Add custom Claude buttons configurable in settings#23
flipbit03 merged 1 commit intomainfrom
feat/custom-claude-buttons

Conversation

@flipbit03
Copy link
Copy Markdown
Owner

Summary

Users can now configure arbitrary New Session: X buttons that spawn claude with any custom command. Each button has:

  • A display label (e.g. YoloDisc)
  • A tmux window prefix (auto-derived from the label, editable independently — so YoloDiscyolodisc:<repo>)
  • A command string that runs as-is when the button is pressed

Buttons whose command contains --dangerously-skip-permissions are auto-styled red like the existing YOLO button. Buttons render in the CLAUDE section (4-per-row wrapping) and as compact pills on each row of the recent-sessions list. The resume path reuses the custom command + prefix and appends -r <session-id>.

Also in this PR

  • Removed: the pre-existing per-repo/per-worktree/global custom_claude_command override. Custom buttons subsume that use case, and the feature was never used in practice.
  • Moved: Add Worktree out of the CLAUDE section to sit next to ⟳ Git Pull in the repo header, where a repo-scope action belongs.
  • Widened the Settings + Manage modals (new modal-wide class) so they fill available vertical space — the Manage Custom Buttons... button is now always visible without scrolling on reasonably sized terminals.
  • Bumped Textual to >=8.2.4.

Test plan

  • make check (ruff + mypy + format) clean
  • Repo view: sidebar + detail pane, [⟳ Git Pull][Add Worktree] in header, CLAUDE row shows [New Session][New Session: YOLO][YoloDisc][Opus], recent sessions card with [Resume][YOLO][YoloDisc][Opus]
  • Worktree view: WORKTREE header with Repository/Worktree/Branch/Based on, only Git Pull (no Add Worktree), same custom buttons
  • Settings modal fills available space at 221x60; Manage Custom Buttons... visible without scrolling
  • Manage modal: add, edit, delete, reorder (↑/↓), cancel correctly discards
  • YOLO-style auto-detection: buttons with --dangerously-skip-permissions render red
  • Live resize across 100x30 / 120x40 / 160x50 / 200x60 / 221x60 — all layouts adapt cleanly (requires tu >=0.6.1 for testing in tu)

Users can now configure arbitrary "New Session: X" buttons that spawn
claude with any custom command. Each button has a display label, a
tmux window prefix (auto-derived from label, independently editable),
and a command string used as-is when the button is pressed. Buttons
containing --dangerously-skip-permissions are auto-styled red like the
existing YOLO button.

Buttons render in the CLAUDE section (wrapping 4-per-row) and as
compact pills on each row of the recent-sessions list. The resume path
reuses the custom command/prefix with `-r <session-id>` appended.

Also:
- Drop the pre-existing (unused) per-repo/per-worktree/global
  custom_claude_command override — custom buttons subsume the use case
- Move Add Worktree out of the CLAUDE section to sit next to Git Pull
  in the repo header, where it belongs
- Widen Settings + Manage modals (new modal-wide class) and let them
  fill available vertical space so the Manage button is always visible
- Bump textual to >=8.2.4
@flipbit03 flipbit03 merged commit 04c40a4 into main Apr 21, 2026
1 check passed
@flipbit03 flipbit03 deleted the feat/custom-claude-buttons branch April 21, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant