# Peek and GitHub actions

> Read a pull request or issue without leaving Hush, and approve, comment, merge, or close it from there.

Source: https://hush-gh.com/docs/peek

## Open the peek

The peek shows one pull request or issue next to your list. Click a row, or press `Space`. On a wide screen, the list stays visible and the peek follows the cursor as you move with `J` or `↓` and `K` or `↑`. On a phone, the peek covers the list.

- `Space` or `Esc` closes it.
- The peek stays open when you go to another tab, and shows the same item until you move the cursor there.
- The alert history (the bell) opens in the same place; the one that you opened last stays.

Only pull requests and issues have a peek. Other threads (releases, workflow runs, alerts) open on GitHub.

## What it shows

- The title and `repo#number`. Both link to GitHub.
- The state (open, draft, merged, closed), the author, and when it was opened.
- For a PR: the branches, the size, the reviews (who approved and who requested changes), the review requests, and a warning when it has merge conflicts.
- The checks: failed and running ones first. **Show all** lists every check.
- The labels and the assignees.
- The description, then the comments and reviews, oldest first. Inline review comments on the diff are counted, not shown.
- A comment box at the end.

A thread that stays open in the peek for a moment is marked as read, also on GitHub. Turn this off with [`peekMarksRead`](https://hush-gh.com/docs/settings#peekmarksread).

## The bottom bar

The bar at the bottom of the peek has two parts:

1. The buttons of the page that you are on: **Done**, **Snooze**, **Mute**, and **Read** in the inbox; **Hide until it changes** and **Copy link** on the Pull requests and Issues tabs.
2. The **actions on GitHub**: a main button, and **More** for the rest.

The main button is the action that fits what the thread asks of you: **Approve** for a review, **Re-run failed jobs** when CI fails on your PR, **Merge** when it is ready, and **Comment** for a reply or anything else.

## Actions on GitHub

Hush shows only the actions that you can do now. An action that GitHub would refuse is in **More** with the reason, for example “GitHub does not let you review your own pull request” or “Required reviews or checks are missing”.

| Action | Default key | Text | Safety |
| --- | --- | --- | --- |
| Approve | `a` | optional | Sent after 5 seconds; Undo stops it |
| Request changes | `Shift+a` | required |  |
| Comment | `Shift+c` | required |  |
| Re-run failed jobs | `Shift+r` |  |  |
| Merge | `Shift+m` |  | Asks again: press twice |
| Enable auto-merge | none (in “More”) |  | Undo: turn off auto-merge |
| Turn off auto-merge | none (in “More”) |  | Undo: enable auto-merge |
| Close | `Shift+x` |  | Undo: reopen |
| Close as not planned | none (in “More”) |  | Undo: reopen |
| Reopen | `Shift+x` |  | Undo: close |

- **Approve** waits 5 seconds before Hush sends it, because GitHub cannot take back an approval. **Undo** in the message stops it. **Approve with a comment…** (in More) opens the comment box.
- **Request changes** and **Comment** need text: the comment box opens. `⌘ ↩` / `Ctrl + Enter` sends it.
- **Merge** asks once more: the button becomes “Confirm: merge”. Press it (or the key) again. The merge uses the method chosen under **Merge method** in More, when the repository allows more than one. Hush merges only the commit that you saw: if someone pushed since, GitHub refuses, and you can look again.
- **Enable auto-merge** shows when the repository allows it and the PR cannot merge yet: GitHub merges it when the checks and reviews pass.
- **Close** and **Reopen** can be undone from the message.

After an action, Hush checks the item again at once, so the lists update without a sync.

The keys work while the peek is open. Change them in [Keybinds](https://hush-gh.com/docs/keybinds) (the “Peek” group).

## The comment box

The box at the end of the conversation posts a comment. It can also approve or request changes with your text. `⌘ ↩` / `Ctrl + Enter` sends. You can write Markdown, the same as on GitHub.
