Menu da documentação

Documentação

Git, diff and PR review

Reviewing changes without leaving the desktop.

Nesta página

Overview

Two apps close the review loop without leaving the desktop: TDE Git for the working tree in front of you, TDE PR for pull requests on GitHub. They share a diff renderer and a review-note model, so a comment you leave in either place behaves the same way — the difference is only where it ends up.

TDE Git

The changes app. Three panes: a branch picker at the top left, the changes tree below it, and the diff on the right.

The tree has two sections, Staged Changes and Changes, each a folder tree of the files involved. Every row carries a status letter — S staged, U unstaged, P partially staged.

Toolbar

Stage All · Unstage All · CommitStash · Load StashPush · Pull · Fetch · RefreshWatchDiscard All, with a Console toggle at the right. In task-review mode a Post to task button appears as well.

Home or End moves keyboard focus into the toolbar, where the arrows walk the chips, Enter runs one and Esc leaves.

Reading the diff

KeyAction
Tab / Shift+TabNext / previous pane
Arrows, PageUp, PageDownDrive the changes tree
EnterOpen a file, or expand a folder or section
SpaceStage or unstage the selected file
eOpen the file in the editor
mToggle unified and side-by-side
zExpand or collapse every folded run in this file
n / NNext / previous review note (task-review mode)
J, ] / K, [Scroll the diff down / up
h j k lVim-style movement in the tree
q, EscClose the window

Long unchanged stretches fold into a ··· N unchanged lines ··· marker you can click to expand, GitHub-style. Enter or Space on the branch band opens the branch picker; choosing another branch runs a git switch.

Watch polls the repository every couple of seconds and reloads the diff when the worktree moves — useful when an agent is editing files while you read them. It never reloads in the middle of your own operation or while a prompt is open.

Console opens a footer that logs every git command TDE ran, with its stdout and stderr, colour-coded. It is the first place to look when an operation does not do what you expected.

There is no blame view.

The lightweight diff viewer

F7 or Alt+D opens a separate, read-only diff viewer over whatever repo you are in — no staging, no toolbar. Esc or q closes it, / scroll, and move between files, m toggles the diff mode and e opens the file externally. Untracked files get a raw content preview there.

Inline review notes

This is the part that makes review a conversation instead of a handoff. When TDE Git is opened bound to a My Loop task, you can right-click any line in the diff and choose Add comment here.

A note is anchored to a file, a line and a side — the old side or the new side — and shows up labelled like src/lib.rs · R19 (R for the new side, L for the old).

Notes are stored as activity comments on the task, in a format both sides can parse:

bash
Review @ src/lib.rs · R19
Tighten this wording before merge.

That is the whole trick: because a note is an ordinary task comment, the agent already reads it in the task feed on its next run, and can write notes back the same way. Reopening the task rehydrates the notes inline over the diff, n and N jump between them across files, and Post to task flushes a batch at once. Unposted drafts are flushed automatically when you close the window, so a comment is never silently lost.

Notes you write are authored as me; notes an agent writes are authored as agent.

From an agent

tde agent git review is unusual among the agent verbs: it acts on the My Loop board directly, so it works with no desktop running and no window open — the same way tde task does.

bash
tde agent git review add \
  --task 412 \
  --file src/lib.rs \
  --line 19 \
  --side new \
  --text "Tighten this wording before merge."

tde agent git review list --task 412
FlagRequiredNotes
--taskYesThe board task id
--fileYesRepo-relative path
--lineYesMust be 1 or greater
--sideNoold or new; defaults to new
--textYesThe comment body

Each flag also accepts the --flag=value form. add prints a confirmation naming the new comment id and the anchor label. list prints a single-line JSON array, in board order:

bash
[{"file":"src/lib.rs","line":19,"side":"new","text":"Tighten this wording before merge."}]

Comments on the task that are not review notes are filtered out. A bad argument exits with status 2; a board or task failure exits with 1.

TDE PR

TDE PR browses and reviews GitHub pull requests. It authenticates through the gh CLI — if gh auth status is happy, so is TDE PR; there is no token to paste and none is stored.

The layout mirrors TDE Git: a sidebar tree with Open and Closed folders, a middle pane, and the diff on the right. The middle pane has two tabs, Changed Files and Comments; comments render as Markdown with the author, time and their association to the repo. CI check state is shown per PR.

Toolbar

Approve · Comment · Post reviewMerge · CloseCheckout · Open · Refresh. Merge squashes by default. Checkout runs gh pr checkout so you land on the branch locally. Open sends the PR to your browser.

Keys

KeyAction
Tab / Shift+TabNext / previous pane
EscBack to the sidebar
Arrows (sidebar)Move through the tree, open and close folders
Enter, Space (sidebar)Load the selected PR
/ (file list)Switch between Changed Files and Comments
/ , PageUp / PageDown (file list)Move the selection
Enter (file list)Jump into the diff
/ , PageUp / PageDown (diff)Scroll
rRefresh the lists
qClose the window

Review notes to GitHub

Notes work exactly as they do in TDE Git — right-click a diff line, Add comment here — but the sink is different. Post review submits them to GitHub as one review with inline comments, anchored to the PR's head commit and filed as a COMMENT event. Posting with no notes is refused rather than submitting an empty review.

So the same gesture either talks to your agent (in TDE Git, through the task) or to your collaborators (in TDE PR, through GitHub), depending on which window you are in.