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
refactor([issue-708]): single-source the emoji-usage enum through the mirrored helper
[._.]/ Adam Eivy23d5d750d277
diff --git a/client/src/components/digital-twin/tabs/PersonasTab.jsx b/client/src/components/digital-twin/tabs/PersonasTab.jsxindex cb833299a1..314cc89abf 100644--- a/client/src/components/digital-twin/tabs/PersonasTab.jsx+++ b/client/src/components/digital-twin/tabs/PersonasTab.jsx@@ -9,10 +9,10 @@ import {COMM_DELTA_MIN,COMM_DELTA_MAX,BIG_FIVE_DELTA_MIN,- BIG_FIVE_DELTA_MAX+ BIG_FIVE_DELTA_MAX,+ EMOJI_USAGE_VALUES} from '../../../lib/personaTraitBlend.js';-const EMOJI_OPTIONS = ['never', 'rare', 'occasional', 'frequent'];const BIG_FIVE_KEYS = ['O', 'C', 'E', 'A', 'N'];const BIG_FIVE_LABELS = { O: 'Openness', C: 'Conscientiousness', E: 'Extraversion', A: 'Agreeableness', N: 'Neuroticism' };@@ -451,7 +451,7 @@ function TraitAdjustmentsEditor({ idPrefix, adjustments, setAdjustments }) {className="w-full px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white focus:border-port-accent focus:outline-none"><option value="">No override</option>- {EMOJI_OPTIONS.map(o => <option key={o} value={o}>{o}</option>)}+ {EMOJI_USAGE_VALUES.map(o => <option key={o} value={o}>{o}</option>)}</select></div><div>diff --git a/client/src/lib/personaTraitBlend.js b/client/src/lib/personaTraitBlend.jsindex 8918ecac90..bdab3e911c 100644--- a/client/src/lib/personaTraitBlend.js+++ b/client/src/lib/personaTraitBlend.js@@ -28,6 +28,12 @@ export const COMM_DELTA_MAX = 9;export const BIG_FIVE_DELTA_MIN = -1;export const BIG_FIVE_DELTA_MAX = 1;+// Emoji-usage vocabulary, shared by the base twin's communication profile, a+// persona's trait-adjustment override (server Zod), and the Personas UI+// dropdown. Living in this byte-parity-guarded mirror means the parity test+// catches any client↔server drift in the enum.+export const EMOJI_USAGE_VALUES = ['never', 'rare', 'occasional', 'frequent'];+export const BIG_FIVE_LEAN = {O: { more: 'more open and curious', less: 'more conventional and focused' },C: { more: 'more conscientious and organized', less: 'more relaxed and spontaneous' },diff --git a/server/lib/digitalTwinValidation.js b/server/lib/digitalTwinValidation.jsindex 69621b28f1..e57c3484ba 100644--- a/server/lib/digitalTwinValidation.js+++ b/server/lib/digitalTwinValidation.js@@ -3,13 +3,10 @@ import {COMM_DELTA_MIN,COMM_DELTA_MAX,BIG_FIVE_DELTA_MIN,- BIG_FIVE_DELTA_MAX+ BIG_FIVE_DELTA_MAX,+ EMOJI_USAGE_VALUES} from './personaTraitBlend.js';-// Emoji-usage vocabulary, shared by the base twin's communication profile and a-// persona's trait-adjustment override so the two enums can't drift apart.-export const EMOJI_USAGE_VALUES = ['never', 'rare', 'occasional', 'frequent'];-// Document category enumexport const documentCategoryEnum = z.enum(['core', // Core identity, values, philosophydiff --git a/server/lib/personaTraitBlend.js b/server/lib/personaTraitBlend.jsindex 8918ecac90..bdab3e911c 100644--- a/server/lib/personaTraitBlend.js+++ b/server/lib/personaTraitBlend.js@@ -28,6 +28,12 @@ export const COMM_DELTA_MAX = 9;export const BIG_FIVE_DELTA_MIN = -1;export const BIG_FIVE_DELTA_MAX = 1;+// Emoji-usage vocabulary, shared by the base twin's communication profile, a+// persona's trait-adjustment override (server Zod), and the Personas UI+// dropdown. Living in this byte-parity-guarded mirror means the parity test+// catches any client↔server drift in the enum.+export const EMOJI_USAGE_VALUES = ['never', 'rare', 'occasional', 'frequent'];+export const BIG_FIVE_LEAN = {O: { more: 'more open and curious', less: 'more conventional and focused' },C: { more: 'more conscientious and organized', less: 'more relaxed and spontaneous' },