Guide sections

05 Work

Changes and review

The Changes panel lists every file the agent changed in a session and lets you read each diff, choose what goes into a commit, then commit, push and open a pull request. ShanFlow never writes file content itself. Only the agent does.

The Changes panel beside a thread, with a changed-file list and a diff open in the readerThe Changes panel beside a thread, with a changed-file list and a diff open in the reader

See what changed#

  1. Open the Changes panel with ⌘D (macOS) / Ctrl+D (Windows), or click Changes in the side rail. The rail slots also answer to ⌘1–5 / Ctrl+1–5, by position.
  2. Click a file to read its diff. Use ↑ and ↓ in the list to move between files.

You can also type /diff in the composer, or click the chip at the end of a turn (for example "2 files +32 −1"). Hover the chip to peek at the files that turn touched. Click it to open that turn's changes.

The chip counts only files the agent wrote with its edit tools. A file written by a shell command (for example cat > file) does not appear in the chip, but it does appear in the Changes panel when the project is a git repository.

The panel header says Changes. With Time Machine open it says History (see below).

Choose what to compare against#

The scope button at the top of the list sets what the diff is measured against:

  • Working changes shows everything uncommitted.
  • Last turn shows only what the most recent turn changed.
  • vs a branch shows everything this branch changed compared with the branch you pick. Choose Compare to a branch… and use Find a branch… to search.

When a turn's chip scoped the list, a line at the bottom reads "+N more changed this session — show all". Click it to see everything again.

Organize the file list#

Use the buttons above the list:

  • Folder tree or Flat list switches the layout.
  • Filter by name narrows the list as you type.
  • Collapse and Expand fold all folders.
  • Show untracked or Hide untracked toggles files git does not track yet.

Read a diff#

The reader opens beside the list in the dock. You can expand it over the thread, or open Changes in its own window: press ⌘K (macOS) / Ctrl+K, then pick Review changes in a window.

In the reader bar:

  • Diff layout switches between Side by side and Unified. Side by side needs a wider panel.
  • Previous change and Next change step through hunks. Keys: ⌥↑ and ⌥↓ (macOS) / Alt+Up and Alt+Down (Windows).
  • Expand unchanged or Collapse unchanged shows or hides the unchanged lines between hunks.
  • Reader settings holds Wrap long lines and Sync scroll.
  • Ignore whitespace can hide whitespace-only and empty-line changes.
  • Open in viewer opens the file in the file viewer. With a line selected, ⌘⏎ / Ctrl+Enter opens it at that change.
  • Back to list returns to the file list in narrow layouts.

Markdown files can be read as rendered text or as raw diff.

Watch the history with Time Machine#

Click Time Machine in the Changes header to see the session as a series of points, one per turn that changed files. Step with ← and →, or press Space to play. Choose Summarize on a point to get a short description of it. Time Machine is read-only. Click Exit Time Machine or Back to now to leave. Esc also leaves it when no reader is open.

Keep or leave out a change#

Keeping is a commit selection. It decides what goes into your next commit.

  1. In the list, the Include in commit row shows how many files are included ("3 of 5"). Click all or none to change every file at once.
  2. Click a file's check box, or select it and press Space, to include or leave it out.
  3. Inside a diff, each hunk has a check box labeled Include this hunk in commit. Clear it to hold that hunk back.

A file or hunk you leave out stays on disk, unchanged. ShanFlow has no revert button. To undo a change, ask the agent ("undo the change to auth.ts"). If the file would no longer build without the one you left out, the commit box warns you: "this commit may not build on its own."

Commit#

  1. Open the commit box in the Changes panel.
  2. Write a message, or click Generate commit message (tooltip "Draft message"). The draft reads the diff of the files you included and your recent commit subjects, and matches their style. Edit it freely. The counter beside the box shows the length of the first line.
  3. Click Commit, which shows the number of included files. Or press ⌘⏎ / Ctrl+Enter while the cursor is in the message box.
The commit box with a drafted message and the Commit buttonThe commit box with a drafted message and the Commit button

Commit is dimmed, with the reason in its tooltip, when:

  • a turn is still running ("Turn still running"),
  • no files are included ("No files selected"), or
  • the message is empty ("No commit message").

After a commit the box reads "Committed 3 files · abc1234 — ship it?" with the push and pull request buttons.

Push#

  1. Press ⌘⇧K (macOS) / Ctrl+Shift+K (Windows), or use Push in the Changes panel.
  2. A Push N commits? confirmation lists the commits and shows the branch going to origin.
  3. Click Push, or press Enter. Cancel or Esc closes it.

The shortcut only opens the confirmation. It never pushes by itself. Push is dimmed with "No remote" or "Nothing to push" when it cannot run.

In a panel without a commit box, the Review changes button has a small arrow next to it (Integrate). Its menu offers Push and Open a PR.

Open a pull request#

Opening a pull request needs the GitHub command-line tool (gh) installed. Without it the button explains "gh not installed".

  1. After you commit and push, click Open a pull request. The button says "Push the branch first" until the branch is pushed, and "Detached HEAD" when no branch is checked out.
  2. In the form, fill in Pull request title and the description, or click Generate PR title and description. Use Preview to see the description rendered, and Show source to go back.
  3. Under Destination, choose the branch to merge into.
  4. Optionally pick Reviewers and Assignees.
  5. Leave Open as a draft checked to create a draft, or clear it.
  6. Click Create draft PR or Open pull request. Cancel or Esc closes the form.

Review a session that works in a worktree#

A session that runs in its own worktree shows Review & integrate at the bottom of the Changes panel. It offers:

  • Read the branch diff: everything the session did since it branched, file by file.
  • Commit & open a PR: opens the commit box with a pull request ahead.

The menu notes that nothing merges until you say so on the pull request.