Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
style(web-app): keep source ASCII-only
Akarshan Biswas659614e617e8
diff --git a/web-app/src/components/AssistantsMenu.tsx b/web-app/src/components/AssistantsMenu.tsxindex a05b6e345..71dba4e54 100644--- a/web-app/src/components/AssistantsMenu.tsx+++ b/web-app/src/components/AssistantsMenu.tsx@@ -1,5 +1,6 @@import { DropdownMenuItem } from '@/components/ui/dropdown-menu'import { AssistantAvatar } from '@/components/AssistantAvatar'+import { IconCheck, IconMinus } from '@tabler/icons-react'type AssistantMenuProps = {selectedAssistant: string | undefined@@ -39,7 +40,7 @@ export function AssistantsMenu({>{deletedAssistant.name || 'Unnamed Assistant'} (deleted)</span>- <span className="flex size-4 shrink-0 items-center justify-center text-xs text-muted-foreground">✓</span>+ <span className="flex size-4 shrink-0 items-center justify-center text-xs text-muted-foreground"><IconCheck size={14} aria-hidden /></span></div></DropdownMenuItem>)}@@ -53,10 +54,10 @@ export function AssistantsMenu({}}><div className="flex min-w-0 w-full items-center gap-2 leading-5">- <span className="flex size-4 shrink-0 items-center justify-center leading-none text-muted-foreground">—</span>+ <span className="flex size-4 shrink-0 items-center justify-center leading-none text-muted-foreground"><IconMinus size={14} aria-hidden /></span><span className="min-w-0 flex-1 truncate">None</span><span className="flex size-4 shrink-0 items-center justify-center text-xs text-muted-foreground">- {noSelectedAssistant ? '✓' : null}+ {noSelectedAssistant ? <IconCheck size={14} aria-hidden /> : null}</span></div></DropdownMenuItem>@@ -87,7 +88,7 @@ export function AssistantsMenu({{assistant.name || 'Unnamed Assistant'}</span><span className="flex size-4 shrink-0 items-center justify-center text-xs text-muted-foreground">- {isSelected ? '✓' : null}+ {isSelected ? <IconCheck size={14} aria-hidden /> : null}</span></div></DropdownMenuItem>diff --git a/web-app/src/components/__tests__/AssistantsMenu.test.tsx b/web-app/src/components/__tests__/AssistantsMenu.test.tsxindex 43f5dc385..faf15242d 100644--- a/web-app/src/components/__tests__/AssistantsMenu.test.tsx+++ b/web-app/src/components/__tests__/AssistantsMenu.test.tsx@@ -121,7 +121,7 @@ describe('AssistantsMenu', () => {expect(row).toHaveClass('min-w-0', 'w-full')expect(row.firstElementChild).toHaveClass('size-4', 'shrink-0')expect(row.lastElementChild).toHaveClass('size-4', 'shrink-0')- expect(row.lastElementChild).toHaveTextContent('✓')+ expect(row.lastElementChild?.querySelector('svg.tabler-icon-check')).not.toBeNull()const unselectedRow = screen.getByText('Alice').parentElement!expect(unselectedRow.lastElementChild).toHaveClass('size-4', 'shrink-0')expect(unselectedRow.lastElementChild).toBeEmptyDOMElement()diff --git a/web-app/src/containers/ChatInput.tsx b/web-app/src/containers/ChatInput.tsxindex 3b4a8c521..dbfa1558c 100644--- a/web-app/src/containers/ChatInput.tsx+++ b/web-app/src/containers/ChatInput.tsx@@ -2454,7 +2454,7 @@ const ChatInput = memo(function ChatInput({)}<span>{ingestingDocs- ? 'Indexing documents…'+ ? 'Indexing documents...': 'Add documents or files'}</span></DropdownMenuItem>@@ -2845,7 +2845,7 @@ const ChatInput = memo(function ChatInput({data-testid="stop-message-button"className="shrink-0 rounded-full mr-1"onClick={() => {- // Stopping with messages queued clears the queue —+ // Stopping with messages queued clears the queue -// there is nothing to interrupt yet. The old// `if (!currentThreadId) return` guard made this button// inert for any surface without a thread id.diff --git a/web-app/src/containers/CoworkPage.tsx b/web-app/src/containers/CoworkPage.tsxindex 14aa88b23..cd83af5e2 100644--- a/web-app/src/containers/CoworkPage.tsx+++ b/web-app/src/containers/CoworkPage.tsx@@ -1311,7 +1311,7 @@ export function CoworkPage() {const prompt = usePrompt((s) => s.prompt)const [menuIndex, setMenuIndex] = useState(0)- // Switchable models for /models — mirrors the model picker's filtering+ // Switchable models for /models - mirrors the model picker's filtering// (active providers, no embedding models, remote providers only with a key),// narrowed to tool-capable models since runRequest refuses the rest anyway.const allModels = useMemo(() => {diff --git a/web-app/src/containers/__tests__/ComposerModelPicker.test.tsx b/web-app/src/containers/__tests__/ComposerModelPicker.test.tsxindex ae883997f..0b1615459 100644--- a/web-app/src/containers/__tests__/ComposerModelPicker.test.tsx+++ b/web-app/src/containers/__tests__/ComposerModelPicker.test.tsx@@ -114,7 +114,7 @@ describe('ComposerModelPicker', () => {it('hides effort overrides before narrowing the model label', () => {setup({ id: 'gpt-5.2', settings: { thinking_budget_tokens: { key: 'thinking_budget_tokens', title: '', description: '', controller_type: 'dropdown', controller_props: { value: 'high' } } } })render(<ComposerModelPicker />)- expect(screen.getByText('· High').className).toContain('@max-[520px]/composer:hidden')+ expect(screen.getByText('\u00b7 High').className).toContain('@max-[520px]/composer:hidden')})it('shows selected summary and excludes embedding models', () => {renderPicker(<ComposerModelPicker />)@@ -208,7 +208,7 @@ describe('ComposerModelPicker', () => {it('clears the setting for Default and displays an active override beside the name', () => {setup({ id: 'gpt-5.2', settings: { thinking_budget_tokens: { key: 'thinking_budget_tokens', title: '', description: '', controller_type: 'dropdown', controller_props: { value: 'high' } } } })renderPicker(<ComposerModelPicker />)- expect(screen.getByTestId('model-selector-trigger').textContent).toContain('· High')+ expect(screen.getByTestId('model-selector-trigger').textContent).toContain('\u00b7 High')choose('Reasoning effort', '')expect(mocks.update.mock.calls[0][1].models[0].settings.thinking_budget_tokens).toBeUndefined()})@@ -220,7 +220,7 @@ describe('ComposerModelPicker', () => {} }, 'llamacpp')renderPicker(<ComposerModelPicker />)expect(screen.getByRole('menuitem', { name: 'Reasoning mode' }).textContent).toContain('Off')- expect(screen.getByTestId('model-selector-trigger').textContent).toContain('· Off')+ expect(screen.getByTestId('model-selector-trigger').textContent).toContain('\u00b7 Off')choose('Reasoning mode', value ? value[0].toUpperCase() + value.slice(1) : '')const settings = mocks.update.mock.calls[0][1].models[0].settingsexpect(settings.reasoning?.controller_props.value).toBe(value || undefined)diff --git a/web-app/src/lib/__tests__/coworkPersistence.test.ts b/web-app/src/lib/__tests__/coworkPersistence.test.tsindex 4c00a37dc..2011b60b7 100644--- a/web-app/src/lib/__tests__/coworkPersistence.test.ts+++ b/web-app/src/lib/__tests__/coworkPersistence.test.ts@@ -1016,7 +1016,7 @@ describe('loadCoworkSessions', () => {)const r = await loadCoworkSessions(b.invoke, { migrationSettled: false })// Deletion intent is unreadable, so the blob must not be merged (fail- // closed against resurrection) — but committed threads still load.+ // closed against resurrection) - but committed threads still load.expect(r.sessions.map((s) => s.id)).toEqual(['committed'])expect(r.legacyIds.size).toBe(0)// The unreadable journal itself is never replaced or rewritten by a load.diff --git a/web-app/src/routes/threads/__tests__/$threadId.beforeLoad.test.tsx b/web-app/src/routes/threads/__tests__/$threadId.beforeLoad.test.tsxindex 7aca122b9..5c5c5d440 100644--- a/web-app/src/routes/threads/__tests__/$threadId.beforeLoad.test.tsx+++ b/web-app/src/routes/threads/__tests__/$threadId.beforeLoad.test.tsx@@ -1,8 +1,8 @@/*** Consumption regressions for the /threads/$threadId beforeLoad guard* (integrated persistence review R2/R3). These exercise the REAL Route- * options with the REAL zustand stores — only the component tree around the- * route is mocked — so they fail if the route stops consuming+ * options with the REAL zustand stores - only the component tree around the+ * route is mocked - so they fail if the route stops consuming* shouldRedirectThreadToCowork.*/import { describe, it, expect, beforeEach, vi } from 'vitest'@@ -193,7 +193,7 @@ describe('/threads/$threadId beforeLoad guard (R2/R3 consumption)', () => {// The cowork commit (or a hydration) finishes while the deferred backend// lookup is in flight: the fetch was issued before the write completed, so// the backend snapshot resolves EMPTY. The post-await decision must re-read- // the store — code that only consults `fetched.find(...)` classifies the+ // the store - code that only consults `fetched.find(...)` classifies the// just-committed cowork thread as an ordinary chat and mounts a writable// chat view over it.fetchThreadsMock.mockImplementation(async () => {@@ -209,7 +209,7 @@ describe('/threads/$threadId beforeLoad guard (R2/R3 consumption)', () => {replace: true,})expect(fetchThreadsMock).toHaveBeenCalledTimes(1)- // beforeLoad itself still never writes the fetched list back globally —+ // beforeLoad itself still never writes the fetched list back globally -// only the externally-landed record is present.expect(Object.keys(useThreads.getState().threads)).toEqual(['cw-racing'])})@@ -292,7 +292,7 @@ describe('/threads/$threadId beforeLoad guard (R2/R3 consumption)', () => {it('an id unknown to a HEALTHY (non-empty) backend keeps the existing unknown-thread behavior', async () => {// fetchThreads resolves the non-empty default list without the id: not- // found anywhere → no redirect, same as the pre-existing unknown-id path.+ // found anywhere -> no redirect, same as the pre-existing unknown-id path.expect(await runBeforeLoad('nowhere-id')).toBeNull()expect(fetchThreadsMock).toHaveBeenCalledTimes(1)})@@ -323,7 +323,7 @@ describe('/threads/$threadId beforeLoad guard (R2/R3 consumption)', () => {expect(fetchThreadsMock).toHaveBeenCalledTimes(2)})- it('an all-empty window fails closed with the typed error — no writable chat, no silent unknown', async () => {+ it('an all-empty window fails closed with the typed error - no writable chat, no silent unknown', async () => {fetchThreadsMock.mockImplementation(() => Promise.resolve([]))vi.useFakeTimers()try {