The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(i18n): add Indonesian translations
Steven Enamakel1545afd5232a
diff --git a/app/src/components/assistant-ui/elements/todo-list.test.tsx b/app/src/components/assistant-ui/elements/todo-list.test.tsxnew file mode 100644index 0000000000..9d23fc2046--- /dev/null+++ b/app/src/components/assistant-ui/elements/todo-list.test.tsx@@ -0,0 +1,85 @@+import { fireEvent, render, screen } from '@testing-library/react';+import { describe, expect, it, vi } from 'vitest';++import { type TodoItem, todoProgress, TodoProgressCard, TodoReceipt } from './todo-list';++const items: TodoItem[] = [+ { id: '1', text: 'Read the spec', status: 'done' },+ { id: '2', text: 'Write the code', status: 'active' },+ { id: '3', text: 'Ship it', status: 'pending' },+];++describe('todoProgress', () => {+ it('names the first active step and its position', () => {+ const progress = todoProgress(items);+ expect(progress).toMatchObject({ done: 1, total: 3, position: 2, anyActive: true });+ expect(progress.current?.text).toBe('Write the code');+ });++ it('falls back to the first pending step, then the last done one', () => {+ const pending = todoProgress([+ { id: '1', text: 'A', status: 'done' },+ { id: '2', text: 'B', status: 'pending' },+ ]);+ expect(pending.current?.text).toBe('B');+ const finished = todoProgress([+ { id: '1', text: 'A', status: 'done' },+ { id: '2', text: 'B', status: 'done' },+ ]);+ expect(finished).toMatchObject({ allDone: true, position: 2 });+ expect(finished.current?.text).toBe('B');+ });++ it('handles an empty list', () => {+ expect(todoProgress([])).toMatchObject({ total: 0, position: 0, allDone: false });+ });+});++describe('TodoProgressCard', () => {+ const labels = { title: 'Todos', completedLabel: 'Completed', countLabel: '1 of 3' };++ it('collapsed shows the current step and pos/total, not the list', () => {+ render(<TodoProgressCard items={items} open={false} onOpenChange={vi.fn()} {...labels} />);+ const toggle = screen.getByRole('button', { name: 'Todos' });+ expect(toggle).toHaveAttribute('aria-expanded', 'false');+ expect(toggle).toHaveTextContent('Write the code');+ expect(screen.getByTestId('todo-progress-count')).toHaveTextContent('2/3');+ expect(screen.queryByText('Ship it')).toBeNull();+ });++ it('expanded shows the count label and every step', () => {+ const onOpenChange = vi.fn();+ render(<TodoProgressCard items={items} open onOpenChange={onOpenChange} {...labels} />);+ expect(screen.getByTestId('todo-progress-count')).toHaveTextContent('1 of 3');+ expect(screen.getByText('Ship it')).toBeInTheDocument();+ fireEvent.click(screen.getByRole('button', { name: 'Todos' }));+ expect(onOpenChange).toHaveBeenCalledWith(false);+ });++ it('says completed once every step is done', () => {+ render(+ <TodoProgressCard+ items={items.map(item => ({ ...item, status: 'done' as const }))}+ open={false}+ onOpenChange={vi.fn()}+ {...labels}+ />+ );+ expect(screen.getByTestId('todo-progress-count')).toHaveTextContent('Completed');+ });+});++describe('TodoReceipt', () => {+ it('is one line that expands to the snapshot', () => {+ const onOpenChange = vi.fn();+ const { rerender } = render(+ <TodoReceipt items={items} label="Progress 1/3" open={false} onOpenChange={onOpenChange} />+ );+ expect(screen.getByRole('button')).toHaveTextContent('Progress 1/3 · Write the code');+ expect(screen.queryByText('Ship it')).toBeNull();+ fireEvent.click(screen.getByRole('button'));+ expect(onOpenChange).toHaveBeenCalledWith(true);+ rerender(<TodoReceipt items={items} label="Progress 1/3" open onOpenChange={onOpenChange} />);+ expect(screen.getByText('Ship it')).toBeInTheDocument();+ });+});diff --git a/app/src/features/conversations/aui/PinnedTodoCard.test.tsx b/app/src/features/conversations/aui/PinnedTodoCard.test.tsxnew file mode 100644index 0000000000..7a6afb69a0--- /dev/null+++ b/app/src/features/conversations/aui/PinnedTodoCard.test.tsx@@ -0,0 +1,63 @@+import { act, fireEvent, render, screen, waitFor } from '@testing-library/react';+import { beforeEach, describe, expect, it, vi } from 'vitest';++import type { TodoItem } from '../../../components/assistant-ui/elements/todo-list';+import { PinnedTodoCard, TODO_CARD_OPEN_KEY } from './PinnedTodoCard';++vi.mock('../../../lib/i18n/I18nContext', () => ({ useT: () => ({ t: (key: string) => key }) }));++const store = vi.hoisted(() => new Map<string, string>());+vi.mock('../../../store/userScopedStorage', () => ({+ userScopedStorage: {+ getItem: async (key: string) => store.get(key) ?? null,+ setItem: async (key: string, value: string) => {+ store.set(key, value);+ },+ },+}));++const active: TodoItem[] = [+ { id: '1', text: 'Step one', status: 'done' },+ { id: '2', text: 'Step two', status: 'active' },+];+const idle: TodoItem[] = [+ { id: '1', text: 'Step one', status: 'done' },+ { id: '2', text: 'Step two', status: 'pending' },+];++function toggle() {+ return screen.getByRole('button', { name: 'conversations.todos.title' });+}++describe('PinnedTodoCard', () => {+ beforeEach(() => store.clear());++ it('opens while a step is active and stays collapsed otherwise', async () => {+ const { rerender } = render(<PinnedTodoCard threadId="t1" items={active} />);+ await waitFor(() => expect(toggle()).toHaveAttribute('aria-expanded', 'true'));+ rerender(<PinnedTodoCard threadId="t1" items={idle} />);+ expect(toggle()).toHaveAttribute('aria-expanded', 'false');+ });++ it('remembers a manual choice per thread', async () => {+ const { unmount } = render(<PinnedTodoCard threadId="t1" items={active} />);+ await act(async () => {});+ fireEvent.click(toggle());+ expect(toggle()).toHaveAttribute('aria-expanded', 'false');+ await waitFor(() =>+ expect(JSON.parse(store.get(TODO_CARD_OPEN_KEY) ?? '{}')).toEqual({ t1: false })+ );+ unmount();++ // The remembered choice wins over the active-step default on remount.+ render(<PinnedTodoCard threadId="t1" items={active} />);+ await waitFor(() => expect(toggle()).toHaveAttribute('aria-expanded', 'false'));+ });++ it("does not carry one thread's choice to another", async () => {+ store.set(TODO_CARD_OPEN_KEY, JSON.stringify({ t1: false }));+ render(<PinnedTodoCard threadId="t2" items={active} />);+ await act(async () => {});+ expect(toggle()).toHaveAttribute('aria-expanded', 'true');+ });+});diff --git a/app/src/features/conversations/aui/useSubagentElapsed.test.ts b/app/src/features/conversations/aui/useSubagentElapsed.test.tsnew file mode 100644index 0000000000..82d2b8980a--- /dev/null+++ b/app/src/features/conversations/aui/useSubagentElapsed.test.ts@@ -0,0 +1,39 @@+import { act, renderHook } from '@testing-library/react';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';++import { resetSubagentElapsedAnchors, useSubagentElapsed } from './useSubagentElapsed';++describe('useSubagentElapsed', () => {+ beforeEach(() => {+ vi.useFakeTimers();+ vi.setSystemTime(new Date(2026, 9, 7, 12, 0, 0));+ resetSubagentElapsedAnchors();+ });+ afterEach(() => vi.useRealTimers());++ it('ticks every second while running and keeps its anchor across remounts', () => {+ const first = renderHook(() => useSubagentElapsed('sub-1', true, undefined));+ expect(first.result.current).toBe(0);+ act(() => {+ vi.advanceTimersByTime(3000);+ });+ expect(first.result.current).toBe(3000);+ first.unmount();++ act(() => {+ vi.advanceTimersByTime(2000);+ });+ const second = renderHook(() => useSubagentElapsed('sub-1', true, undefined));+ expect(second.result.current).toBe(5000);+ });++ it('reports the settled duration once finished', () => {+ const { result } = renderHook(() => useSubagentElapsed('sub-2', false, 64_000));+ expect(result.current).toBe(64_000);+ });++ it('is unknown while running without a task id', () => {+ const { result } = renderHook(() => useSubagentElapsed(undefined, true, undefined));+ expect(result.current).toBeUndefined();+ });+});diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.tsindex ffaf1ccd07..1d4c21ad85 100644--- a/app/src/lib/i18n/id.ts+++ b/app/src/lib/i18n/id.ts@@ -1541,6 +1541,21 @@ const messages: TranslationMap = {'chat.failedToLoadMessages': 'Gagal memuat pesan','chat.thinkingIteration': 'Berpikir... ({n})','chat.thinkingDots': 'Berpikir...',+ 'chat.status.thinkingElapsed': 'Berpikir · {elapsed}',+ 'chat.status.waitingApproval': 'Menunggu persetujuan Anda',+ 'chat.status.waitingReview': 'Menunggu tinjauan Anda',+ 'chat.status.waitingAnswer': 'Menunggu jawaban Anda',+ 'chat.status.waitingOnSubagent': 'Menunggu {name}',+ 'chat.status.waitingOnSubagents': 'Menunggu {count} subagen',+ 'chat.status.quietFor': 'Diam selama {duration}.',+ 'chat.status.stop': 'Hentikan',+ 'chat.tools.callOne': '{count} panggilan alat',+ 'chat.tools.callOther': '{count} panggilan alat',+ 'chat.tools.reasoningWithCalls': 'Penalaran · {calls}',+ 'chat.tools.reasoning': 'Penalaran',+ 'chat.tools.activity': 'Aktivitas',+ 'chat.tools.workedFor': 'Bekerja selama {duration} · {calls}',+ 'chat.elicitation.declineReply': 'Saya memilih tidak menjawab itu. Silakan lanjutkan tanpanya.','chat.upgrade': 'Tingkatkan','chat.weeklyLimitHit': 'Anda telah mencapai batas mingguan.','chat.resets': 'Reset',