Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai 4256194f9e fix(agents): drop the status bar's Changes toggle
The session status bar ended with a Changes toggle that did the same as the
"N changed files" chip right below it. The chip opens and closes the Changes
pane and also shows the line counts, the pane has its own hide button, and the
status-bar toggle was disabled whenever there were no changes, so the status
bar now keeps only the Terminal button. The unused "Show changes" string goes
from the locale catalogs.
2026-11-11 12:04:39 +08:00
9 змінених файлів з 6 додано та 80 видалено

No files matched your search

-31
Переглянути файл
@@ -54,10 +54,6 @@
align-items: center; align-items: center;
gap: 2px; gap: 2px;
} }
.statusActions > .changesToggle {
height: var(--h-control-small);
padding: 0 4px;
}
.statusText { .statusText {
flex: 1 1 0; flex: 1 1 0;
min-width: 0; min-width: 0;
@@ -1230,33 +1226,6 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.changesToggle {
display: inline-flex;
align-items: center;
gap: 4px;
height: var(--h-control);
padding: 0 8px;
border: 0;
border-radius: var(--radius-small);
background: transparent;
color: var(--fg-subtle);
font: inherit;
font-size: var(--fs-small);
cursor: pointer;
}
.changesToggle:hover:not(:disabled) {
background: var(--bg-hover);
color: var(--fg-strong);
}
.changesToggle[aria-pressed="true"] {
background: var(--bg-selected);
color: var(--fg-strong);
}
.changesToggle:disabled {
opacity: 0.4;
cursor: default;
}
/* An open AskUserQuestion: every question with its options, answered at once above the composer. */ /* An open AskUserQuestion: every question with its options, answered at once above the composer. */
.questionCard { .questionCard {
flex: none; flex: none;
+4 -41
Переглянути файл
@@ -272,20 +272,8 @@ function useLocalHead(status: AgentTask["status"] | null, root: string | null):
return local ? head : null; return local ? head : null;
} }
/** The task's terminal and changes, at the end of its status line. */ /** The task's terminal, at the end of its status line. */
function StatusActions({ function StatusActions({ task }: { task: AgentTask }) {
task,
changes,
changesOpen,
onToggleChanges,
}: {
task: AgentTask;
changes: AgentChange[] | null;
changesOpen: boolean;
onToggleChanges: () => void;
}) {
const tx = useTx();
const count = changes?.length ?? 0;
return ( return (
<span className={styles.statusActions}> <span className={styles.statusActions}>
<IconButton <IconButton
@@ -294,18 +282,6 @@ function StatusActions({
title="Terminal" title="Terminal"
onClick={() => void executeAction("terminal.openAt", task.cwd)} onClick={() => void executeAction("terminal.openAt", task.cwd)}
/> />
<button
type="button"
className={styles.changesToggle}
aria-pressed={changesOpen}
disabled={count === 0 && !changesOpen}
aria-label={changesOpen ? tx("Hide changes") : tx("Show changes")}
title={changesOpen ? tx("Hide changes") : tx("Show changes")}
onClick={onToggleChanges}
>
<Icon name="toolwindow-changes" size={14} />
{count > 0 && <span>{count}</span>}
</button>
</span> </span>
); );
} }
@@ -315,16 +291,10 @@ function SessionStatus({
task, task,
entries, entries,
head, head,
changes,
changesOpen,
onToggleChanges,
}: { }: {
task: AgentTask; task: AgentTask;
entries: AgentEntry[] | null; entries: AgentEntry[] | null;
head: string | null; head: string | null;
changes: AgentChange[] | null;
changesOpen: boolean;
onToggleChanges: () => void;
}) { }) {
const tx = useTx(); const tx = useTx();
const project = useProject((s) => s.project); const project = useProject((s) => s.project);
@@ -357,7 +327,7 @@ function SessionStatus({
{task.status === "limited" && task.resetsMs != null && ` · ${tx`resets ${formatSentAt(task.resetsMs)}`}`} {task.status === "limited" && task.resetsMs != null && ` · ${tx`resets ${formatSentAt(task.resetsMs)}`}`}
</span> </span>
<Meters task={task} entries={entries} /> <Meters task={task} entries={entries} />
<StatusActions task={task} changes={changes} changesOpen={changesOpen} onToggleChanges={onToggleChanges} /> <StatusActions task={task} />
</div> </div>
); );
} }
@@ -2559,14 +2529,7 @@ function SessionComposer({
); );
return ( return (
<div className={styles.composerArea}> <div className={styles.composerArea}>
<SessionStatus <SessionStatus task={task} entries={entries} head={head} />
task={task}
entries={entries}
head={head}
changes={changes}
changesOpen={changesOpen}
onToggleChanges={onToggleChanges}
/>
{task.status === "archived" && ( {task.status === "archived" && (
<div className={styles.banner}> <div className={styles.banner}>
<span className={styles.bannerText}> <span className={styles.bannerText}>
+2 -2
Переглянути файл
@@ -1124,14 +1124,14 @@ describe("session state across tasks and hosts", () => {
useAgents.setState({ docked: "A", sessionLocation: "toolWindow" }); useAgents.setState({ docked: "A", sessionLocation: "toolWindow" });
render(<AgentsView />); render(<AgentsView />);
await screen.findByText("Answer A"); await screen.findByText("Answer A");
await waitFor(() => expect(screen.getByRole("button", { name: "Show changes" })).toBeEnabled()); await screen.findByRole("button", { name: /1 changed file/ });
expect(screen.queryByRole("complementary", { name: "Changes" })).toBeNull(); expect(screen.queryByRole("complementary", { name: "Changes" })).toBeNull();
const markVisible = vi.spyOn(await import("./store"), "markVisible"); const markVisible = vi.spyOn(await import("./store"), "markVisible");
vi.spyOn(document, "hasFocus").mockReturnValue(true); vi.spyOn(document, "hasFocus").mockReturnValue(true);
const message = screen.getByRole("textbox", { name: "Message" }); const message = screen.getByRole("textbox", { name: "Message" });
fireEvent.change(message, { target: { value: "Draft to keep" } }); fireEvent.change(message, { target: { value: "Draft to keep" } });
const conversation = stream(); const conversation = stream();
fireEvent.click(screen.getByRole("button", { name: "Show changes" })); fireEvent.click(screen.getByRole("button", { name: /1 changed file/ }));
expect(screen.getByRole("complementary", { name: "Changes" })).toBeVisible(); expect(screen.getByRole("complementary", { name: "Changes" })).toBeVisible();
expect(screen.getByText("Answer A")).not.toBeVisible(); expect(screen.getByText("Answer A")).not.toBeVisible();
expect(screen.queryByRole("textbox", { name: "Message" })).toBeNull(); expect(screen.queryByRole("textbox", { name: "Message" })).toBeNull();
-1
Переглянути файл
@@ -2016,7 +2016,6 @@
"Show Commit in Git Log": "Mostrar confirmación en el registro de Git", "Show Commit in Git Log": "Mostrar confirmación en el registro de Git",
"Show Container Log": "Mostrar registro del contenedor", "Show Container Log": "Mostrar registro del contenedor",
"Show Context Actions": "Mostrar acciones de contexto", "Show Context Actions": "Mostrar acciones de contexto",
"Show changes": "Mostrar cambios",
"Show Coverage": "Mostrar cobertura", "Show Coverage": "Mostrar cobertura",
"Show Debug Tool Window": "Mostrar ventana de herramientas de depuración", "Show Debug Tool Window": "Mostrar ventana de herramientas de depuración",
"Show Diff": "Mostrar diferencias", "Show Diff": "Mostrar diferencias",
-1
Переглянути файл
@@ -1928,7 +1928,6 @@
"Show Commit in Git Log": "Afficher le commit dans le journal Git", "Show Commit in Git Log": "Afficher le commit dans le journal Git",
"Show Container Log": "Afficher le journal du conteneur", "Show Container Log": "Afficher le journal du conteneur",
"Show Context Actions": "Afficher les actions contextuelles", "Show Context Actions": "Afficher les actions contextuelles",
"Show changes": "Afficher les modifications",
"Show Coverage": "Afficher la couverture", "Show Coverage": "Afficher la couverture",
"Show Debug Tool Window": "Afficher la fenêtre d'outil Débogage", "Show Debug Tool Window": "Afficher la fenêtre d'outil Débogage",
"Show Diff": "Afficher le diff", "Show Diff": "Afficher le diff",
-1
Переглянути файл
@@ -2072,7 +2072,6 @@
"Show Commit in Git Log": "Git 로그에서 커밋 표시", "Show Commit in Git Log": "Git 로그에서 커밋 표시",
"Show Container Log": "컨테이너 로그 표시", "Show Container Log": "컨테이너 로그 표시",
"Show Context Actions": "컨텍스트 액션 표시", "Show Context Actions": "컨텍스트 액션 표시",
"Show changes": "변경 사항 표시",
"Show Coverage": "커버리지 표시", "Show Coverage": "커버리지 표시",
"Show Debug Tool Window": "디버그 도구 창 표시", "Show Debug Tool Window": "디버그 도구 창 표시",
"Show Diff": "Diff 표시", "Show Diff": "Diff 표시",
-1
Переглянути файл
@@ -2003,7 +2003,6 @@
"Show Commit in Git Log": "Pokaż zatwierdzenie w dzienniku Git", "Show Commit in Git Log": "Pokaż zatwierdzenie w dzienniku Git",
"Show Container Log": "Pokaż dziennik kontenera", "Show Container Log": "Pokaż dziennik kontenera",
"Show Context Actions": "Pokaż akcje kontekstowe", "Show Context Actions": "Pokaż akcje kontekstowe",
"Show changes": "Pokaż zmiany",
"Show Coverage": "Pokaż pokrycie kodu", "Show Coverage": "Pokaż pokrycie kodu",
"Show Debug Tool Window": "Pokaż okno narzędziowe debugowania", "Show Debug Tool Window": "Pokaż okno narzędziowe debugowania",
"Show Diff": "Pokaż różnice (Diff)", "Show Diff": "Pokaż różnice (Diff)",
-1
Переглянути файл
@@ -2004,7 +2004,6 @@
"Show Commit in Git Log": "Mostrar commit no log do Git", "Show Commit in Git Log": "Mostrar commit no log do Git",
"Show Container Log": "Mostrar log do contêiner", "Show Container Log": "Mostrar log do contêiner",
"Show Context Actions": "Mostrar ações de contexto", "Show Context Actions": "Mostrar ações de contexto",
"Show changes": "Mostrar alterações",
"Show Coverage": "Mostrar cobertura", "Show Coverage": "Mostrar cobertura",
"Show Debug Tool Window": "Mostrar janela de ferramentas de depuração", "Show Debug Tool Window": "Mostrar janela de ferramentas de depuração",
"Show Diff": "Mostrar diff", "Show Diff": "Mostrar diff",
-1
Переглянути файл
@@ -2364,7 +2364,6 @@
"Show Commit in Git Log": "在 Git 日志中显示提交", "Show Commit in Git Log": "在 Git 日志中显示提交",
"Show Container Log": "显示容器日志", "Show Container Log": "显示容器日志",
"Show Context Actions": "显示上下文操作", "Show Context Actions": "显示上下文操作",
"Show changes": "显示更改",
"Show Coverage": "显示覆盖率", "Show Coverage": "显示覆盖率",
"Show Debug Tool Window": "显示调试工具窗口", "Show Debug Tool Window": "显示调试工具窗口",
"Show Diff": "显示差异", "Show Diff": "显示差异",