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
ui: theme the meatspace progress bar and collapse the duplicated default swatch hex (#3453)
[._.]/ Adam Eivybb70783e6ee9
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 2745e1c6fd..323982abae 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -31,3 +31,5 @@- **184 icon-only buttons had no accessible name, and 62 close buttons were smaller than a fingertip.** The icon-only buttons carried only a `title`, which is mouse-hover-only — undiscoverable on touch, and this app is opened from phones and tablets over the tailnet — and is not reliably read as the accessible name. The close buttons were sized to their bare icon (`w-4 h-4`, `p-1`) rather than the 44px minimum `Drawer.jsx` already established; only 9 of 59 files followed it, and one had no sizing at all. Where a smaller `min-h` token already existed it was replaced rather than paired, since two competing `min-h-*` utilities resolve by stylesheet order, not source order. `a11yConventions.test.js` now enforces both rules — writing the guard found five more buttons with no accessible name at all, and hardening it after review found two live sub-44px close buttons its first version couldn't see because it only matched literal `aria-label="Close…"` strings and missed every dynamic label.- **The tailnet identity guard had a bypass on exactly the leak class it exists to catch.** Its suffix pattern required a digit in the `tail<token>` segment, but Tailscale picks that token at random from lowercase alphanumerics — so a real hostname whose token happened to be all letters passed silently. It now matches the shape and subtracts known placeholder tokens by exact name, which fails closed: an unrecognized placeholder trips the guard and gets looked at, rather than a real hostname slipping through for lacking a digit.++- **The MeatSpace life-progress bar was the one part of that panel that didn't follow the theme.** Its fill color was three inline hex literals (`#ef4444`/`#f59e0b`/`#3b82f6`) while the surrounding card already used `border-port-border` and `text-port-error` — so switching themes re-colored everything around the bar but not the bar. It now reads `rgb(var(--port-error))` / `rgb(var(--port-warning))` / `rgb(var(--port-accent))`. Separately, the `#3b82f6` default swatch was independently hardcoded at five places across the agents and calendar config UIs; a native `<input type="color">` genuinely needs a literal hex, so the literal stays — but there is now one `DEFAULT_AVATAR_COLOR` derived from the default theme's accent that all five import, instead of five edits to change the fallback (#3453).diff --git a/client/src/components/agents/AgentDetail.jsx b/client/src/components/agents/AgentDetail.jsxindex 2799320235..43597a367a 100644--- a/client/src/components/agents/AgentDetail.jsx+++ b/client/src/components/agents/AgentDetail.jsx@@ -4,6 +4,7 @@ import { ArrowLeft } from 'lucide-react';import BrailleSpinner from '../BrailleSpinner';import * as api from '../../services/api';import { AGENT_DETAIL_TABS } from './constants';+import { DEFAULT_AVATAR_COLOR } from '../../themes/portosThemes';import OverviewTab from './tabs/OverviewTab';import ToolsTab from './tabs/ToolsTab';import WorldTab from './tabs/WorldTab';@@ -117,7 +118,7 @@ export default function AgentDetail() {</Link><divclassName="w-10 h-10 rounded-full flex items-center justify-center text-xl shrink-0"- style={{ backgroundColor: agent.avatar?.color || '#3b82f6' }}+ style={{ backgroundColor: agent.avatar?.color || DEFAULT_AVATAR_COLOR }}>{agent.avatar?.emoji || '🤖'}</div>diff --git a/client/src/components/agents/AgentList.jsx b/client/src/components/agents/AgentList.jsxindex 3d1ed4d314..2d3dc272b5 100644--- a/client/src/components/agents/AgentList.jsx+++ b/client/src/components/agents/AgentList.jsx@@ -6,6 +6,7 @@ import BrailleSpinner from '../BrailleSpinner';import { FormField } from '../ui/FormField';import * as api from '../../services/api';import { PERSONALITY_STYLES, DEFAULT_PERSONALITY, DEFAULT_AVATAR } from './constants';+import { DEFAULT_AVATAR_COLOR } from '../../themes/portosThemes';import { filterSelectableModels } from '../../utils/providers';export default function AgentList() {@@ -348,7 +349,7 @@ export default function AgentList() {<inputid="agent-avatar-color"type="color"- value={formData.avatar.color || '#3b82f6'}+ value={formData.avatar.color || DEFAULT_AVATAR_COLOR}onChange={(e) => setFormData({ ...formData, avatar: { ...formData.avatar, color: e.target.value } })}className="w-12 h-8 border border-port-border rounded cursor-pointer"/>@@ -391,7 +392,7 @@ export default function AgentList() {<div className="flex items-center gap-3 mb-3"><divclassName="w-12 h-12 rounded-full flex items-center justify-center text-2xl shrink-0"- style={{ backgroundColor: agent.avatar?.color || '#3b82f6' }}+ style={{ backgroundColor: agent.avatar?.color || DEFAULT_AVATAR_COLOR }}>{agent.avatar?.emoji || '🤖'}</div>diff --git a/client/src/components/agents/constants.js b/client/src/components/agents/constants.jsindex 72e3a2a6af..30dffd7ecc 100644--- a/client/src/components/agents/constants.js+++ b/client/src/components/agents/constants.js@@ -2,6 +2,8 @@* Agent Feature Constants*/+import { DEFAULT_AVATAR_COLOR } from '../../themes/portosThemes';+export const AGENT_DETAIL_TABS = [{ id: 'overview', label: 'Overview', icon: '📋' },{ id: 'tools', label: 'Moltbook', icon: '📚' },@@ -64,7 +66,7 @@ export const DEFAULT_PERSONALITY = {export const DEFAULT_AVATAR = {emoji: '🤖',- color: '#3b82f6'+ color: DEFAULT_AVATAR_COLOR};// Re-export shared cron presets for agent schedulingdiff --git a/client/src/components/agents/tabs/OverviewTab.jsx b/client/src/components/agents/tabs/OverviewTab.jsxindex 62e0978d2d..e2edbcb439 100644--- a/client/src/components/agents/tabs/OverviewTab.jsx+++ b/client/src/components/agents/tabs/OverviewTab.jsx@@ -7,6 +7,7 @@ import { filterSelectableModels } from '../../../utils/providers';import BrailleSpinner from '../../BrailleSpinner';import { FormField } from '../../ui/FormField';import { PERSONALITY_STYLES, DEFAULT_PERSONALITY, DEFAULT_AVATAR, PLATFORM_TYPES, ACCOUNT_STATUSES } from '../constants';+import { DEFAULT_AVATAR_COLOR } from '../../../themes/portosThemes';import { useCooldownTick } from '../../../hooks/useCooldownTick';import { formatCooldown, formatDateTime } from '../../../utils/formatters';@@ -365,7 +366,7 @@ export default function OverviewTab({ agentId, agent, onAgentUpdate }) {<FormField label="Color" className="flex items-center gap-2" labelClassName="text-sm text-gray-400"><inputtype="color"- value={formData.avatar.color || '#3b82f6'}+ value={formData.avatar.color || DEFAULT_AVATAR_COLOR}onChange={(e) => setFormData({ ...formData, avatar: { ...formData.avatar, color: e.target.value } })}className="w-12 h-9 border border-port-border rounded cursor-pointer"/>diff --git a/client/src/components/calendar/ConfigTab.jsx b/client/src/components/calendar/ConfigTab.jsxindex 6ec46ffa57..15a2146726 100644--- a/client/src/components/calendar/ConfigTab.jsx+++ b/client/src/components/calendar/ConfigTab.jsx@@ -8,6 +8,7 @@ import FeatureProviderPicker from '../FeatureProviderPicker';import InlineConfirmRow from '../ui/InlineConfirmRow';import { FormField } from '../ui/FormField';import { useConfirmDelete } from '../../hooks/useConfirmDelete';+import { DEFAULT_AVATAR_COLOR } from '../../themes/portosThemes';const TYPE_ICONS = { 'outlook-calendar': Globe, 'google-calendar': Calendar };const TYPE_LABELS = { 'outlook-calendar': 'Outlook Calendar (API)', 'google-calendar': 'Google Calendar' };@@ -543,10 +544,10 @@ export default function ConfigTab({ accounts, setAccounts }) {><div className="flex items-center gap-2 min-w-0"><label className="relative w-4 h-4 shrink-0 cursor-pointer" title="Change color">- <div className="w-4 h-4 rounded-full border border-port-border" style={{ backgroundColor: sc.color || '#3b82f6' }} />+ <div className="w-4 h-4 rounded-full border border-port-border" style={{ backgroundColor: sc.color || DEFAULT_AVATAR_COLOR }} /><inputtype="color"- value={sc.color || '#3b82f6'}+ value={sc.color || DEFAULT_AVATAR_COLOR}onInput={(e) => handleSubcalendarLocal(account, sc.calendarId, 'color', e.target.value)}onChange={(e) => handleSubcalendarToggle(account, sc.calendarId, 'color', e.target.value)}className="absolute inset-0 opacity-0 w-full h-full cursor-pointer"diff --git a/client/src/components/meatspace/tabs/OverviewTab.jsx b/client/src/components/meatspace/tabs/OverviewTab.jsxindex 8a3585bba7..80fa879aec 100644--- a/client/src/components/meatspace/tabs/OverviewTab.jsx+++ b/client/src/components/meatspace/tabs/OverviewTab.jsx@@ -76,7 +76,11 @@ function CompactCountdown({ deathDate, lifeExpectancy, percentComplete, lev }) {className="h-full rounded-full transition-all duration-1000"style={{width: `${Math.min(100, percentComplete)}%`,- background: percentComplete > 80 ? '#ef4444' : percentComplete > 60 ? '#f59e0b' : '#3b82f6'+ background: percentComplete > 80+ ? 'rgb(var(--port-error))'+ : percentComplete > 60+ ? 'rgb(var(--port-warning))'+ : 'rgb(var(--port-accent))'}}/></div>diff --git a/client/src/themes/portosThemes.js b/client/src/themes/portosThemes.jsindex 33404bc3e7..96dc3ab9ca 100644--- a/client/src/themes/portosThemes.js+++ b/client/src/themes/portosThemes.js@@ -633,6 +633,12 @@ export const THEMES = {export const THEME_IDS = Object.keys(THEMES);export const THEME_LIST = THEME_IDS.map(id => THEMES[id]);+// Fallback color for user-pickable swatches (agent avatars, calendar sources).+// A native <input type="color"> only accepts a literal `#rrggbb` and cannot read+// a CSS custom property, so this mirrors the default theme's accent instead of+// `rgb(var(--port-accent))`. Single definition — every swatch site imports it.+export const DEFAULT_AVATAR_COLOR = THEMES[DEFAULT_THEME_ID].accent;+export const LEGACY_THEME_ALIASES = {midnight: DEFAULT_THEME_ID,phosphor: 'black-ice-terminal',diff --git a/client/src/themes/portosThemes.test.js b/client/src/themes/portosThemes.test.jsindex f38eb92cae..dffc726e3f 100644--- a/client/src/themes/portosThemes.test.js+++ b/client/src/themes/portosThemes.test.js@@ -1,5 +1,5 @@import { describe, it, expect } from 'vitest';-import { THEMES } from './portosThemes.js';+import { DEFAULT_AVATAR_COLOR, DEFAULT_THEME_ID, THEMES } from './portosThemes.js';// WCAG 2.x relative luminance + contrast ratio, computed straight from the// stored "R G B" token strings so the assertion proves the on-disk theme@@ -39,3 +39,18 @@ describe('portosThemes warning token contrast', () => {},);});++describe('DEFAULT_AVATAR_COLOR', () => {+ it('is a literal #rrggbb hex — a native <input type="color"> rejects anything else', () => {+ expect(DEFAULT_AVATAR_COLOR).toMatch(/^#[0-9a-f]{6}$/);+ });++ it('matches the default theme accent, in both hex and token form', () => {+ const theme = THEMES[DEFAULT_THEME_ID];+ expect(DEFAULT_AVATAR_COLOR).toBe(theme.accent);+ const hex = parseRgb(theme.colors['--port-accent'])+ .map((n) => n.toString(16).padStart(2, '0'))+ .join('');+ expect(DEFAULT_AVATAR_COLOR).toBe(`#${hex}`);+ });+});