Skip to content

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

fix: show full Claude model version (sonnet-5-5) on agent cards instead of truncating to sonnet-5

Adam Eivyc8f4cf7ee48a
diff --git a/client/src/components/cos/TaskAddFormView.jsx b/client/src/components/cos/TaskAddFormView.jsx
index 62637a6879..1375f16d8c 100644
--- a/client/src/components/cos/TaskAddFormView.jsx
+++ b/client/src/components/cos/TaskAddFormView.jsx
@@ -6,7 +6,7 @@ import FilePickerButton from '../ui/FilePickerButton';
import ReviewerPicker from './ReviewerPicker';
import InstancePicker from './InstancePicker';
import { ATTACHMENT_ACCEPT } from '../../utils/fileUpload';
-import { formatBytes } from '../../utils/formatters';
+import { formatBytes, shortClaudeModelName } from '../../utils/formatters';
import {
effortAwareModelOptions,
generationControlsFor,
@@ -283,7 +283,7 @@ function TaskTypeFields({ form, compact, queueFirst }) {
className="px-2 py-1.5 bg-port-bg border border-port-border rounded text-white text-xs disabled:opacity-50"
>
{models.length !== 1 && <option value="">Default Model</option>}
- {models.map((model) => <option key={model} value={model}>{model.replace('claude-', '').replace(/-\d+$/, '')}</option>)}
+ {models.map((model) => <option key={model} value={model}>{shortClaudeModelName(model)}</option>)}
</select>
<select
aria-label={`${label} effort`}
diff --git a/client/src/components/cos/tabs/AgentCard.jsx b/client/src/components/cos/tabs/AgentCard.jsx
index 395de0a7b4..379a12f064 100644
--- a/client/src/components/cos/tabs/AgentCard.jsx
+++ b/client/src/components/cos/tabs/AgentCard.jsx
@@ -34,7 +34,7 @@ import { estimateCosDuration } from '../../../lib/cosDurationEstimate';
import { isAgentFeedbackUpdateTarget, isSystemAgent as isSystemAgentRecord } from '../../../lib/cosAgentFeedback';
import AgentResultLine from '../AgentResultLine';
import { DEFAULT_REVIEWER, normalizeReviewers } from '../constants';
-import { formatBytes, formatCount, formatDurationMs, formatDateTime, formatTimeOfDay } from '../../../utils/formatters';
+import { formatBytes, formatCount, formatDurationMs, formatDateTime, formatTimeOfDay, shortClaudeModelName } from '../../../utils/formatters';
import { useSocketResource } from '../../../hooks/useSocketResource';
import ConfirmButtonPair from '../../ui/ConfirmButtonPair';
@@ -786,7 +786,7 @@ export default function AgentCard({ agent, onPause, onKill, onDelete, onResume,
agent.metadata.modelTier === 'light' ? 'bg-green-500/20 text-green-400' :
'bg-blue-500/20 text-blue-400'
}`} title={agent.metadata.modelReason}>
- {agent.metadata.model.replace('claude-', '').replace(/-\d+$/, '')}
+ {shortClaudeModelName(agent.metadata.model)}
</span>
)}
{!inactive && (
diff --git a/client/src/components/cos/tabs/ResumeAgentModal.jsx b/client/src/components/cos/tabs/ResumeAgentModal.jsx
index f3a8c0ddf1..1ce59356d7 100644
--- a/client/src/components/cos/tabs/ResumeAgentModal.jsx
+++ b/client/src/components/cos/tabs/ResumeAgentModal.jsx
@@ -1,4 +1,5 @@
import { useState, useRef } from 'react';
+import { shortClaudeModelName } from '../../../utils/formatters';
import { X, RotateCcw, Image, Loader2 } from 'lucide-react';
import { processScreenshotUploads } from '../../../services/apiMedia';
import toast from '../../ui/Toast';
@@ -258,7 +259,7 @@ export default function ResumeAgentModal({ agent, taskType = 'user', providers,
>
<option value="">{!providersLoaded ? 'Loading providers…' : formData.provider ? 'Select model...' : 'Select provider first'}</option>
{availableModels.map(m => (
- <option key={m} value={m}>{m.replace('claude-', '').replace(/-\d+$/, '')}</option>
+ <option key={m} value={m}>{shortClaudeModelName(m)}</option>
))}
</select>
</FormField>
diff --git a/client/src/components/cos/tabs/TaskItem.jsx b/client/src/components/cos/tabs/TaskItem.jsx
index 458cb17aca..067db61f24 100644
--- a/client/src/components/cos/tabs/TaskItem.jsx
+++ b/client/src/components/cos/tabs/TaskItem.jsx
@@ -25,7 +25,7 @@ import toast from '../../ui/Toast';
import AutoSizeTextarea from '../../ui/AutoSizeTextarea';
import * as api from '../../../services/api';
import { effectiveModelFor, effortAwareModelOptions, effortSurvivingModel, seedModelEffort } from '../../../utils/providers';
-import { formatDurationMin, formatBytes } from '../../../utils/formatters';
+import { formatDurationMin, formatBytes, shortClaudeModelName } from '../../../utils/formatters';
import ConfirmButtonPair from '../../ui/ConfirmButtonPair';
import { useConfirmDelete } from '../../../hooks/useConfirmDelete';
import Modal from '../../ui/Modal';
@@ -551,7 +551,7 @@ export default function TaskItem({ task, agent = null, liveOutput, isSystem, spa
>
<option value="">Auto</option>
{editModels.map(m => (
- <option key={m} value={m}>{m.replace('claude-', '').replace(/-\d+$/, '')}</option>
+ <option key={m} value={m}>{shortClaudeModelName(m)}</option>
))}
</select>
)}
diff --git a/client/src/components/settings/OrchestrationTab.jsx b/client/src/components/settings/OrchestrationTab.jsx
index 6bd96983ad..6e4ae7fbac 100644
--- a/client/src/components/settings/OrchestrationTab.jsx
+++ b/client/src/components/settings/OrchestrationTab.jsx
@@ -1,4 +1,5 @@
import { useState, useEffect, useCallback } from 'react';
+import { shortClaudeModelName } from '../../utils/formatters';
import { Plus, Edit2, Trash2, Cpu, Check, X, Shield, Sparkles } from 'lucide-react';
import toast from '../ui/Toast';
import FormField from '../ui/FormField';
@@ -290,7 +291,7 @@ export default function OrchestrationTab() {
>
<option value="">Default (Provider default)</option>
{models.map((m) => (
- <option key={m} value={m}>{m.replace('claude-', '').replace(/-\d+$/, '')}</option>
+ <option key={m} value={m}>{shortClaudeModelName(m)}</option>
))}
</select>
</div>
diff --git a/client/src/hooks/useTaskAddForm.js b/client/src/hooks/useTaskAddForm.js
index 2feb28804b..45a296db6c 100644
--- a/client/src/hooks/useTaskAddForm.js
+++ b/client/src/hooks/useTaskAddForm.js
@@ -1,4 +1,5 @@
import { useEffect, useMemo, useReducer, useRef } from 'react';
+import { shortClaudeModelName } from '../utils/formatters';
import toast from '../components/ui/Toast';
import * as api from '../services/api';
import { processScreenshotUploads, processAttachmentUploads } from '../services/apiMedia';
@@ -434,7 +435,7 @@ export default function useTaskAddForm({
id,
name: unlistedSelection && id === state.newTask.model
? `${id} (${modelSource === MODEL_SOURCE.account ? 'not in account catalog' : 'no longer offered by this provider'})`
- : id.replace('claude-', '').replace(/-\d+$/, ''),
+ : shortClaudeModelName(id),
})), [availableModels, unlistedSelection, modelSource, state.newTask.model]);
const modelSourceNote = (() => {
diff --git a/client/src/utils/README.md b/client/src/utils/README.md
index f5cce14128..1fc1e0d031 100644
--- a/client/src/utils/README.md
+++ b/client/src/utils/README.md
@@ -23,7 +23,7 @@ grep -i "what you want to do" client/src/utils/README.md
| Module | Purpose |
|---|---|
| `trackOptionLabels` | `trackOptionLabels(tracks)` — ID-keyed library option labels with title, artist, duration, creation date, missing-audio status, and stable collision-resolving ID suffixes. Build before filtering selector eligibility. |
-| `formatters` | Date/time/duration/byte formatters (`clamp`, `formatBytes`, `formatDownloadGb` (decimal-GB model download size, "~29 GB"), `formatCompactCount`, `formatCompactCountOrDash` (same, but an ABSENT count renders "—" rather than "0"), `formatCount` (thousands-separated EXACT count, "2,762" — for a total the user is meant to read as a number, where "2.8K" would throw away the precision that is the point of showing it), `timeAgo`, `formatAgeDays` (age in whole DAYS — "412 days ago" — where `timeAgo` would collapse to "1y ago"; model-download lists), `localDateKey` (browser-local `YYYY-MM-DD`), `shiftISODate` (DST-safe calendar-day shifts), `formatTimecode`, `formatDurationMs`, `formatDateShort`, `formatContextTokens` (suffix-less context length, "4K"), `throughputLabel` (a measured model's speed as one label — tok/s where the runtime reported token counts, `~` prefixed when frame-counted, else chars/s; never both), `parseTimeoutMs`, `formatCooldown`, `recommendedRamGb`, `nameFromImageFilename`, `formatUsd` — one USD renderer (`signed` puts the minus outside the `$`; `trimWhole` drops `.00` on a typed round price; thousands are grouped, "$4,610.09") — `formatWeight` / `formatPercent` — round unit-converted floats (`170.35000000000002` → `170.4 lbs`) so raw binary precision never reaches a tile — `middleTruncate` — clip a long string from the MIDDLE so its distinguishing tail survives, where CSS `line-clamp`/`text-overflow` always eats the end — …) plus timeout-input bounds and `getAppName`. Do not re-define formatters inside components. **Never write `new Date(x).toLocaleDateString()` inline** — pick the helper for the shape you want: `formatDateNumeric` ("3/5/2026", compact cells), `formatDateShort` ("Mar 5, 2026"), `formatDate` ("March 5, 2026"), `formatDateFull` ("Saturday, March 5, 2026"), `formatWeekdayDate` ("Monday, Mar 5", `{ weekday, year }`), `formatMonthDay` ("Mar 5"), `formatMonthYear` ("March 2026"), `formatWeekdayShort` ("Mon"), `formatWeekdayTime` ("Mon, 7:00 AM"), `formatTimeOfDay` ("1:30 PM"), `formatTimeOfDaySeconds` ("1:30:45 PM", log/queue rows), `formatClockTime` ("02:30:45 PM"; `{ seconds, hour12, timeZone }`), `formatDateTime`. `formatHourOfDay` renders a bare hour-of-day number (0-23) as a 12-hour label in one of four styles (`long` "3 PM", `compact` "3PM", `tiny` "3p", `lower` "3pm") — the canonical home for what five components each hand-rolled, so the same 3pm no longer renders four ways across screens. Date display helpers anchor a bare `YYYY-MM-DD` at LOCAL midnight (a naive `new Date('2026-03-05')` is UTC midnight and renders as the previous day west of Greenwich) and take a fallback instead of rendering the literal "Invalid Date". |
+| `formatters` | Date/time/duration/byte formatters (`clamp`, `shortClaudeModelName` (Claude model id → display name; strips `claude-` and only an 8-digit date suffix, so `sonnet-5-5` survives), `formatBytes`, `formatDownloadGb` (decimal-GB model download size, "~29 GB"), `formatCompactCount`, `formatCompactCountOrDash` (same, but an ABSENT count renders "—" rather than "0"), `formatCount` (thousands-separated EXACT count, "2,762" — for a total the user is meant to read as a number, where "2.8K" would throw away the precision that is the point of showing it), `timeAgo`, `formatAgeDays` (age in whole DAYS — "412 days ago" — where `timeAgo` would collapse to "1y ago"; model-download lists), `localDateKey` (browser-local `YYYY-MM-DD`), `shiftISODate` (DST-safe calendar-day shifts), `formatTimecode`, `formatDurationMs`, `formatDateShort`, `formatContextTokens` (suffix-less context length, "4K"), `throughputLabel` (a measured model's speed as one label — tok/s where the runtime reported token counts, `~` prefixed when frame-counted, else chars/s; never both), `parseTimeoutMs`, `formatCooldown`, `recommendedRamGb`, `nameFromImageFilename`, `formatUsd` — one USD renderer (`signed` puts the minus outside the `$`; `trimWhole` drops `.00` on a typed round price; thousands are grouped, "$4,610.09") — `formatWeight` / `formatPercent` — round unit-converted floats (`170.35000000000002` → `170.4 lbs`) so raw binary precision never reaches a tile — `middleTruncate` — clip a long string from the MIDDLE so its distinguishing tail survives, where CSS `line-clamp`/`text-overflow` always eats the end — …) plus timeout-input bounds and `getAppName`. Do not re-define formatters inside components. **Never write `new Date(x).toLocaleDateString()` inline** — pick the helper for the shape you want: `formatDateNumeric` ("3/5/2026", compact cells), `formatDateShort` ("Mar 5, 2026"), `formatDate` ("March 5, 2026"), `formatDateFull` ("Saturday, March 5, 2026"), `formatWeekdayDate` ("Monday, Mar 5", `{ weekday, year }`), `formatMonthDay` ("Mar 5"), `formatMonthYear` ("March 2026"), `formatWeekdayShort` ("Mon"), `formatWeekdayTime` ("Mon, 7:00 AM"), `formatTimeOfDay` ("1:30 PM"), `formatTimeOfDaySeconds` ("1:30:45 PM", log/queue rows), `formatClockTime` ("02:30:45 PM"; `{ seconds, hour12, timeZone }`), `formatDateTime`. `formatHourOfDay` renders a bare hour-of-day number (0-23) as a 12-hour label in one of four styles (`long` "3 PM", `compact` "3PM", `tiny` "3p", `lower` "3pm") — the canonical home for what five components each hand-rolled, so the same 3pm no longer renders four ways across screens. Date display helpers anchor a bare `YYYY-MM-DD` at LOCAL midnight (a naive `new Date('2026-03-05')` is UTC midnight and renders as the previous day west of Greenwich) and take a fallback instead of rendering the literal "Invalid Date". |
| `cronHelpers` | Cron preset list, friendly cron parsing/building, anchored recurrence parsing/building/description, `isCronExpression` detection, `describeCron` human-readable rendering, `cronFromIntervalMs` numeric-interval → expression conversion (mirrors the server helper), `summarizeAppSchedules` rendering of the per-app cron cadences a task's global row cannot express, and `JOB_INTERVAL_OPTIONS` / `ON_DEMAND_INTERVAL` — the interval-mode cadences for autonomous jobs, derived from the server's `INTERVAL_OPTIONS` (`on-demand` = stays enabled and manually runnable, but arms no timer). Import it rather than re-declaring the list in a scheduling component. |
| `markdownText` | `markdownToPlainText(md)` — flatten markdown source to one plain-text string for a clamped preview: strips heading/list/blockquote/fence markers, unwraps emphasis, inline code and links, images → `[alt]`, collapses blank-line runs. Use whenever a card previews arbitrary agent-authored markdown — `line-clamp-N` does not clamp a subtree of block elements, and foreign `##` headings would otherwise join the page's heading outline. Underscore emphasis is word-boundary gated and `__…__` needs interior whitespace, so stack frames and user-agent strings (`10_15_7`, `__init__`) are never silently rewritten. `dropsMarkupWhenFlattened(md)` — did the flatten lose actual markup, as opposed to only normalizing whitespace? Gates a "Show more" disclosure so a short-but-lossy body stays reachable without putting a toggle on every body that merely lost a trailing newline. |
| `timeWindow` | Time-of-day window math (`isInTimeWindow`, `timeStringToMinutes`) and morning-layout auto-switch helpers (`pickActiveLayoutId`, `recordManualLayoutPick`). |
diff --git a/client/src/utils/formatters.js b/client/src/utils/formatters.js
index ecadaa96ed..93117b6fdf 100644
--- a/client/src/utils/formatters.js
+++ b/client/src/utils/formatters.js
@@ -860,3 +860,12 @@ export function clamp(n, min, max) {
export function capitalize(s) {
return typeof s === 'string' && s.length ? s[0].toUpperCase() + s.slice(1) : s;
}
+
+/**
+ * Short display name for a Claude model id: drops the `claude-` prefix and a
+ * trailing 8-digit date stamp only, so `claude-sonnet-5-5` stays "sonnet-5-5"
+ * (a bare `-\d+` strip would collapse it to "sonnet-5").
+ */
+export function shortClaudeModelName(model) {
+ return String(model ?? '').replace(/^claude-/, '').replace(/-\d{8}$/, '');
+}
diff --git a/client/src/utils/formatters.test.js b/client/src/utils/formatters.test.js
index 5961ad9102..d6e65b32ce 100644
--- a/client/src/utils/formatters.test.js
+++ b/client/src/utils/formatters.test.js
@@ -724,3 +724,12 @@ it('retains sub-cent token costs and fractional intelligence scores when precisi
expect(formatUsd(0.0045)).toBe('$0.00');
expect(formatCount(37.26, { maximumFractionDigits: 1 })).toBe('37.3');
});
+
+describe('shortClaudeModelName', () => {
+ it('keeps a two-part version but drops a date stamp', async () => {
+ const { shortClaudeModelName } = await import('./formatters.js');
+ expect(shortClaudeModelName('claude-sonnet-5-5')).toBe('sonnet-5-5');
+ expect(shortClaudeModelName('claude-sonnet-4-20250514')).toBe('sonnet-4');
+ expect(shortClaudeModelName(undefined)).toBe('');
+ });
+});