Skip to content
DocsPortuguêsInstall

Day to day

Diff and review

The agent writes fast, and reading what it did is the bottleneck. Deck puts the diff next to the terminal, so review happens without switching apps.

Three places, three questions

WhereAnswers
Git pane, next to the terminalWhat changed in this session, right now?
Review screenWhat changed across the whole project?
Code tab of the pull requestWhat does this proposal change in the codebase?

The first two read your disk. The third reads GitHub, and it is in Pull requests.

The git pane

It opens with ⌘⇧B and follows the folder of the session in focus. At the top you get the branch, how many commits it is ahead of and behind the remote, and a button to pull what is missing.

The diff next to the terminal: the file list on the left, the contents on the right.

It has three tabs:

  • Files, to browse the folder and open any file.
  • Changes, with what changed, grouped into unstaged, staged and against the base.
  • Review, which shows the pull request for this branch with checks, the review decision and comments.

In the changes tab you pick the scope: everything the branch brought in relative to the base, only what has no commit yet, or one specific commit. You can stage file by file, search among the changed files and switch between list and tree.

The review screen

At ⌘⇧G, the review screen shows the whole project, not just the session folder. There are three tabs: the changes, the branches and the history.

  • Changes. The tree of changed files across every repository in the project, with the count of lines added and removed. A dot marks the file the agent is editing right now.
  • Branches. The list with the last commit on each one and a button to switch.
  • History. The commit graph, with search over the message.

The diff opens unified or side by side, whichever you prefer. A very large file comes truncated, with a button to show more, and the app says when there is no diff to show, as with a binary file or a change that only touches permissions.

What the diff compares

Worth knowing, because it changes what you see:

  • By default, the state of the disk against the last commit. That is the question of what changed and has not landed yet.
  • Against the base, everything this branch brought in since it left the base, which is the closest read to what will become a pull request.
  • On a commit, that commit against its parent.

A new file shows up in full, listed one by one, with no new folder hidden away. When Deck cannot compare, it says why, as with a base that no longer exists or an incomplete history in the clone.

Editing without leaving

Clicking a file opens the diff. Command-clicking, or double clicking, opens the file for editing in the same pane, with syntax highlighting. Save is ⌘S.

From the diff there are two paths: edit the current version with the changes highlighted, or open the clean file. A markdown file toggles between the text and the preview.

The draft is kept by Deck and survives closing the tab. If the file changes on disk while you are editing, the app warns you and preserves what you wrote, instead of overwriting in silence.

Commit and push

On the review screen, the header has the message field and two buttons, one that makes the commit and one that also pushes. They are only available with something staged. If the push fails, the commit is still made and the app says so, instead of pretending nothing happened.

With the branch ready, the path continues in Pull requests.