Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(code): Sperrgrund im Coding-Agent-Kopf wird sichtbar (R2-21)

purple38161f6ba492
diff --git a/src/components/chat/CodexView.tsx b/src/components/chat/CodexView.tsx
index 39460703..78fe6601 100644
--- a/src/components/chat/CodexView.tsx
+++ b/src/components/chat/CodexView.tsx
@@ -268,6 +268,20 @@ export function CodexView() {
<SmallModelModeToggle />
</div>
+ {/* R2-21: der Sperrgrund hing bisher nur als `title` am Entfernen-Knopf,
+ und ein `disabled` Knopf nimmt keine Mauszeiger-Ereignisse an, also
+ ist der Hinweis nie erschienen (derselbe Fehler wie im ExplorerPanel,
+ dort mit `explorer-workdir-lock` behoben). Ruhiger Ton, keine
+ Warnfarbe: gesperrt ist ein Zustand, der von selbst endet. */}
+ {lockReason && (
+ <p
+ data-testid="codex-workdir-lock"
+ className={`px-3 py-1 text-[0.55rem] border-b border-gray-200 dark:border-white/[0.04] ${HINWEIS_TEXT.ruhig}`}
+ >
+ {CODEX_WORKDIR_LOCK_TITLE[lockReason]}
+ </p>
+ )}
+
{/* Git-missing banner (v2.5.0). Codex shells out to git for
status/diff/commit/log, and without it those tools fail. Minimal,
dismiss-by-installing: an Install button (opens the platform git
diff --git a/src/components/chat/__tests__/the-header-can-let-the-folder-go.test.ts b/src/components/chat/__tests__/the-header-can-let-the-folder-go.test.ts
index 7cd9aed0..4b904bc6 100644
--- a/src/components/chat/__tests__/the-header-can-let-the-folder-go.test.ts
+++ b/src/components/chat/__tests__/the-header-can-let-the-folder-go.test.ts
@@ -143,6 +143,25 @@ describe('the header shows the folder, so it also gives it back', () => {
expect(useCodexStore.getState().workingDirectory).toBe(WINDOWS_PATH)
})
+ it('R2-21: the lock reason is visible, not just a title on a disabled button', async () => {
+ // The `title` on a disabled button never shows: disabled elements take no
+ // pointer events in Chromium, so the reason was invisible before this fix
+ // (same bug as the ExplorerPanel's `explorer-workdir-lock`, review R2-21).
+ act(() => {
+ useCodexStore.getState().setWorkingDirectory(WINDOWS_PATH)
+ useCodexStore.getState().beginSend()
+ })
+ await show()
+ const lock = screen.getByTestId('codex-workdir-lock')
+ expect(lock.textContent).toContain('Wait for it to finish or press Stop')
+ })
+
+ it('and shows no lock line while nothing holds the folder (negative control)', async () => {
+ act(() => useCodexStore.getState().setWorkingDirectory(WINDOWS_PATH))
+ await show()
+ expect(screen.queryByTestId('codex-workdir-lock')).toBeNull()
+ })
+
it('and lets go again once the run is no longer alive', async () => {
// Ein Faden bleibt auf 'running' stehen, bis der Lauf sich abgewickelt
// hat. Haengt der Schwanz des Laufs, sperrte er diesen Knopf bis zum