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: replace hardcoded port-* hex values with design tokens (#2031)

Adam Eivy7787fa45ab17
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index ea5dd1ea52..3a531ba3eb 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -24,4 +24,5 @@
- Consolidated five component-local duration/uptime/time-until formatters onto the shared `utils/formatters.js` helpers (`formatDurationMs`, `timeUntil`), per the "do not re-define formatters inside components" convention (#2028). `formatDurationMs` gained a day bucket (`2d 3h`) so long uptimes no longer render as an unbounded hours count; ProcessesTab, CityHud, Shell session ages, the CoS QuickSummary "next job" countdown, and the Loops interval label now all route through the shared helpers, and a `console.log` in `memoryClassifier.js` was collapsed to a single interpolated line.
- Migration 155 heals `data/prompts/stages/cd-treatment.md` installs that #1808's anchor-based migration 148 left stranded (#2042). Installs seeded before the `imageStrength` scene knob (older pre-#1808 template) got the `## Cast & ingredients` list but missed the per-scene `"cast": [{ "ingredientId": … }]` field, so the Creative Director cast-threading regression test stayed red on the runtime template and migration 148 (already applied) never re-ran. The new hash-driven prompt-replace upgrades those copies (and both pristine pre-#1808 shipped versions) to the current shipped reference, leaving hand-customized copies untouched. Also folds `cd-treatment.md` into `buildPromptDriftTables` so setup-data.js's drift warning classifies a stranded copy correctly.
+- Replaced the last hardcoded `port-*` hex stragglers with design tokens (#2031). The Security page's audio-level meter used raw `#ef4444`/`#f59e0b`/`#22c55e` in an inline `backgroundColor`; these now resolve through `rgb(var(--port-error))`/`--port-warning`/`--port-success` so they track the theme. The Chief-of-Staff page's "CoS" wordmark gradient was duplicated inline three times and is now a single module-level `COS_TITLE_GRADIENT` constant. Visual output is unchanged.
- Fixed double error toasts across ~50 call sites that owned a custom `.catch` toast: they now pass `{ silent: true }` so the `apiCore.request()` default toast no longer fires alongside the component's own, per the "Silent vs. toasting API requests" convention (#2026). Also added the missing trailing `options = {}` passthrough to ~40 `api*.js` wrappers (CoS tasks/agents/jobs, Brain people/projects/ideas/admin/memories/buckets/inbox, GSD, memory approve/reject, app task-type overrides, feature-agent controls, browser/backup/system, MeatSpace POST drills, goals, messages) so callers can actually suppress the built-in toast. Sites whose `.catch` only reverts state (no toast) were intentionally left on the default single toast.
diff --git a/client/src/pages/ChiefOfStaff.jsx b/client/src/pages/ChiefOfStaff.jsx
index 2252fac8a3..3a67906c6c 100644
--- a/client/src/pages/ChiefOfStaff.jsx
+++ b/client/src/pages/ChiefOfStaff.jsx
@@ -57,6 +57,9 @@ const CANVAS_AVATAR_STYLES = new Set([
'miniMaleC', 'miniFemaleD',
]);
+// Shared brand gradient for the "CoS" wordmark headings (clipped to text).
+const COS_TITLE_GRADIENT = 'linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4)';
+
export default function ChiefOfStaff() {
const { tab } = useParams();
const navigate = useNavigate();
@@ -601,7 +604,7 @@ export default function ChiefOfStaff() {
<h1
className="text-base font-bold"
style={{
- background: 'linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4)',
+ background: COS_TITLE_GRADIENT,
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
backgroundClip: 'text'
@@ -652,7 +655,7 @@ export default function ChiefOfStaff() {
<h1
className="text-base font-bold"
style={{
- background: 'linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4)',
+ background: COS_TITLE_GRADIENT,
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
backgroundClip: 'text'
@@ -704,7 +707,7 @@ export default function ChiefOfStaff() {
<h1
className="hidden lg:block text-lg sm:text-xl lg:text-2xl xl:text-3xl font-bold mb-2 lg:mb-4"
style={{
- background: 'linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4)',
+ background: COS_TITLE_GRADIENT,
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
backgroundClip: 'text'
diff --git a/client/src/pages/Security.jsx b/client/src/pages/Security.jsx
index d7008bb785..cd8c26541b 100644
--- a/client/src/pages/Security.jsx
+++ b/client/src/pages/Security.jsx
@@ -455,10 +455,10 @@ export default function Security() {
style={{
width: `${audioLevel * 100}%`,
backgroundColor: audioLevel > 0.7
- ? '#ef4444'
+ ? 'rgb(var(--port-error))'
: audioLevel > 0.4
- ? '#f59e0b'
- : '#22c55e'
+ ? 'rgb(var(--port-warning))'
+ : 'rgb(var(--port-success))'
}}
/>
</div>