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
| Where | Answers |
|---|---|
| Git pane, next to the terminal | What changed in this session, right now? |
| Review screen | What changed across the whole project? |
| Code tab of the pull request | What 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.
~/ingestao ❯ git log --oneline -3
4a093ce Sync tests
4edff57 Avoid duplicate records in the sync
3b1d01c Queue with a configurable limit
~/ingestao ❯ npm test --silent
✔ saves each record once (2.3ms)
✔ skips duplicates on retry (0.4ms)
✔ reports received and saved (0.5ms)
ℹ tests 3 · pass 3 · fail 0
~/ingestao ❯
@@ -1,7 +1,14 @@
-// Ingestion sync.
+// Ingestion sync with duplicate protection.
export async function sincronizar(registros, salvar) {
- for (const registro of registros) {
+ const encontrados = new Set();
+ const novos = registros.filter(registro => {
+ if (encontrados.has(registro.id)) return false;
+ encontrados.add(registro.id);
+ return true;
+ });
+ for (const registro of novos) {
await salvar(registro);
}
- return { recebidos: registros.length, salvos: registros.length };
+ return { recebidos: registros.length, salvos: novos.length };
Against base 2
src/sincronizar.js+10 -3
test/sincronizar.test.js+21
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.