Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
stack Local LLM model rows on mobile so long model ids are readable
[._.]/ Adam Eivydb5ded72184c
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 1cdeb00326..c9e969fcec 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -10,6 +10,10 @@- **[issue-3090] Provider quota can now be spent deliberately before a reset.** Configure a prompt, reserve, reset window, and dispatch cap for each CLI provider family; the opt-in scheduler checks usage without consuming tokens and only runs the selected provider when safe, known quota remains.+## Local LLMs++- Installed and catalog model names are now readable on a phone. Long ids like `hf.co/org/Some-Long-Model-Name-GGUF:Q6_K` used to be clipped to `hf.co/sja…` because the Chat/Delete buttons and the size column held their width; each row now stacks on narrow screens so the full name and its details wrap across the width, with the actions on their own line underneath. Desktop layout is unchanged.+## Navigation- Third-level Create navigation for Series and Universes can now be collapsed and expanded independently.diff --git a/client/src/components/settings/LocalLlmTab.jsx b/client/src/components/settings/LocalLlmTab.jsxindex 05853b999c..83cfef5064 100644--- a/client/src/components/settings/LocalLlmTab.jsx+++ b/client/src/components/settings/LocalLlmTab.jsx@@ -850,9 +850,9 @@ export function LocalLlmTab() {const createdMs = new Date(m.createdAt).getTime();const updatedMs = new Date(m.updatedAt).getTime();return (- <div key={m.key || m.id} className="flex items-start gap-3 bg-port-bg border border-port-border rounded-lg p-3">+ <div key={m.key || m.id} className="flex flex-col sm:flex-row sm:items-start gap-2 sm:gap-3 bg-port-bg border border-port-border rounded-lg p-3"><div className="flex-1 min-w-0">- <div className="text-sm text-white truncate">+ <div className="text-sm text-white break-words">{m.name} <span className="text-xs text-gray-500">· {m.params}</span>{FORMAT_META[m.format] && (<span@@ -871,7 +871,7 @@ export function LocalLlmTab() {</span>)}</div>- <div className="text-xs text-gray-500 truncate">{chosenId}</div>+ <div className="text-xs text-gray-500 break-all">{chosenId}</div><div className="text-xs text-gray-500 mt-0.5">{m.description}</div>{m.note && <div className="text-[11px] text-port-warning/90 mt-0.5">{m.note}</div>}{hasVariantPicker && (@@ -922,7 +922,10 @@ export function LocalLlmTab() {<CapabilityBadges capabilities={m.capabilities} /></div></div>- <div className="flex flex-col items-end gap-1 shrink-0">+ {/* Mobile: actions sit on their own row under the details so+ the name/id column isn't squeezed into a narrow column.+ Desktop keeps them stacked at the card's right edge. */}+ <div className="flex flex-row sm:flex-col items-center sm:items-end gap-2 sm:gap-1 shrink-0 justify-end flex-wrap">{chosenInstalled ? (<span className="text-xs px-2 py-1 text-port-success">Installed</span>) : m.installable === false ? (@@ -993,56 +996,69 @@ export function LocalLlmTab() {{installedModels.length === 0 ? (<p className="text-xs text-gray-500">No models installed yet.</p>) : installedModels.map((m) => (- <div key={m.id} className="flex items-center gap-3 bg-port-bg border border-port-border rounded-lg p-3">- <label className="shrink-0 flex items-center" title={`Include ${m.name || m.id} in a comparison`}>- <input- type="checkbox"- checked={compareTargetKeys.has(localLlmTargetKey({ backend: selected, modelId: m.id }))}- onChange={() => toggleCompareTarget(selected, m.id)}- className="h-4 w-4 accent-port-accent"- aria-label={`Select ${m.name || m.id} for comparison`}- />- </label>- <div className="flex-1 min-w-0">- <div className="text-sm text-white truncate">{m.name}</div>- <div className="text-xs text-gray-500 truncate">- {[m.params, m.quantization, m.family, formatContextLength(m.contextLength)].filter(Boolean).join(' · ')}- </div>- {(m.capabilities || []).length > 0 && (- <div className="flex items-center gap-1 flex-wrap mt-1">- <CapabilityBadges capabilities={m.capabilities} />+ // Mobile: identity stacks above the action row so the (often very+ // long) `hf.co/…` model id gets the full row width and wraps instead+ // of being ellipsised down to "hf.co/sja…". Desktop keeps the single+ // line with actions trailing on the right.+ <div key={m.id} className="flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3 bg-port-bg border border-port-border rounded-lg p-3">+ <div className="flex items-start gap-3 min-w-0 flex-1">+ <label className="shrink-0 flex items-center pt-0.5" title={`Include ${m.name || m.id} in a comparison`}>+ <input+ type="checkbox"+ checked={compareTargetKeys.has(localLlmTargetKey({ backend: selected, modelId: m.id }))}+ onChange={() => toggleCompareTarget(selected, m.id)}+ className="h-4 w-4 accent-port-accent"+ aria-label={`Select ${m.name || m.id} for comparison`}+ />+ </label>+ <div className="min-w-0 flex-1">+ <div className="text-sm text-white break-all">{m.name}</div>+ <div className="text-xs text-gray-500 break-words">+ {[+ m.params,+ m.quantization,+ m.family,+ formatContextLength(m.contextLength),+ m.size != null ? formatBytes(m.size) : null+ ].filter(Boolean).join(' · ')}</div>- )}+ {(m.capabilities || []).length > 0 && (+ <div className="flex items-center gap-1 flex-wrap mt-1">+ <CapabilityBadges capabilities={m.capabilities} />+ </div>+ )}+ </div></div>- {m.size != null && <span className="text-xs text-gray-400 shrink-0">{formatBytes(m.size)}</span>}- <Link- to={`/local-llm/playground?backend=${encodeURIComponent(selected)}&model=${encodeURIComponent(m.id)}`}- className="px-2.5 py-1 text-xs bg-port-accent-2/15 hover:bg-port-accent-2/25 text-port-accent-2 rounded flex items-center gap-1 shrink-0 no-underline"- title={`Chat with ${m.name || m.id}`}- >- <FlaskConical size={12} />- Chat- </Link>- {isConfirmingDelete(m.id) ? (- <ConfirmButtonPair- prompt="Delete?"- confirmIcon={Trash2}- busy={busy}- className="shrink-0"- onConfirm={() => confirmDelete(() => remove(m.id))}- onCancel={cancelDelete}- />- ) : (- <button- onClick={() => requestDelete(m.id)}- disabled={busy}- className="px-2.5 py-1 text-xs bg-port-error/20 hover:bg-port-error/40 text-port-error rounded disabled:opacity-50 flex items-center gap-1 shrink-0"- aria-label={`Delete ${m.name}`}+ <div className="flex items-center gap-2 shrink-0 justify-end flex-wrap">+ <Link+ to={`/local-llm/playground?backend=${encodeURIComponent(selected)}&model=${encodeURIComponent(m.id)}`}+ className="px-2.5 py-1 text-xs bg-port-accent-2/15 hover:bg-port-accent-2/25 text-port-accent-2 rounded flex items-center gap-1 shrink-0 no-underline"+ title={`Chat with ${m.name || m.id}`}>- {actionInProgress === `delete-${m.id}` ? <BrailleSpinner /> : <Trash2 size={12} />}- Delete- </button>- )}+ <FlaskConical size={12} />+ Chat+ </Link>+ {isConfirmingDelete(m.id) ? (+ <ConfirmButtonPair+ prompt="Delete?"+ confirmIcon={Trash2}+ busy={busy}+ className="shrink-0"+ onConfirm={() => confirmDelete(() => remove(m.id))}+ onCancel={cancelDelete}+ />+ ) : (+ <button+ onClick={() => requestDelete(m.id)}+ disabled={busy}+ className="px-2.5 py-1 text-xs bg-port-error/20 hover:bg-port-error/40 text-port-error rounded disabled:opacity-50 flex items-center gap-1 shrink-0"+ aria-label={`Delete ${m.name}`}+ >+ {actionInProgress === `delete-${m.id}` ? <BrailleSpinner /> : <Trash2 size={12} />}+ Delete+ </button>+ )}+ </div></div>))}</div>diff --git a/client/src/components/settings/LocalLlmTab.test.jsx b/client/src/components/settings/LocalLlmTab.test.jsxnew file mode 100644index 0000000000..eb4ef77226--- /dev/null+++ b/client/src/components/settings/LocalLlmTab.test.jsx@@ -0,0 +1,89 @@+import { describe, it, expect, vi, beforeEach } from 'vitest';+import { render, screen, waitFor } from '@testing-library/react';+import { MemoryRouter } from 'react-router-dom';++vi.mock('../../services/api', () => ({+ getLocalLlmStatus: vi.fn(),+ getLocalLlmCatalog: vi.fn(),+ getLocalLlmHuggingFaceSearch: vi.fn(),+ installLocalLlmModel: vi.fn(),+ deleteLocalLlmModel: vi.fn(),+ switchLocalLlmBackend: vi.fn(),+ migrateLocalLlmBackend: vi.fn(),+ installLocalLlmBackend: vi.fn(),+ upgradeLocalLlmBackend: vi.fn(),+ controlOllamaService: vi.fn(),+ installAudioModel: vi.fn(),+}));+vi.mock('../../services/socket', () => ({+ default: { on: vi.fn(), off: vi.fn() },+}));+// The memory panel owns its own 5s poll + voice/TTS endpoints — irrelevant here.+vi.mock('./MemoryManagement.jsx', () => ({ default: () => <div data-testid="memory-management" /> }));+vi.mock('../ui/Toast', () => ({+ default: Object.assign(vi.fn(), { success: vi.fn(), error: vi.fn(), warning: vi.fn(), info: vi.fn() }),+}));++import { getLocalLlmStatus, getLocalLlmCatalog } from '../../services/api';+import { LocalLlmTab } from './LocalLlmTab';++// A realistically long HF model id — the shape that got ellipsised to+// "hf.co/sja…" on a phone before the row was allowed to wrap.+const LONG_ID = 'hf.co/example-org/Example-Long-Model-Name-34B-Instruct-GGUF:Q6_K';++const renderTab = async () => {+ render(+ <MemoryRouter>+ <LocalLlmTab />+ </MemoryRouter>,+ );+ await waitFor(() => expect(screen.getByText(/Installed on Ollama/)).toBeTruthy());+};++beforeEach(() => {+ vi.clearAllMocks();+ getLocalLlmStatus.mockResolvedValue({+ backend: 'ollama',+ ollama: {+ installed: true,+ available: true,+ modelCount: 1,+ models: [{+ id: LONG_ID,+ name: LONG_ID,+ params: '34.7B',+ quantization: 'Q6_K',+ family: 'qwen2',+ size: 30_500_000_000,+ capabilities: ['tools', 'reasoning'],+ }],+ },+ lmstudio: { installed: false, available: false, modelCount: 0, models: [] },+ });+ getLocalLlmCatalog.mockResolvedValue({ models: [] });+});++describe('LocalLlmTab installed models', () => {+ it('lets a long model id wrap instead of truncating it', async () => {+ await renderTab();+ const name = screen.getByText(LONG_ID);+ expect(name.className).toMatch(/\bbreak-all\b/);+ expect(name.className).not.toMatch(/\btruncate\b/);+ });++ it('stacks the row on mobile and keeps it inline from sm up', async () => {+ await renderTab();+ // The row is the flex container holding the name; on mobile it stacks so the+ // id gets the full width, and the action row drops beneath it.+ const row = screen.getByText(LONG_ID).closest('.rounded-lg');+ expect(row.className).toMatch(/\bflex-col\b/);+ expect(row.className).toMatch(/\bsm:flex-row\b/);+ });++ it('folds the model size into the wrapping metadata line', async () => {+ await renderTab();+ // Size used to be its own fixed-width column competing with the name; it now+ // rides along with params/quant/family so nothing is squeezed out.+ expect(screen.getByText(/^34\.7B · Q6_K · qwen2 · [\d.]+ GB$/)).toBeTruthy();+ });+});