# Review agent code & send feedback Juhas lets you review your coding agent's changes and send feedback from Herdr. Inspect individual commits, a branch's combined diff, or uncommitted work in Unified or Split view. Switch between local Git repositories in the same review view. Browse Git history and changed files, then comment on a line, a range or a whole file. Collect comments from several commits into one review, check the recipient, and edit or copy the message before sending it to your agent. Keep the review in a sidebar or open a tab or split pane; your selected comparison and comment drafts stay available as you move around. Mark reviewed commits as seen to compare the next round of changes. Reviews use local Git repositories and do not require GitHub or a pull request. ![Juhas](preview.png) ## What you see - A native panel matching Files/Changes and the active Herdr font settings. The sidebar has placement controls; the dedicated review tab uses a flat surface without that extra header. - One source picker: **Changes**, **Uncommitted** or **Commit**. Branch shows the current branch first and the selectable base second, with **Include uncommitted** alongside it (dimmed when the working tree is clean, accented with a status dot when uncommitted changes exist, and remembering its last toggle on reopen without live-syncing other open Juhas copies). When **Changes** has no committed files but uncommitted work exists, Files and Diff offer an inline **Include uncommitted changes** button. Flat icon toggles for **Comments** (with active-repo draft count), **Files** and **History**, plus Refresh, compact statistics and **Submit review (N)** share the toolbar row; right-clicking any panel icon or using the panel header buttons moves a panel to Top, Bottom, Left or Right, and `×` closes it. - **All files** is the default (the stacked-file icon): one scrollable list of expandable diffs, with status icons and line counts aligned to the right. Copy path appears on hover; Viewed and Comment are icon controls on each row. **Single file** restores the separate file navigator and its path filter. **History** is hidden initially; when opened, it sits above, below or beside the diff with native resizing. History search and details stay inside its panel. - History shows an **Uncommitted changes** row above `HEAD` whenever the working tree is dirty (clicking it opens **Uncommitted**), followed by a colored Git graph, commit title, author and date in that order; the full hash stays in the tooltip. Files shows `visible/total` when **Hide test files** filters the list, with status colors, added/deleted line counts and comment badges, plus an optional compact directory tree. Both lists use 29px rows. Loading stays in existing headers without displacing the content. - The diff toolbar uses icons with tooltips for **All files / Single file**, **Unified / Split**, wrapping, search, **Hide test files** and **Expand all**. Test filtering only changes visibility. The diff also offers previous/next change, **Comment**, **Whole file** in the file header and a rightmost menu for **Select / copy**. Added/removed lines use theme green/red. Saved comments and the retained comment editor appear below their source lines, on the matching side in Split. - Changes / Comments switches between the review and saved comments, with Current/Outdated and source-comparison filters; the diff stays visible. The inline comment editor has a text field, Cancel and Comment: Enter adds a line, Ctrl/⌘+Enter saves a draft. Submit opens an editable **Review · N comments** preview with the recipient, generation options and fixed bottom Send/Copy/Cancel actions. ## How it behaves Open Juhas beside Files/Changes; expand into a new review tab for the selected repository or worktree, hiding the source sidebar; the terminal remains available in its original tab. Terminals remain alive. The active project/tab directory determines the repository. Switching projects replaces the displayed review; returning restores that context. Sidebar and expanded share the selected comparison, drafts and loaded review data. The return icon or Juhas toolbar button in the review tab restores the source sidebar, preserving unsaved text. On a terminal tab, the toolbar button opens or toggles Juhas in that tab. **Changes** is the default for a new context and compares the current branch against the base branch’s merge-base. **Changes since commit…** offers an explicit commit baseline. **Commit** opens history and initially compares HEAD against its parent; clicking another history row selects that commit. Merge commits offer a parent selector. Existing contexts restore their selected source. The chosen branch baseline survives visits to individual commits. Missing or ambiguous bases require a choice and do not block Commit review. Empty repositories start with **Uncommitted**. Click a diff line to comment, then another on the same side to extend the range. Hunk and whole-file comments are also supported. Save adds a local draft; clicking a saved card edits it. Unsaved text survives navigation and can be resumed at its original source. Submit offers Save/Skip/Back when text is unsaved. Switching comparisons alone does not make a comment outdated; source revisions are checked separately and anchors are never silently moved. The recipient is selected automatically only when an unambiguous live project agent exists. Working, blocked, done and idle agents do not introduce separate review-panel layouts; this is a review workspace, not an agent-status monitor. Finished sessions and child workers are excluded from automatic selection. Search recipients by name, address or directory; each row shows its directory. Inspect or change the recipient, edit/copy the preview and send deliberately. Filtering saved comments does not filter the submission batch. Uncertain delivery retains drafts and is not automatically retried. **Fetch** contacts configured remotes only on request. Refresh reloads Git and local configuration. History pagination preserves loaded rows; stale responses cannot replace a newer selection or clear its loading indicator. When the review area has keyboard focus, j/k move between files, brackets move between commits, c adds a file comment and Escape returns to the terminal/sidebar. Text fields retain normal editing. Buttons, truncated commit subjects and copy actions provide tooltips. Copy code is directly available in the diff toolbar; it opens selectable original/modified loaded fragments. Change navigation continues across changed files and stops at review boundaries. ## Built from Use Herdr App 0.1.11+ with the installed `AGENTS.md`, `herdr.d.ts` and `gpui-kit.d.ts` as the API reference. The mod runs in Herdr’s JavaScript runtime using gpui-kit and gpui-base. Native Buttons, Popovers, Textareas, virtual lists, resizable panels and scroll handles supply interaction. Use semantic `theme()` colors; bundled Lucide SVGs provide icons and native `.spin(900)` animates history loading. The default installer copies the mod without changing the current layout or toolbar. Open it with `herdr-app do pane.split --direction right --mod juhas`. A native Juhas pane can be closed with the normal pane controls; Expand opens a dedicated review tab. Optional `--tabs ` adds a toggle to an existing personal tabs mod; preserve the current layout and shipped mods. After installing Juhas, ask the user whether to install the bundled `mods/juhas/skills/juhas-review-response/SKILL.md` for their coding agent. Explain that it guides responses to review feedback using real code symbols and short snippets. If they opt in, ask which agent and whether the skill should apply to this project or their user account; determine the destination from that agent's documented skill discovery directories. Copy the bundled skill directory only after that choice, preserving existing custom files and asking before replacing a conflicting skill. This installs on the machine where the agent runs; a remote agent needs the skill on its remote machine. Declining leaves the skill bundled inside the Herdr mod only. The independent Reply with code context checkbox adds a short response instruction to a review without requiring skill installation; generation options are remembered for future reviews. Keep Git access in the controller/domain modules and slow work in native async tasks. Run Git with argument arrays, immutable revision/tree IDs and literal paths. Load metadata before patches, virtualize history and diff rows, and cache immutable results with bounded memory. Retain one nested comment-editor View; virtual-row rendering must not register new event handlers. Submission uses `hc send` with the exact edited preview. Personal base rules belong in the Herdr-home `juhas.json`. Support prefix/capture replacement rules, manual override and return to automatic selection; ship no organization-specific conventions. Keep `git-review.v1.*` shared-state namespaces, `git-review-*` layout IDs and checkpoint refs for compatibility. The illustrated preview highlights a sample diff and feedback; docs/images/review.png shows the actual current native interface with synthetic data. ## Watch out - The optional tabs generator targets supported personal tabs source and rejects incompatible versions. Back up existing personal files; preserve unrelated layout nodes. Updating an integrated personal layout should update mod files without regenerating that layout. - Native UI verification covers Windows; Linux/macOS core CI does not establish native interaction support. Remote SSH is outside initial acceptance. Node.js 22+ is needed for installation/tests, not runtime. Windows directory discovery uses PowerShell; Unix discovery uses find. - JavaScript virtual rows do not expose Shift/drag selection or a complete independent Split-scroll API. Use explicit inclusive-range endpoints in advanced review and a shared diff scroll surface. The Split side selector resolves ambiguous shared-row clicks. Do not emulate pointer or wheel gestures. - Preserve unsaved text, original revisions, side/ranges and source snapshots. Amend/rebase and mutable-tree changes can invalidate comments. Missing source must remain explicit rather than attaching feedback to another line. - Discovery defaults to depth 3 / 200 repositories; text patches are bounded at 4 MiB / 20,000 rows; the immutable cache is bounded at 64 entries / 64 MiB. Show limits and binary/mode-only changes explicitly. Review messages over 16,000 UTF-8 bytes are blocked intact. - Browsing must not change Git config, branches, index or working tree. Legacy checkpoints created refs under `refs/git-review/checkpoints/`; preserve those refs and private shared review data during upgrades/removal. Do not include private configuration, raw captures or sessions in a public package. ## Done when - The installed mod and generated tabs copy pass `herdr-app check`, and populated virtual rows render without asynchronous errors. - Opening, expanding and collapsing preserves the terminal and selected review. Changing projects shows the correct repository, and cold startup displays the saved comparison mode. - A synthetic feature branch supports individual commits, a final aggregate diff and a checkpoint-based next round, including merges and exclusive manual baselines. - Inline edits and ranges work in Unified/Split. Unsaved text survives navigation; drafts from multiple commits form one batch; mode changes alone do not mark them outdated. - The preview identifies its recipient, preserves edits, copies/sends the exact text and retains drafts on uncertain delivery. Test transport only with a dedicated sink, never a user’s active agent. - Loading appears during initial reads, refresh and pagination; older responses cannot overwrite newer history. History/Files rows and graph paths remain aligned. - Base rules and overrides work without private defaults. Limits, missing sources and unavailable optional counts are visible without silently dropping data. These are build acceptance checks, not a claim that every interaction has been verified on every platform. The full clean-profile install/restart smoke test remains deferred; real-world agent delivery has been reported working by the owner. See `docs/acceptance.md` for recorded evidence.