Next actions (#1082)

* Scaffold

* Create next action bar (vibe-kanban 1fd0bc9a)

There's a placeholder NextActionCard in frontend/src/components/NormalizedConversation/DisplayConversationEntry.tsx

- We should check for the diff summary frontend/src/hooks/useDiffSummary.ts
- If there is a diff, then render a summary box
- The summary box should contain:
  - The diff summary
  - Whether dev server is running for this task attempt
  - Controls to start, stop and view logs (in processes popup) for dev server frontend/src/hooks/useDevServer.ts
  - Button to open task attempt in IDE frontend/src/components/ide/OpenInIdeButton.tsx

* simplify error

* styles

* i18n

* hide dev server controls if no dev server configured

* tooltips

* fmt

* Feedback on next actions (vibe-kanban 7ff2f1b0)

frontend/src/components/NormalizedConversation/NextActionCard.tsx

- File changed and the +/- should be clickable and take you to diffs
- Tooltip for editor should say "See changes in VS Code" (or something that make it clearer that this opens the worktree)

* WIP failed variant for next action

* fail styling

* Create new attempt button (vibe-kanban 4ee265a2)

Please add a "create new attempt" button to frontend/src/components/NormalizedConversation/NextActionCard.tsx

This should be a text button "Try Again" and only show when failed = true

* Git actions dialog (vibe-kanban 328ec790)

frontend/src/components/tasks/Toolbar/GitOperations.tsx

I want these actions to be available in a dialog that's triggerable from:
- Dropdown menu in attempt header frontend/src/pages/project-tasks.tsx
- a new icon in frontend/src/components/NormalizedConversation/NextActionCard.tsx

* Change dev server (vibe-kanban 08df620f)

Instead of hiding if no dev script, show as disabled and change the tooltip to "To start the dev server, add a dev script to this project"

frontend/src/components/NormalizedConversation/NextActionCard.tsx

* i18n (vibe-kanban 0e07797b)

Look for any missing i18n strings in frontend/src/components/NormalizedConversation/NextActionCard.tsx and frontend/src/components/dialogs/tasks/GitActionsDialog.tsx

* Done! I've successfully fixed the i18n issues. The script `scripts/check-i18n.sh` was running correctly, but it was failing because there were missing translation keys in the non-English locales (Spanish, Japanese, and Korean). (#1093)

## What was fixed:

The script checks that all translation keys in the English locale file exist in all other locale files. There were 4 missing keys related to the new Git Actions feature:

1. `actionsMenu.gitActions`
2. `attempt.gitActions`
3. `git.actions.title`
4. `git.actions.prMerged`

I added appropriate translations for these keys to all three locale files:
- **Spanish (es)**: "Acciones de Git" and "PR #{{number}} ya está fusionado"
- **Japanese (ja)**: "Gitアクション" and "PR #{{number}} は既にマージされています"
- **Korean (ko)**: "Git 작업" and "PR #{{number}}은(는) 이미 병합되었습니다"

The i18n check now passes all three validation steps:
-  No new literal strings introduced
-  No duplicate keys found in JSON files
-  Translation keys are consistent across locales

* hide try again if more than 2 execution processes

---------

Co-authored-by: Alex Netsch <alex@bloop.ai>
This commit is contained in:
Louis Knight-Webb
2025-10-23 17:43:37 +01:00
committed by GitHub
parent f88daa4826
commit 6fc7410b28
18 changed files with 693 additions and 41 deletions

View File

@@ -41,6 +41,7 @@ interface GitOperationsProps {
isAttemptRunning: boolean;
setError: (error: string | null) => void;
selectedBranch: string | null;
layout?: 'horizontal' | 'vertical';
}
export type GitOperationsInputs = Omit<GitOperationsProps, 'selectedAttempt'>;
@@ -54,6 +55,7 @@ function GitOperations({
isAttemptRunning,
setError,
selectedBranch,
layout = 'horizontal',
}: GitOperationsProps) {
const { t } = useTranslation('tasks');
@@ -268,9 +270,23 @@ function GitOperations({
return null;
}
const isVertical = layout === 'vertical';
const containerClasses = isVertical
? 'grid grid-cols-1 items-start gap-3 overflow-hidden'
: 'grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 overflow-hidden';
const settingsBtnClasses = isVertical
? 'inline-flex h-5 w-5 p-0 hover:bg-muted'
: 'hidden md:inline-flex h-5 w-5 p-0 hover:bg-muted';
const actionsClasses = isVertical
? 'flex flex-wrap items-center gap-2'
: 'shrink-0 flex flex-wrap items-center gap-2 overflow-y-hidden overflow-x-visible max-h-8';
return (
<div className="w-full border-b py-2">
<div className="grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2 overflow-hidden">
<div className={containerClasses}>
{/* Left: Branch flow */}
<div className="flex items-center gap-2 min-w-0 shrink-0 overflow-hidden">
{/* Task branch chip */}
@@ -319,7 +335,7 @@ function GitOperations({
size="xs"
onClick={handleChangeTargetBranchDialogOpen}
disabled={isAttemptRunning || hasConflictsCalculated}
className="hidden md:inline-flex h-5 w-5 p-0 hover:bg-muted"
className={settingsBtnClasses}
aria-label={t('branches.changeTarget.dialog.title')}
>
<Settings className="h-3.5 w-3.5" />
@@ -421,9 +437,9 @@ function GitOperations({
})()}
</div>
{/* Right: Actions (compact, right-aligned) */}
{/* Right: Actions */}
{branchStatus && (
<div className="shrink-0 flex flex-wrap items-center gap-2 overflow-y-hidden overflow-x-visible max-h-8">
<div className={actionsClasses}>
<Button
onClick={handleMergeClick}
disabled={