Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Everything beyond the core loop (create a task, review its diff, merge or discar
- **Confidence ratings** — **Run review** in the Finish dialog sends your prompts, the branch diff and the results of the checks you picked to a separate reviewer model (Settings › Review), so the task's agent never rates its own work. The reviewer can read the repository but not change it (Claude gets only file-reading tools; Codex runs in its read-only sandbox), and each score lists what it checked. **Rework** puts the findings you picked into one prompt that asks the agent to check each before changing code for it. The review runs in the background and notifies you when it is done. An agent can also publish a rating with the `confidence_publish` MCP tool. Low scores are highlighted, and a rating is marked out of date once the code changes after it
- **Loose ends before merge** — an agent records loose ends it leaves, such as a temporary flag or debug logging to remove, with the `finish_items_publish` MCP tool; each call replaces its list. The Finish dialog lists them under Before you merge, all ticked; **Send to** hands the kept ones back to the task's main agent as its own earlier notes and steps aside so it can handle them. Until every pull request of the task merged, the board's Mostly done line counts them; merging settles them. Worktree tasks only; children that land themselves don't get the tool
- **Before-and-after screenshots** — **Capture before & after** in the Finish dialog (needs Claude Code) works out how to start the task's version and the base version of your app, shows those commands and runs them only once you allow it, then screenshots each changed page side by side and stops every process it started
- **Create a pull request** — **Create PR** in the task header, **Create draft PR** in the Finish dialog's Pull request section, **Create draft pull request** in a task's menu or `Ctrl+Shift+R` does it in one click: it pushes the branch, drafts the title and description with the separate model from Settings (or uses one the task's agent already published, falling back to the commit messages if drafting fails) and opens a draft PR. To write it yourself, **Write it first…** in Finish or **Write pull request…** in the task's menu opens a title and Markdown description to edit, prefilled from the commits and the repository's PR template. **Draft description** asks the task's agent to write it in its session (through the `pr_draft_publish` tool, which never pushes or creates anything), or a separate model you pick when the agent is busy. An unpushed branch is pushed first; the PR is created as a draft unless you untick it, and a branch that already has a PR offers to link that one instead. Needs the GitHub CLI (`gh`) logged in
- **Create a pull request** — **Create PR** in the task header, **Create draft PR** in the Finish dialog's Pull request section, **Create draft pull request** in a task's menu or `Ctrl+Shift+H` does it in one click: it pushes the branch, drafts the title and description with the separate model from Settings (or uses one the task's agent already published, falling back to the commit messages if drafting fails) and opens a draft PR. To write it yourself, **Write it first…** in Finish or **Write pull request…** in the task's menu opens a title and Markdown description to edit, prefilled from the commits and the repository's PR template. **Draft description** asks the task's agent to write it in its session (through the `pr_draft_publish` tool, which never pushes or creates anything), or a separate model you pick when the agent is busy. An unpushed branch is pushed first; the PR is created as a draft unless you untick it, and a branch that already has a PR offers to link that one instead. Needs the GitHub CLI (`gh`) logged in
- **Coverage radar** — per-file test-coverage badges in the Changed Files panel

## Planning and coordinating agents
Expand Down Expand Up @@ -78,7 +78,7 @@ The bundled image still ships the `agy` binary, and `~/.gemini/antigravity-cli`
| `Ctrl+Shift+A` | New task (alternative) |
| `Ctrl+Enter` | Send prompt |
| `Ctrl+Shift+M` | Finish task (merge or push) |
| `Ctrl+Shift+R` | Create pull request |
| `Ctrl+Shift+H` | Create pull request |
| `Ctrl+W` | Close focused panel or file |
| `Ctrl+Shift+W` | Close active task |
| **Navigation** | |
Expand Down
3 changes: 3 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ import { startAgentHookStatusListener } from './store/agentHookStatus';
import { applyPlanContent } from './store/canvas';
import { startBackgroundChecks } from './store/background-checks';
import { startPreviousTaskTracker } from './store/previous-task';
import { startTaskVisitTracker } from './store/task-visits';
import type { PlanContentMessage } from './store/canvas';
import { CircleCheckIcon, GitHubMarkIcon, SyncIcon } from './components/icons';

Expand Down Expand Up @@ -440,6 +441,7 @@ function App() {
const stopAgentHookStatusListener = startAgentHookStatusListener();
const stopBackgroundChecks = startBackgroundChecks();
const stopPreviousTaskTracker = startPreviousTaskTracker();
const stopTaskVisitTracker = startTaskVisitTracker();
// Listen for plan content pushed from backend plan watcher
const offPlanContent = window.electron.ipcRenderer.on(IPC.PlanContent, (data: unknown) => {
if (!data || typeof data !== 'object') return;
Expand Down Expand Up @@ -926,6 +928,7 @@ function App() {
stopAgentHookStatusListener();
stopBackgroundChecks();
stopPreviousTaskTracker();
stopTaskVisitTracker();
stopDocumentListeners();
stopWindowVisibilityTracking();
offPlanContent();
Expand Down
81 changes: 81 additions & 0 deletions src/components/AttentionTray.client.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { clearAgentActivity } from '../store/taskStatus';
import { clearTaskLandingReview, uncollapseTask } from '../store/tasks';
import { setDelegationStates } from '../store/delegation';
import type { Task } from '../store/types';
import { startTaskVisitTracker } from '../store/task-visits';
import { AttentionTray } from './AttentionTray';

vi.mock('../lib/ipc', () => ({ invoke: vi.fn(async () => ({})) }));
Expand Down Expand Up @@ -36,6 +37,7 @@ const rows = () => [...host.querySelectorAll<HTMLButtonElement>('.sidebar-attent
beforeEach(() => {
vi.clearAllMocks();
setStore('tasks', reconcile({ child: { ...task } }));
setStore('taskGitStatus', reconcile({}));
setStore('agents', reconcile({}));
for (const id of task.agentIds) {
setStore('agents', id, {
Expand Down Expand Up @@ -173,3 +175,82 @@ it('offers the shared task menu on a row, whose Open acts like a click on it', (
items.find((item) => item.textContent?.trim() === 'Open')?.click();
expect(store.activeTaskId).toBe('child');
});

function setHead(headSha: string): void {
setStore('taskGitStatus', 'child', {
has_committed_changes: true,
has_uncommitted_changes: false,
current_branch: 'child',
base_branch: 'main',
head_sha: headSha,
refreshedAt: Date.now(),
});
}
const changesText = () => rows()[0].querySelector('[data-testid="attention-changes"]')?.textContent;

it('shows app-attested changes since the last visit, but not agent self-reports', () => {
setStore('tasks', 'child', {
needsReview: true,
lastVisit: { at: 1_000, headSha: 'old' },
verificationRun: {
command: 'npm test',
status: 'failed',
exitCode: 1,
headSha: 'new',
dirty: false,
startedAt: new Date(2_000).toISOString(),
finishedAt: new Date(3_000).toISOString(),
outputTail: '',
},
// The agent's own claim must not appear in the line.
verification: { checks: [{ name: 'tests', command: 'npm test', result: 'passed' }] },
});
setHead('new');
expect(changesText()).toBe('new commits · verify failed');
expect(rows()[0].title).toContain('Since you looked: new commits · verify failed');
});

it("keeps the line's space while empty and while the task is open", () => {
setStore('tasks', 'child', { needsReview: true, lastVisit: { at: 1_000, headSha: 'old' } });
setHead('old');
expect(changesText()).toBe('\u00a0');
setHead('new');
expect(changesText()).toBe('new commits');
setStore('activeTaskId', 'child');
expect(changesText()).toBe('\u00a0');
});

it('adds the line to review rows only; a question is answered either way', () => {
setStore('tasks', 'child', { needsReview: true, lastVisit: { at: 1_000, headSha: 'old' } });
setHead('new');
applyAgentHookEvent({
agentId: 'two',
taskId: 'child',
state: 'waiting',
event: 'PermissionRequest',
at: Date.now(),
});
const [question, review] = rows();
expect(question.querySelector('[data-testid="attention-changes"]')).toBeNull();
expect(review.querySelector('[data-testid="attention-changes"]')?.textContent).toBe(
'new commits',
);
});

it('stamps the visit with the current HEAD when the user leaves a task', () => {
const stop = startTaskVisitTracker();
try {
setHead('first');
setStore('activeTaskId', 'child');
expect(store.tasks.child.lastVisit?.headSha).toBe('first');
setHead('second');
setStore('activeTaskId', null);
expect(store.tasks.child.lastVisit?.headSha).toBe('second');
// A HEAD that can no longer be read must not leave the old one behind.
setStore('taskGitStatus', 'child', 'error', 'unreadable');
setStore('activeTaskId', 'child');
expect(store.tasks.child.lastVisit?.headSha).toBeUndefined();
} finally {
stop();
}
});
29 changes: 28 additions & 1 deletion src/components/AttentionTray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ function AttentionRow(props: { entry: AttentionEntry; nowMs: number; onOpen: ()
const task = () => store.tasks[props.entry.taskId];
const project = () => store.projects.find((p) => p.id === task()?.projectId);
const resume = () => task()?.collapsed && !opensReview(props.entry);
// The row already frames these as news; the prefix lives in the tooltip so
// two changes still fit a narrow sidebar.
const changesLine = () => props.entry.changes.join(' · ');
// Finish needs the task's panel, so it opens the task the way a click on this row does.
const menu = createTaskContextMenu({ task: () => task(), open: () => props.onOpen() });
return (
Expand All @@ -42,7 +45,14 @@ function AttentionRow(props: { entry: AttentionEntry; nowMs: number; onOpen: ()
class="task-item sidebar-attention-row"
aria-current={store.activeTaskId === props.entry.taskId ? 'true' : undefined}
data-attention={getTaskAttentionState(props.entry.taskId)}
title={[t().name, props.entry.label, props.entry.detail].filter(Boolean).join(' — ')}
title={[
t().name,
props.entry.label,
props.entry.detail,
changesLine() && 'Since you looked: ' + changesLine(),
]
.filter(Boolean)
.join(' — ')}
onClick={() => props.onOpen()}
onContextMenu={(event) => menu.onContextMenu(event)}
style={{
Expand Down Expand Up @@ -77,6 +87,23 @@ function AttentionRow(props: { entry: AttentionEntry; nowMs: number; onOpen: ()
· {props.entry.detail}
</Show>
</span>
{/* Neutral, and always present on a review row: it is evidence, not
urgency, and the row must not grow when a change arrives. */}
<Show when={props.entry.kind === 'review'}>
<span
data-testid="attention-changes"
style={{
'font-size': sf(11),
color: theme.fgSubtle,
overflow: 'hidden',
'text-overflow': 'ellipsis',
'white-space': 'nowrap',
width: '100%',
}}
>
{changesLine() || ' '}
</span>
</Show>
<div
style={{
display: 'flex',
Expand Down
1 change: 1 addition & 0 deletions src/components/TaskBoard.client.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ describe('next task that needs you', () => {
taskId: 'review',
label: 'Answer',
panel: 'ai-terminal:asking',
changes: [],
},
];
openNextAttentionTask();
Expand Down
2 changes: 1 addition & 1 deletion src/components/TaskTitleBar.client.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ it('offers Create PR once the branch has commits and no pull request', () => {
gitStatus(true);
const create = button('Create PR');
expect(create?.title).toMatch(
/^Push, draft a description and open a draft pull request into main \(.+R\)$/,
/^Push, draft a description and open a draft pull request into main \(.+H\)$/,
);
// Next to Finish, before it.
expect(create?.nextElementSibling?.textContent).toContain('Finish');
Expand Down
13 changes: 13 additions & 0 deletions src/components/board/TaskStatus.client.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ it('says failed CI once, in the label', () => {
expect(status()?.classList).toContain('error');
});

it('marks running CI with ellipsis dots that screen readers skip, and drops them when CI ends', () => {
setPrChecks('t', { ...green(), overall: 'pending', pending: 1 });
dispose = render7();
expect(status()?.getAttribute('title')).toBe('CI running');
expect(status()?.classList).toContain('muted');
const dots = status()?.querySelector('[aria-hidden="true"]');
expect(dots?.textContent).toBe('...');
expect(status()?.textContent).toBe('CI running...');

setPrChecks('t', green());
expect(status()?.textContent).toBe('Ready to merge');
});

it('warns about conflicts but not about a routine wait for review', () => {
setPrChecks('t', { ...green(), mergeable: 'CONFLICTING' });
dispose = render7();
Expand Down
12 changes: 11 additions & 1 deletion src/components/board/TaskStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,17 @@ export function TaskPr(props: { taskId: string; watchId: string; onMerge?: () =>
<GitMergeIcon size={12} />
</Match>
</Switch>
<span class="task-board-status-text">{label()}</span>
<span class="task-board-status-text">
{label()}
{/* The title glyph is easy to miss; stepping dots make the label itself read as in progress. */}
<Show when={kind() === 'running'}>
<span class="task-board-dots" aria-hidden="true">
<span>.</span>
<span>.</span>
<span>.</span>
</span>
</Show>
</span>
</span>
<span class="task-board-actions">
<Show when={hasOpenTaskPr(props.taskId)}>
Expand Down
48 changes: 48 additions & 0 deletions src/components/task-board.css
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,54 @@ html[data-look^='islands-'] .task-board {
overflow: hidden;
text-overflow: ellipsis;
}
/* Running CI: the dots build up ("", ".", "..", "...") and restart. Each dot
keeps its width while hidden, so the label never shifts. */
.task-board-dots > span {
animation: 1.6s steps(1, end) infinite;
}
.task-board-dots > span:nth-child(1) {
animation-name: board-dot-1;
}
.task-board-dots > span:nth-child(2) {
animation-name: board-dot-2;
}
.task-board-dots > span:nth-child(3) {
animation-name: board-dot-3;
}
@keyframes board-dot-1 {
0% {
opacity: 0;
}
25%,
100% {
opacity: 1;
}
}
@keyframes board-dot-2 {
0% {
opacity: 0;
}
50%,
100% {
opacity: 1;
}
}
@keyframes board-dot-3 {
0% {
opacity: 0;
}
75%,
100% {
opacity: 1;
}
}
/* Matches the per-dot rules' specificity and follows them, so it wins: all
three dots stay visible, a plain "CI running...". */
@media (prefers-reduced-motion: reduce) {
.task-board-dots > span:nth-child(n) {
animation: none;
}
}
.task-board-status.warning {
color: var(--warning);
font-weight: 500;
Expand Down
6 changes: 4 additions & 2 deletions src/lib/keybindings/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,15 @@ export const DEFAULT_BINDINGS: KeyBinding[] = [
global: true,
},
{
// Shift+P is taken by switchDocument; the app registers no reload role for R.
// H for GitHub. Not R: Ctrl/Cmd+Shift+R is reload in every browser and Electron's
// stock menu, so muscle memory would fire a PR. Not S (save), P (switchDocument),
// B (sidebar in a preset) or U (IBus unicode input on Linux).
id: 'app.task.createPr',
layer: 'app',
category: 'Tasks',
description: 'Create pull request',
platform: 'both',
key: 'R',
key: 'H',
modifiers: { cmdOrCtrl: true, shift: true },
action: 'createPullRequest',
global: true,
Expand Down
Loading
Loading