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: 3 E2E bugs — null crash on fresh install, light theme contrast, broken download URL

PurpleDoubleDab9503f6592c
diff --git a/CLAUDE.md b/CLAUDE.md
index c931c807..7e9b6b7c 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -69,6 +69,10 @@ src-tauri/src/commands/ — Rust commands: install, process, download, prox
37. **Think-Mode guard for non-thinking models** — isThinkingCompatible() in model-compatibility.ts checks if model supports Ollama's `think` parameter. ChatView shows amber hint toast instead of crashing with HTTP 400. useChat.ts double-guards by not sending `think=true` to incompatible models. Supports: QwQ, DeepSeek-R1, Qwen3/3.5, Qwen3-Coder, Gemma3/4. Cloud providers always pass through.
+38. **Chat homepage null crash fix** — getProviderIdFromModel(), isThinkingCompatible(), isAgentCompatible() all crashed with "Cannot read properties of null (reading 'split')" when activeModel was null after fresh install. Added null guards to all three functions.
+39. **Light Theme contrast fix** — ModelCard model names were invisible in light mode (text-gray-200 on white). Fixed: dark:text-gray-200 text-gray-800. Also fixed ModelManager buttons and ModelCard hover/active states for light theme.
+40. **Gemma 4 31B Heretic download URL fix** — llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF repo was deleted (404). Replaced with Stabhappy/gemma-4-31B-it-heretic-Gguf. All 105 download URLs verified HTTP 200/302.
+
### What's LEFT to finish v2.3.0:
1. **Tauri proxy_localhost investigation** — reqwest in Tauri subprocess can't reach localhost. Direct fetch workaround in place but root cause unknown. Low priority since workaround works. Deferred to next release.
2. **LTX VAEDecode reference** — dynamic-workflow.ts line 263: vaeSourceId incorrectly points to UNETLoader output for LTX strategy. Fix when LTX model is installed for testing.
diff --git a/src/api/discover.ts b/src/api/discover.ts
index f5b4b759..905475e1 100644
--- a/src/api/discover.ts
+++ b/src/api/discover.ts
@@ -355,7 +355,7 @@ export function getUncensoredTextModels(): DiscoverModel[] {
// ── HOT: Gemma 4 Uncensored Variants ──
{ name: 'Gemma 4 31B Uncensored', description: 'Gemma 4 31B uncensored — frontier dense model, native tool calling + vision. 256K context.', pulls: '400+', tags: ['31B', 'Q4_K_M', '17 GB'], updated: 'Hot', hot: true, agent: true, released: '2026-04', downloadUrl: HF('TrevorJS/gemma-4-31B-it-uncensored-GGUF', 'gemma-4-31B-it-uncensored-Q4_K_M.gguf'), filename: 'gemma-4-31B-it-uncensored-Q4_K_M.gguf', sizeGB: 17 },
{ name: 'Gemma 4 26B MoE Heretic', description: 'Gemma 4 26B MoE HERETIC — 26B brain, 4B active. Uncensored + tools + vision.', pulls: '43K+', tags: ['26B MoE', 'Q4_K_M', '16 GB'], updated: 'Hot', hot: true, agent: true, released: '2026-04', downloadUrl: HF('nohurry/gemma-4-26B-A4B-it-heretic-GUFF', 'gemma-4-26b-a4b-it-heretic.q4_k_m.gguf'), filename: 'gemma-4-26b-a4b-it-heretic.q4_k_m.gguf', sizeGB: 16 },
- { name: 'Gemma 4 31B Heretic', description: 'Gemma 4 31B HERETIC — full uncensor, native tool calling, 256K context.', pulls: '32K+', tags: ['31B', 'Q4_K_M', '17 GB'], updated: 'Hot', hot: true, agent: true, released: '2026-04', downloadUrl: HF('llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF', 'gemma-4-31B-it-uncensored-heretic-Q4_K_M.gguf'), filename: 'gemma-4-31B-it-uncensored-heretic-Q4_K_M.gguf', sizeGB: 17 },
+ { name: 'Gemma 4 31B Heretic', description: 'Gemma 4 31B HERETIC — full uncensor, native tool calling, 256K context.', pulls: '32K+', tags: ['31B', 'Q4_K_M', '17 GB'], updated: 'Hot', hot: true, agent: true, released: '2026-04', downloadUrl: HF('Stabhappy/gemma-4-31B-it-heretic-Gguf', 'coder3101_gemma_4_31b_it_heretic-Q4_K_M.gguf'), filename: 'coder3101_gemma_4_31b_it_heretic-Q4_K_M.gguf', sizeGB: 17 },
{ name: 'Gemma 4 31B Abliterated', description: 'Gemma 4 31B abliterated — strong reasoning, Apache 2.0.', pulls: '7K+', tags: ['31B', 'Q4_K_M', '17 GB'], updated: 'New', hot: true, agent: true, released: '2026-04', downloadUrl: HF('LiconStudio/Gemma-4-31B-it-abliterated-GGUF', 'gemma-4-31B-it-abliterated-Q4_K_M.gguf'), filename: 'gemma-4-31B-it-abliterated-Q4_K_M.gguf', sizeGB: 17 },
// ── Popular: Qwen3 Abliterated ──
{ name: 'Qwen3 8B Abliterated', description: 'Qwen3 abliterated — best overall. Exceptional reasoning, coding, multilingual.', pulls: '30K+', tags: ['8B', 'Q4_K_M', '5 GB'], updated: 'Popular', released: '2025-05', downloadUrl: HF('mradermacher/Qwen3-8B-abliterated-GGUF', 'Qwen3-8B-abliterated.Q4_K_M.gguf'), filename: 'Qwen3-8B-abliterated.Q4_K_M.gguf', sizeGB: 5 },
diff --git a/src/api/providers/registry.ts b/src/api/providers/registry.ts
index f42b198d..1cc5177b 100644
--- a/src/api/providers/registry.ts
+++ b/src/api/providers/registry.ts
@@ -100,6 +100,7 @@ export function getEnabledProviders(): ProviderClient[] {
* Returns 'ollama' if no prefix.
*/
export function getProviderIdFromModel(modelName: string): ProviderId {
+ if (!modelName) return 'ollama'
const parts = modelName.split('::')
return parts.length === 2 ? parts[0] as ProviderId : 'ollama'
}
diff --git a/src/components/models/ModelCard.tsx b/src/components/models/ModelCard.tsx
index 2da3419d..beb44a69 100644
--- a/src/components/models/ModelCard.tsx
+++ b/src/components/models/ModelCard.tsx
@@ -27,8 +27,8 @@ export function ModelCard({ model, isActive, onSelect, onDelete, onInfo, canDele
onClick={onSelect}
className={`flex items-center gap-3 px-3 py-2 rounded-lg cursor-pointer transition-all group ${
isActive
- ? 'bg-white/[0.04] border-l-2 border-l-blue-400'
- : 'hover:bg-white/[0.02] border-l-2 border-l-transparent'
+ ? 'bg-blue-50 dark:bg-white/[0.04] border-l-2 border-l-blue-400'
+ : 'hover:bg-gray-50 dark:hover:bg-white/[0.02] border-l-2 border-l-transparent'
}`}
>
{/* Type icon */}
@@ -37,7 +37,7 @@ export function ModelCard({ model, isActive, onSelect, onDelete, onInfo, canDele
{/* Name + details */}
<div className="flex-1 min-w-0">
<div className="flex items-center gap-2">
- <span className="text-[0.72rem] text-gray-200 font-medium truncate">{model.name}</span>
+ <span className="text-[0.72rem] text-gray-800 dark:text-gray-200 font-medium truncate">{model.name}</span>
{isActive && <span className="text-[0.5rem] text-blue-400 font-medium uppercase">Active</span>}
</div>
<div className="flex items-center gap-2 text-[0.6rem] text-gray-500">
@@ -66,7 +66,7 @@ export function ModelCard({ model, isActive, onSelect, onDelete, onInfo, canDele
<div className="flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0">
<button
onClick={(e) => { e.stopPropagation(); onInfo() }}
- className="p-1 rounded hover:bg-white/10 text-gray-500 hover:text-gray-300 transition-colors"
+ className="p-1 rounded hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 transition-colors"
title="Details"
>
<Info size={12} />
diff --git a/src/components/models/ModelManager.tsx b/src/components/models/ModelManager.tsx
index 58449365..1f454339 100644
--- a/src/components/models/ModelManager.tsx
+++ b/src/components/models/ModelManager.tsx
@@ -93,13 +93,13 @@ export function ModelManager() {
<h1 className="text-[0.8rem] font-semibold text-gray-800 dark:text-gray-200">Model Manager</h1>
</div>
<div className="flex items-center gap-1.5">
- <button onClick={fetchModels} className="p-1.5 rounded-lg hover:bg-white/10 text-gray-500 hover:text-white transition-colors">
+ <button onClick={fetchModels} className="p-1.5 rounded-lg hover:bg-gray-100 dark:hover:bg-white/10 text-gray-500 hover:text-gray-900 dark:hover:text-white transition-colors">
<RefreshCw size={13} />
</button>
{ollamaEnabled && (
<button
onClick={() => setPullOpen(true)}
- className="flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-white/5 border border-white/10 text-[0.65rem] text-gray-300 hover:bg-white/10 transition-colors"
+ className="flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-gray-100 dark:bg-white/5 border border-gray-200 dark:border-white/10 text-[0.65rem] text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-white/10 transition-colors"
>
<Download size={12} /> Pull Model
</button>
diff --git a/src/lib/model-compatibility.ts b/src/lib/model-compatibility.ts
index 99582a2a..fccd2354 100644
--- a/src/lib/model-compatibility.ts
+++ b/src/lib/model-compatibility.ts
@@ -27,7 +27,8 @@ const AGENT_COMPATIBLE = [
* Check if a model supports Agent Mode.
* Cloud providers always support tools. Ollama needs explicit check.
*/
-export function isAgentCompatible(modelName: string): boolean {
+export function isAgentCompatible(modelName: string | null): boolean {
+ if (!modelName) return false
const providerId = getProviderIdFromModel(modelName)
// Cloud providers always support tool calling
@@ -68,7 +69,8 @@ const THINKING_COMPATIBLE = [
* Check if a model supports thinking/chain-of-thought mode.
* Cloud providers handle it gracefully. Ollama needs explicit support.
*/
-export function isThinkingCompatible(modelName: string): boolean {
+export function isThinkingCompatible(modelName: string | null): boolean {
+ if (!modelName) return false
const providerId = getProviderIdFromModel(modelName)
if (providerId === 'openai' || providerId === 'anthropic') return true