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: adopt FormField in core settings tabs (#4930)
[._.]/ Adam Eivy02cf03577778
diff --git a/client/src/components/settings/GeneralTab.jsx b/client/src/components/settings/GeneralTab.jsxindex 04cae0f239..f2a480f564 100644--- a/client/src/components/settings/GeneralTab.jsx+++ b/client/src/components/settings/GeneralTab.jsx@@ -1,6 +1,7 @@import { useState, useEffect, useMemo } from 'react';import { Save } from 'lucide-react';import toast from '../ui/Toast';+import FormField from '../ui/FormField';import BrailleSpinner from '../BrailleSpinner';import ThemePickerPanel from '../ThemePickerPanel';import { getSettings, updateSettings } from '../../services/api';@@ -117,8 +118,11 @@ export function GeneralTab() {<p className="text-sm text-gray-400 mb-4">Used for job scheduling (cron expressions & scheduled times) and briefing dates.</p>- <label htmlFor="timezone-input" className="sr-only">Timezone (IANA)</label>- <div className="flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3">+ <FormField+ label="Timezone (IANA)"+ labelClassName="sr-only"+ className="flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3"+ ><inputid="timezone-input"type="text"@@ -146,7 +150,7 @@ export function GeneralTab() {<span className="truncate">Use detected: {detectedTz}</span></button>)}- </div>+ </FormField>{timezone && timezone !== detectedTz && (<p className="text-xs text-gray-500 mt-2 break-all">Browser detected: {detectedTz}@@ -166,8 +170,11 @@ export function GeneralTab() {ask “what's the weather?” without naming a place. Leave both blank to use a default location.</p><div className="flex flex-col sm:flex-row sm:items-end gap-2 sm:gap-3">- <div className="flex-1 sm:max-w-[10rem]">- <label htmlFor="loc-lat" className="block text-xs text-gray-400 mb-1">Latitude (-90 to 90)</label>+ <FormField+ label="Latitude (-90 to 90)"+ className="flex-1 sm:max-w-[10rem]"+ labelClassName="block text-xs text-gray-400 mb-1"+ ><inputid="loc-lat"type="text"@@ -177,9 +184,12 @@ export function GeneralTab() {placeholder="37.7749"className="w-full min-w-0 px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"/>- </div>- <div className="flex-1 sm:max-w-[10rem]">- <label htmlFor="loc-lon" className="block text-xs text-gray-400 mb-1">Longitude (-180 to 180)</label>+ </FormField>+ <FormField+ label="Longitude (-180 to 180)"+ className="flex-1 sm:max-w-[10rem]"+ labelClassName="block text-xs text-gray-400 mb-1"+ ><inputid="loc-lon"type="text"@@ -189,7 +199,7 @@ export function GeneralTab() {placeholder="-122.4194"className="w-full min-w-0 px-3 py-2 bg-port-bg border border-port-border rounded-lg text-white text-sm"/>- </div>+ </FormField><buttononClick={handleSaveLocation}disabled={savingLocation}diff --git a/client/src/components/settings/SecurityTab.jsx b/client/src/components/settings/SecurityTab.jsxindex 29ccfe9aee..c2d66f314d 100644--- a/client/src/components/settings/SecurityTab.jsx+++ b/client/src/components/settings/SecurityTab.jsx@@ -1,6 +1,7 @@import { useEffect, useState } from 'react';import { Lock, ShieldCheck, ShieldOff } from 'lucide-react';import toast from '../ui/Toast';+import FormField from '../ui/FormField';import BrailleSpinner from '../BrailleSpinner';import { getAuthStatus, setAuthPassword, clearAuthPassword } from '../../services/api';@@ -111,8 +112,7 @@ export function SecurityTab() {<Lock className="w-4 h-4" /> {enabled ? 'Change password' : 'Set a password'}</h3>{enabled && (- <div>- <label htmlFor="security-current" className="block text-sm text-gray-300 mb-1">Current password</label>+ <FormField label="Current password" labelClassName="block text-sm text-gray-300 mb-1"><inputid="security-current"type="password"@@ -121,10 +121,9 @@ export function SecurityTab() {onChange={(e) => setCurrentPassword(e.target.value)}className="w-full bg-port-bg border border-port-border rounded px-3 py-2 text-white focus:border-port-accent focus:outline-none"/>- </div>+ </FormField>)}- <div>- <label htmlFor="security-new" className="block text-sm text-gray-300 mb-1">New password</label>+ <FormField label="New password" labelClassName="block text-sm text-gray-300 mb-1"><inputid="security-new"type="password"@@ -135,9 +134,8 @@ export function SecurityTab() {className="w-full bg-port-bg border border-port-border rounded px-3 py-2 text-white focus:border-port-accent focus:outline-none"/><p className="text-xs text-gray-500 mt-1">Minimum 8 characters.</p>- </div>- <div>- <label htmlFor="security-confirm" className="block text-sm text-gray-300 mb-1">Confirm new password</label>+ </FormField>+ <FormField label="Confirm new password" labelClassName="block text-sm text-gray-300 mb-1"><inputid="security-confirm"type="password"@@ -146,7 +144,7 @@ export function SecurityTab() {onChange={(e) => setConfirmPassword(e.target.value)}className="w-full bg-port-bg border border-port-border rounded px-3 py-2 text-white focus:border-port-accent focus:outline-none"/>- </div>+ </FormField><buttontype="submit"disabled={saving || !newPassword || !confirmPassword || (enabled && !currentPassword)}@@ -172,8 +170,7 @@ export function SecurityTab() {</button>) : (<div className="space-y-3">- <div>- <label htmlFor="security-disable" className="block text-sm text-gray-300 mb-1">Enter current password to confirm</label>+ <FormField label="Enter current password to confirm" labelClassName="block text-sm text-gray-300 mb-1"><inputid="security-disable"type="password"@@ -182,7 +179,7 @@ export function SecurityTab() {onChange={(e) => setDisablePassword(e.target.value)}className="w-full bg-port-bg border border-port-border rounded px-3 py-2 text-white focus:border-port-accent focus:outline-none"/>- </div>+ </FormField><div className="flex gap-2"><buttontype="button"diff --git a/client/src/components/settings/YoutubeTab.jsx b/client/src/components/settings/YoutubeTab.jsxindex 6db256ef8c..af497caf48 100644--- a/client/src/components/settings/YoutubeTab.jsx+++ b/client/src/components/settings/YoutubeTab.jsx@@ -1,6 +1,7 @@import { useState } from 'react';import { Save, Loader2, MonitorPlay, RefreshCw, CheckCircle2, AlertCircle, ShieldQuestion } from 'lucide-react';import toast from '../ui/Toast';+import FormField from '../ui/FormField';import BrailleSpinner from '../BrailleSpinner';import { formatDateTime } from '../../utils/formatters';import { useSyncSourceSettings } from '../../hooks/useSyncSourceSettings';@@ -113,10 +114,10 @@ export function YoutubeTab() {Enable scheduled YouTube scrape</label>- <div>- <label htmlFor="youtube-interval" className="block text-xs uppercase tracking-wider text-gray-500 mb-1">- Scrape interval (minutes)- </label>+ <FormField+ label="Scrape interval (minutes)"+ labelClassName="block text-xs uppercase tracking-wider text-gray-500 mb-1"+ ><inputid="youtube-interval"type="number"@@ -129,7 +130,7 @@ export function YoutubeTab() {<p className="text-xs text-gray-500 mt-1">The history page only shows day-bucketed entries — a few times a day (e.g. 480 min) is plenty. Be a polite scraper.</p>- </div>+ </FormField><div className="flex flex-wrap gap-2 pt-1"><button