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
feat(goals): mobile responsive redesign for goals page
Adam Eivy27da58064ec2
diff --git a/client/src/components/goals/GoalDetailPanel.jsx b/client/src/components/goals/GoalDetailPanel.jsxindex a849cb5206..96bd32b3a5 100644--- a/client/src/components/goals/GoalDetailPanel.jsx+++ b/client/src/components/goals/GoalDetailPanel.jsx@@ -363,7 +363,7 @@ export default function GoalDetailPanel({ goal, allGoals, onClose, onRefresh })const parentOptions = (allGoals || []).filter(g => !excludedIds.has(g.id));return (- <div className="w-80 bg-port-card border-l border-port-border h-full overflow-y-auto p-4 space-y-4">+ <div className="w-full sm:w-80 bg-port-card border-l border-port-border h-full overflow-y-auto p-4 space-y-4">{/* Header */}<div className="flex items-center justify-between"><div className="flex items-center gap-2 min-w-0">diff --git a/client/src/components/goals/GoalsListView.jsx b/client/src/components/goals/GoalsListView.jsxindex 7efcbad982..6f8c282292 100644--- a/client/src/components/goals/GoalsListView.jsx+++ b/client/src/components/goals/GoalsListView.jsx@@ -27,13 +27,13 @@ function GoalRow({ goal, depth, expandedIds, onToggle, onSelect, selectedId, onAreturn (<><div- className={`flex items-center gap-2 px-3 py-2 hover:bg-port-border/30 cursor-pointer transition-colors border-b border-port-border/50 ${+ className={`flex items-center gap-1.5 sm:gap-2 px-2 sm:px-3 py-2 hover:bg-port-border/30 cursor-pointer transition-colors border-b border-port-border/50 ${isSelected ? 'bg-port-accent/10' : ''}`}- style={{ paddingLeft: `${depth * 24 + 12}px` }}+ style={{ paddingLeft: `${depth * 20 + 8}px` }}onClick={() => onSelect(goal)}>- <GripVertical className="w-3.5 h-3.5 text-gray-600 shrink-0 cursor-grab" />+ <GripVertical className="w-3.5 h-3.5 text-gray-600 shrink-0 cursor-grab hidden sm:block" />{hasChildren ? (<button@@ -50,18 +50,17 @@ function GoalRow({ goal, depth, expandedIds, onToggle, onSelect, selectedId, onA<CatIcon className={`w-3.5 h-3.5 ${cat.color}`} /></div>- <span className="text-sm text-white truncate flex-1">{goal.title}</span>+ <span className="text-sm text-white truncate flex-1 min-w-0">{goal.title}</span>{goal.goalType && goal.goalType !== 'standard' && (<span className={`shrink-0 text-xs px-1.5 py-0.5 rounded ${GOAL_TYPE_CONFIG[goal.goalType]?.bg} ${GOAL_TYPE_CONFIG[goal.goalType]?.color}`}>{goal.goalType === 'apex' ? <Crown className="w-3 h-3 inline mr-0.5" /> : <Star className="w-3 h-3 inline mr-0.5" />}- {GOAL_TYPE_CONFIG[goal.goalType]?.label}+ <span className="hidden sm:inline">{GOAL_TYPE_CONFIG[goal.goalType]?.label}</span></span>)}- {/* Progress pill */}{(goal.progress > 0 || goal.todos?.length > 0) && (- <span className="shrink-0 flex items-center gap-1 text-xs text-gray-500">+ <span className="shrink-0 flex items-center gap-1 text-xs text-gray-500 hidden sm:flex"><div className="w-12 h-1.5 rounded-full bg-gray-700 overflow-hidden"><divclassName={`h-full rounded-full transition-all ${@@ -74,21 +73,21 @@ function GoalRow({ goal, depth, expandedIds, onToggle, onSelect, selectedId, onA</span>)}- <span className="text-xs text-gray-500 shrink-0 px-1.5 py-0.5 rounded bg-gray-800">+ <span className="text-xs text-gray-500 shrink-0 px-1 sm:px-1.5 py-0.5 rounded bg-gray-800">{HORIZON_OPTIONS.find(h => h.value === goal.horizon)?.label}</span>{urgencyIndicator(goal.urgency)}{goal.linkedActivities?.length > 0 && (- <span className="flex items-center gap-0.5 text-xs text-gray-500 shrink-0" title={`${goal.linkedActivities.length} linked ${goal.linkedActivities.length === 1 ? 'activity' : 'activities'}`}>+ <span className="hidden sm:flex items-center gap-0.5 text-xs text-gray-500 shrink-0" title={`${goal.linkedActivities.length} linked ${goal.linkedActivities.length === 1 ? 'activity' : 'activities'}`}><Link2 className="w-3 h-3" />{goal.linkedActivities.length}</span>)}{goal.tags?.length > 0 && (- <div className="flex items-center gap-1 shrink-0">+ <div className="hidden md:flex items-center gap-1 shrink-0">{goal.tags.slice(0, 3).map(tag => (<span key={tag} className="flex items-center gap-0.5 px-1.5 py-0.5 rounded bg-port-accent/10 text-port-accent text-xs"><Tag className="w-2.5 h-2.5" />@@ -190,11 +189,11 @@ export default function GoalsListView({ data, onRefresh }) {};return (- <div className="h-full flex">- <div className="flex-1 flex flex-col overflow-hidden">+ <div className="h-full flex flex-col sm:flex-row relative">+ <div className="flex-1 flex flex-col overflow-hidden min-w-0">{/* Toolbar */}- <div className="flex items-center gap-3 px-4 py-3 border-b border-port-border bg-port-card/50">- <div className="relative flex-1 max-w-xs">+ <div className="flex flex-wrap items-center gap-2 sm:gap-3 px-3 sm:px-4 py-2 sm:py-3 border-b border-port-border bg-port-card/50">+ <div className="relative flex-1 min-w-[140px] max-w-xs"><Search className="absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500" /><inputtype="text"@@ -209,23 +208,26 @@ export default function GoalsListView({ data, onRefresh }) {setNewGoal({ ...DEFAULT_NEW_GOAL });setShowNewGoal(true);}}- className="flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg bg-port-accent text-white hover:bg-blue-600"+ className="flex items-center gap-1.5 px-3 py-1.5 text-sm rounded-lg bg-port-accent text-white hover:bg-blue-600 whitespace-nowrap"><Plus className="w-4 h-4" />- Add Root Goal+ <span className="hidden sm:inline">Add Root Goal</span>+ <span className="sm:hidden">Add</span></button>{(data?.flat?.length ?? 0) >= 2 && (<div className="flex items-center gap-2">- <ProviderModelSelector- providers={providers}- selectedProviderId={selectedProviderId}- selectedModel={selectedModel}- availableModels={availableModels}- onProviderChange={setSelectedProviderId}- onModelChange={setSelectedModel}- label="AI Provider"- disabled={organizing || providersLoading}- />+ <div className="hidden sm:block">+ <ProviderModelSelector+ providers={providers}+ selectedProviderId={selectedProviderId}+ selectedModel={selectedModel}+ availableModels={availableModels}+ onProviderChange={setSelectedProviderId}+ onModelChange={setSelectedModel}+ label="AI Provider"+ disabled={organizing || providersLoading}+ />+ </div><buttononClick={handleOrganize}disabled={organizing || !selectedProviderId}@@ -252,22 +254,24 @@ export default function GoalsListView({ data, onRefresh }) {setExpandedIds(allIds);}}}- className="px-3 py-1.5 text-sm rounded-lg bg-port-border text-gray-300 hover:bg-gray-600"+ className="px-3 py-1.5 text-sm rounded-lg bg-port-border text-gray-300 hover:bg-gray-600 whitespace-nowrap">- {expandedIds.size > 0 ? 'Collapse All' : 'Expand All'}+ {expandedIds.size > 0 ? 'Collapse' : 'Expand'}</button></div>{/* New goal form */}{showNewGoal && (- <div className="bg-port-card border-b border-port-border px-4 py-3 space-y-2">+ <div className="bg-port-card border-b border-port-border px-3 sm:px-4 py-3 space-y-2"><div className="flex items-center gap-2 text-sm text-gray-400">- <Plus className="w-4 h-4" />- {newGoal.parentId- ? `New sub-goal under "${data?.flat?.find(g => g.id === newGoal.parentId)?.title}"`- : 'New root goal'}+ <Plus className="w-4 h-4 shrink-0" />+ <span className="truncate">+ {newGoal.parentId+ ? `New sub-goal under "${data?.flat?.find(g => g.id === newGoal.parentId)?.title}"`+ : 'New root goal'}+ </span></div>- <div className="flex gap-2">+ <div className="flex flex-col sm:flex-row gap-2"><inputtype="text"value={newGoal.title}@@ -277,35 +281,37 @@ export default function GoalsListView({ data, onRefresh }) {onKeyDown={e => e.key === 'Enter' && handleCreateGoal()}autoFocus/>- <select- value={newGoal.horizon}- onChange={e => setNewGoal({ ...newGoal, horizon: e.target.value })}- className="bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm text-white"- >- {HORIZON_OPTIONS.map(h => <option key={h.value} value={h.value}>{h.label}</option>)}- </select>- <select- value={newGoal.category}- onChange={e => setNewGoal({ ...newGoal, category: e.target.value })}- className="bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm text-white"- >- {Object.entries(CATEGORY_CONFIG).map(([k, v]) => (- <option key={k} value={k}>{v.label}</option>- ))}- </select>- <button- onClick={handleCreateGoal}- disabled={!newGoal.title.trim()}- className="px-3 py-1.5 text-sm rounded bg-port-accent text-white disabled:opacity-50"- >- Create- </button>- <button- onClick={() => setShowNewGoal(false)}- className="px-3 py-1.5 text-sm rounded bg-port-border text-gray-300"- >- Cancel- </button>+ <div className="flex gap-2">+ <select+ value={newGoal.horizon}+ onChange={e => setNewGoal({ ...newGoal, horizon: e.target.value })}+ className="flex-1 sm:flex-none bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm text-white"+ >+ {HORIZON_OPTIONS.map(h => <option key={h.value} value={h.value}>{h.label}</option>)}+ </select>+ <select+ value={newGoal.category}+ onChange={e => setNewGoal({ ...newGoal, category: e.target.value })}+ className="flex-1 sm:flex-none bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm text-white"+ >+ {Object.entries(CATEGORY_CONFIG).map(([k, v]) => (+ <option key={k} value={k}>{v.label}</option>+ ))}+ </select>+ <button+ onClick={handleCreateGoal}+ disabled={!newGoal.title.trim()}+ className="px-3 py-1.5 text-sm rounded bg-port-accent text-white disabled:opacity-50"+ >+ Create+ </button>+ <button+ onClick={() => setShowNewGoal(false)}+ className="px-3 py-1.5 text-sm rounded bg-port-border text-gray-300"+ >+ Cancel+ </button>+ </div></div></div>)}@@ -333,17 +339,19 @@ export default function GoalsListView({ data, onRefresh }) {</div></div>- {/* Detail panel */}+ {/* Detail panel — full overlay on mobile, side panel on desktop */}{selectedGoal && (- <GoalDetailPanel- goal={selectedGoal}- allGoals={data?.flat}- onClose={() => setSelectedGoal(null)}- onRefresh={() => {- setSelectedGoal(null);- onRefresh();- }}- />+ <div className="absolute inset-0 sm:relative sm:inset-auto z-20 sm:z-auto">+ <GoalDetailPanel+ goal={selectedGoal}+ allGoals={data?.flat}+ onClose={() => setSelectedGoal(null)}+ onRefresh={() => {+ setSelectedGoal(null);+ onRefresh();+ }}+ />+ </div>)}</div>);diff --git a/client/src/components/goals/GoalsTreeView.jsx b/client/src/components/goals/GoalsTreeView.jsxindex 2f1c21641c..4d78fdef3f 100644--- a/client/src/components/goals/GoalsTreeView.jsx+++ b/client/src/components/goals/GoalsTreeView.jsx@@ -341,18 +341,18 @@ export default function GoalsTreeView({ data, onRefresh }) {};return (- <div className="h-full flex">+ <div className="h-full flex relative"><div className="flex-1 relative">{/* Filter bar */}- <div className="absolute top-3 left-3 right-3 z-10 flex items-center gap-2 flex-wrap">+ <div className="absolute top-2 sm:top-3 left-2 sm:left-3 right-2 sm:right-3 z-10 flex items-center gap-1.5 sm:gap-2 flex-wrap"><div className="relative"><Search className="absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-500" /><inputtype="text"value={searchQuery}onChange={e => setSearchQuery(e.target.value)}- placeholder="Search goals..."- className="bg-port-card/90 backdrop-blur border border-port-border rounded-lg pl-7 pr-3 py-1.5 text-sm text-white w-48"+ placeholder="Search..."+ className="bg-port-card/90 backdrop-blur border border-port-border rounded-lg pl-7 pr-3 py-1.5 text-sm text-white w-32 sm:w-48"/></div>{Object.entries(CATEGORY_CONFIG).map(([key, cfg]) => {@@ -361,14 +361,15 @@ export default function GoalsTreeView({ data, onRefresh }) {<buttonkey={key}onClick={() => toggleCategory(key)}- className={`flex items-center gap-1 px-2 py-1 rounded-lg text-xs font-medium border transition-colors ${+ className={`flex items-center gap-1 px-1.5 sm:px-2 py-1 rounded-lg text-xs font-medium border transition-colors ${categoryFilters[key]? `${cfg.bg} ${cfg.color} border-transparent`: 'bg-port-card/60 text-gray-600 border-port-border'}`}+ title={cfg.label}><Icon className="w-3 h-3" />- {cfg.label}+ <span className="hidden sm:inline">{cfg.label}</span></button>);})}@@ -381,16 +382,18 @@ export default function GoalsTreeView({ data, onRefresh }) {</button>{(data?.flat?.length ?? 0) >= 2 && (<div className="flex items-center gap-2">- <ProviderModelSelector- providers={providers}- selectedProviderId={selectedProviderId}- selectedModel={selectedModel}- availableModels={availableModels}- onProviderChange={setSelectedProviderId}- onModelChange={setSelectedModel}- label="AI Provider"- disabled={organizing || providersLoading}- />+ <div className="hidden sm:block">+ <ProviderModelSelector+ providers={providers}+ selectedProviderId={selectedProviderId}+ selectedModel={selectedModel}+ availableModels={availableModels}+ onProviderChange={setSelectedProviderId}+ onModelChange={setSelectedModel}+ label="AI Provider"+ disabled={organizing || providersLoading}+ />+ </div><buttononClick={handleOrganize}disabled={organizing || !selectedProviderId}@@ -465,7 +468,7 @@ export default function GoalsTreeView({ data, onRefresh }) {/>{/* Legend */}- <div className="absolute bottom-3 left-3 z-10 bg-port-card/90 backdrop-blur border border-port-border rounded-lg px-3 py-2 text-xs space-y-1">+ <div className="hidden sm:block absolute bottom-3 left-3 z-10 bg-port-card/90 backdrop-blur border border-port-border rounded-lg px-3 py-2 text-xs space-y-1"><div className="text-gray-400 font-medium mb-1">Legend</div><div className="flex items-center gap-2"><div className="w-4 h-0.5 bg-blue-500" />@@ -529,14 +532,16 @@ export default function GoalsTreeView({ data, onRefresh }) {)}</div>- {/* Detail panel */}+ {/* Detail panel — full overlay on mobile, side panel on desktop */}{selectedGoal && (- <GoalDetailPanel- goal={selectedGoal}- allGoals={data?.flat}- onClose={() => setSelectedNode(null)}- onRefresh={onRefresh}- />+ <div className="absolute inset-0 sm:relative sm:inset-auto z-20 sm:z-auto">+ <GoalDetailPanel+ goal={selectedGoal}+ allGoals={data?.flat}+ onClose={() => setSelectedNode(null)}+ onRefresh={onRefresh}+ />+ </div>)}</div>);diff --git a/client/src/pages/Goals.jsx b/client/src/pages/Goals.jsxindex 15811dd46c..e56f785331 100644--- a/client/src/pages/Goals.jsx+++ b/client/src/pages/Goals.jsx@@ -40,17 +40,17 @@ export default function Goals() {return (<div className="h-full flex flex-col overflow-hidden">{/* Header */}- <div className="flex items-center justify-between px-6 py-4 border-b border-port-border bg-port-card">- <div className="flex items-center gap-3">- <Target className="w-6 h-6 text-port-accent" />- <h1 className="text-xl font-semibold text-white">Goals</h1>+ <div className="flex items-center justify-between px-4 sm:px-6 py-3 sm:py-4 border-b border-port-border bg-port-card">+ <div className="flex items-center gap-2 sm:gap-3 min-w-0">+ <Target className="w-5 h-5 sm:w-6 sm:h-6 text-port-accent shrink-0" />+ <h1 className="text-lg sm:text-xl font-semibold text-white">Goals</h1>{data && (- <span className="text-sm text-gray-500">- {data.flat?.length || 0} goals+ <span className="text-xs sm:text-sm text-gray-500">+ {data.flat?.length || 0}</span>)}</div>- <div className="flex items-center gap-3">+ <div className="flex items-center gap-2 sm:gap-3"><buttononClick={() => { setLoading(true); loadData(); }}className="p-2 rounded-lg text-gray-400 hover:text-white hover:bg-port-border/50"@@ -66,14 +66,14 @@ export default function Goals() {<buttonkey={t.id}onClick={() => handleTabChange(t.id)}- className={`flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${+ className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 rounded-md text-sm font-medium transition-colors ${active? 'bg-port-accent text-white': 'text-gray-400 hover:text-white'}`}><Icon className="w-4 h-4" />- {t.label}+ <span className="hidden sm:inline">{t.label}</span></button>);})}