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

refactor: merge Eyes into Body tab, promote POST to top-level page

Adam Eivy9aae058a2d21
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 4b5c0f4992..63d63f68e5 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -5,6 +5,8 @@
- Life Calendar tile on MeatSpace Overview linking to full calendar view
## Changed
+- Merged Eyes tab into Body tab — eye prescriptions now appear below body composition chart
+- POST promoted to top-level page outside MeatSpace
- Life Calendar redesigned as admin dashboard: summary bar + side-by-side grid/stats layout on desktop, compact time-remaining sidebar, inline activity budget card
- Years view uses fluid CSS grid cells that fill available card width
- Months view shows decade-per-row with flex-wrap (no horizontal scrolling)
@@ -18,3 +20,5 @@
- App refresh-config and detection now auto-detect buildCommand from package.json, enabling Build button for apps with production builds
## Removed
+- Eyes tab removed from MeatSpace (consolidated into Body tab)
+- POST tab removed from MeatSpace (now a standalone top-level page)
diff --git a/CLAUDE.md b/CLAUDE.md
index 34a2d697b1..7f68f7cea8 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -81,6 +81,8 @@ When CoS agents or AI tools work on managed apps outside PortOS, all research, p
- **Functional programming** - no classes, use hooks in React
- **Zod validation** - all route inputs validated via `lib/validation.js`
- **Command allowlist** - shell execution restricted to approved commands only
+- **Mobile responsive** - all pages should be mobile responsive friendly
+- **Above the fold** - keep actionable content and info above the fold and design pages for maximum information and acess without scrolling
- **No hardcoded localhost** - use `window.location.hostname` for URLs; app accessed via Tailscale remotely
- **Alphabetical navigation** - sidebar nav items in `Layout.jsx` are alphabetically ordered after the Dashboard+CyberCity top section and separator; children within collapsible sections are also alphabetical
- **Reactive UI updates** - after mutations (delete, create, update), update local state directly instead of refetching the entire list from the server. Use `setState(prev => prev.filter(...))` or similar patterns for immediate feedback
diff --git a/client/src/App.jsx b/client/src/App.jsx
index b94a55a4a0..8b22842bb6 100644
--- a/client/src/App.jsx
+++ b/client/src/App.jsx
@@ -20,6 +20,7 @@ import Jira from './pages/Jira';
import Insights from './pages/Insights';
import Instances from './pages/Instances';
import MeatSpace from './pages/MeatSpace';
+import Post from './pages/Post';
// Auto-reload on stale chunk errors (e.g., after a rebuild changes chunk hashes)
// Uses sessionStorage to prevent infinite reload loops (max 1 reload per session)
@@ -110,6 +111,7 @@ export default function App() {
<Route path="instances" element={<Instances />} />
<Route path="meatspace" element={<Navigate to="/meatspace/overview" replace />} />
<Route path="meatspace/:tab" element={<MeatSpace />} />
+ <Route path="post" element={<Post />} />
<Route path="messages" element={<Navigate to="/messages/inbox" replace />} />
<Route path="messages/:tab" element={<Messages />} />
<Route path="jira" element={<Navigate to="/devtools/jira" replace />} />
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index 60eea79670..c804050ac0 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -48,7 +48,6 @@ import {
HeartPulse,
ClipboardList,
Compass,
- Eye,
Scale,
LayoutDashboard,
Lightbulb,
@@ -168,13 +167,11 @@ const navItems = [
{ to: '/meatspace/blood', label: 'Blood', icon: HeartPulse },
{ to: '/meatspace/body', label: 'Body', icon: Scale },
{ to: '/meatspace/calendar', label: 'Calendar', icon: Calendar },
- { to: '/meatspace/eyes', label: 'Eyes', icon: Eye },
{ to: '/meatspace/genome', label: 'Genome', icon: Dna },
{ to: '/meatspace/health', label: 'Health', icon: Heart },
{ to: '/meatspace/import', label: 'Import', icon: Upload },
{ to: '/meatspace/lifestyle', label: 'Lifestyle', icon: ClipboardList },
{ to: '/meatspace/overview', label: 'Overview', icon: Activity },
- { to: '/meatspace/post', label: 'POST', icon: Zap }
]
},
{
@@ -187,6 +184,7 @@ const navItems = [
{ to: '/messages/config', label: 'Config', icon: Settings }
]
},
+ { to: '/post', label: 'POST', icon: Zap, single: true },
{ to: '/security', label: 'Security', icon: Camera, single: true },
{ to: '/settings', label: 'Settings', icon: Settings, single: true },
{ to: '/shell', label: 'Shell', icon: SquareTerminal, single: true },
@@ -622,6 +620,7 @@ export default function Layout() {
location.pathname.startsWith('/insights') ||
location.pathname.startsWith('/meatspace') ||
location.pathname.startsWith('/messages') ||
+ location.pathname === '/post' ||
location.pathname.startsWith('/agents') ||
location.pathname === '/shell' ||
location.pathname.startsWith('/city') ||
diff --git a/client/src/components/meatspace/constants.js b/client/src/components/meatspace/constants.js
index 18b06ce813..55aebf8e37 100644
--- a/client/src/components/meatspace/constants.js
+++ b/client/src/components/meatspace/constants.js
@@ -1,17 +1,14 @@
import {
- Skull,
Beer,
Calendar,
Clock,
Dna,
- Eye,
HeartPulse,
ClipboardList,
Activity,
Scale,
Stethoscope,
- Upload,
- Zap
+ Upload
} from 'lucide-react';
export const TABS = [
@@ -21,12 +18,10 @@ export const TABS = [
{ id: 'blood', label: 'Blood', icon: HeartPulse },
{ id: 'body', label: 'Body', icon: Scale },
{ id: 'calendar', label: 'Calendar', icon: Calendar },
- { id: 'eyes', label: 'Eyes', icon: Eye },
{ id: 'genome', label: 'Genome', icon: Dna },
{ id: 'health', label: 'Health', icon: Stethoscope },
{ id: 'import', label: 'Import', icon: Upload },
{ id: 'lifestyle', label: 'Lifestyle', icon: ClipboardList },
- { id: 'post', label: 'POST', icon: Zap }
];
// Lifestyle adjustment table for death clock
diff --git a/client/src/components/meatspace/tabs/BodyTab.jsx b/client/src/components/meatspace/tabs/BodyTab.jsx
index dd7ca62a3d..2ea2c245d1 100644
--- a/client/src/components/meatspace/tabs/BodyTab.jsx
+++ b/client/src/components/meatspace/tabs/BodyTab.jsx
@@ -1,9 +1,90 @@
-import { Scale } from 'lucide-react';
+import { useState, useEffect } from 'react';
+import { Scale, Eye, Plus, Pencil, Trash2, Check, X } from 'lucide-react';
+import * as api from '../../../services/api';
+import BrailleSpinner from '../../BrailleSpinner';
import BodyCompChart from '../BodyCompChart';
+const EMPTY_EYE_FORM = {
+ date: '', leftSphere: '', leftCylinder: '', leftAxis: '',
+ rightSphere: '', rightCylinder: '', rightAxis: ''
+};
+
+function formatSph(val) {
+ if (val == null) return '\u2014';
+ return (val > 0 ? '+' : '') + val.toFixed(2);
+}
+
+function parseNum(v) {
+ if (v === '' || v === null || v === undefined) return null;
+ const n = parseFloat(v);
+ return isNaN(n) ? null : n;
+}
+
+function buildEyePayload(form) {
+ const payload = { date: form.date };
+ for (const key of ['leftSphere', 'leftCylinder', 'leftAxis', 'rightSphere', 'rightCylinder', 'rightAxis']) {
+ const v = parseNum(form[key]);
+ if (v !== null) payload[key] = v;
+ }
+ return payload;
+}
+
export default function BodyTab() {
+ const [eyeData, setEyeData] = useState(null);
+ const [eyeLoading, setEyeLoading] = useState(true);
+ const [showEyeForm, setShowEyeForm] = useState(false);
+ const [eyeForm, setEyeForm] = useState(EMPTY_EYE_FORM);
+ const [editingEyeIdx, setEditingEyeIdx] = useState(null);
+
+ useEffect(() => {
+ api.getEyeExams().catch(() => ({ exams: [] })).then(eyes => {
+ setEyeData(eyes);
+ setEyeLoading(false);
+ });
+ }, []);
+
+ const handleAddEye = async () => {
+ if (!eyeForm.date) return;
+ const exam = await api.addEyeExam(buildEyePayload(eyeForm));
+ setEyeData(prev => ({ ...prev, exams: [...(prev?.exams || []), exam] }));
+ setEyeForm(EMPTY_EYE_FORM);
+ setShowEyeForm(false);
+ };
+
+ const startEditEye = (exam, idx) => {
+ setEditingEyeIdx(idx);
+ setEyeForm({
+ date: exam.date,
+ leftSphere: exam.leftSphere ?? '',
+ leftCylinder: exam.leftCylinder ?? '',
+ leftAxis: exam.leftAxis ?? '',
+ rightSphere: exam.rightSphere ?? '',
+ rightCylinder: exam.rightCylinder ?? '',
+ rightAxis: exam.rightAxis ?? ''
+ });
+ };
+
+ const handleUpdateEye = async () => {
+ if (editingEyeIdx == null) return;
+ const updated = await api.updateEyeExam(editingEyeIdx, buildEyePayload(eyeForm));
+ setEyeData(prev => ({
+ ...prev,
+ exams: prev.exams.map((e, i) => i === editingEyeIdx ? updated : e)
+ }));
+ setEditingEyeIdx(null);
+ setEyeForm(EMPTY_EYE_FORM);
+ };
+
+ const handleDeleteEye = async (idx) => {
+ await api.removeEyeExam(idx);
+ setEyeData(prev => ({ ...prev, exams: prev.exams.filter((_, i) => i !== idx) }));
+ };
+
+ const eyeExams = eyeData?.exams || [];
+
return (
<div className="space-y-6">
+ {/* Body Composition */}
<div>
<div className="flex items-center gap-2 mb-3">
<Scale size={18} className="text-port-accent" />
@@ -11,6 +92,154 @@ export default function BodyTab() {
</div>
<BodyCompChart />
</div>
+
+ {/* Eye Prescriptions */}
+ <div>
+ <div className="flex items-center justify-between mb-3">
+ <div className="flex items-center gap-2">
+ <Eye size={18} className="text-blue-400" />
+ <h3 className="text-sm font-medium text-gray-400 uppercase tracking-wider">
+ Eye Prescriptions ({eyeLoading ? '...' : eyeExams.length})
+ </h3>
+ </div>
+ {!showEyeForm && editingEyeIdx == null && (
+ <button
+ onClick={() => { setShowEyeForm(true); setEyeForm({ ...EMPTY_EYE_FORM, date: new Date().toISOString().split('T')[0] }); }}
+ className="flex items-center gap-1 text-xs text-port-accent hover:text-blue-300 transition-colors"
+ >
+ <Plus size={14} /> Add Exam
+ </button>
+ )}
+ </div>
+
+ {(showEyeForm || editingEyeIdx != null) && (
+ <div className="bg-port-card border border-port-border rounded-xl p-4 mb-3">
+ <h4 className="text-sm font-medium text-gray-300 mb-3">
+ {editingEyeIdx != null ? 'Edit Eye Exam' : 'New Eye Exam'}
+ </h4>
+ <div className="grid grid-cols-7 gap-2 mb-3">
+ <div>
+ <label className="text-xs text-gray-500">Date</label>
+ <input type="date" value={eyeForm.date}
+ onChange={e => setEyeForm(f => ({ ...f, date: e.target.value }))}
+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
+ </div>
+ <div>
+ <label className="text-xs text-gray-500">L SPH</label>
+ <input type="number" step="0.25" value={eyeForm.leftSphere}
+ onChange={e => setEyeForm(f => ({ ...f, leftSphere: e.target.value }))}
+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
+ </div>
+ <div>
+ <label className="text-xs text-gray-500">L CYL</label>
+ <input type="number" step="0.25" value={eyeForm.leftCylinder}
+ onChange={e => setEyeForm(f => ({ ...f, leftCylinder: e.target.value }))}
+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
+ </div>
+ <div>
+ <label className="text-xs text-gray-500">L AXIS</label>
+ <input type="number" step="1" min="0" max="180" value={eyeForm.leftAxis}
+ onChange={e => setEyeForm(f => ({ ...f, leftAxis: e.target.value }))}
+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
+ </div>
+ <div>
+ <label className="text-xs text-gray-500">R SPH</label>
+ <input type="number" step="0.25" value={eyeForm.rightSphere}
+ onChange={e => setEyeForm(f => ({ ...f, rightSphere: e.target.value }))}
+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
+ </div>
+ <div>
+ <label className="text-xs text-gray-500">R CYL</label>
+ <input type="number" step="0.25" value={eyeForm.rightCylinder}
+ onChange={e => setEyeForm(f => ({ ...f, rightCylinder: e.target.value }))}
+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
+ </div>
+ <div>
+ <label className="text-xs text-gray-500">R AXIS</label>
+ <input type="number" step="1" min="0" max="180" value={eyeForm.rightAxis}
+ onChange={e => setEyeForm(f => ({ ...f, rightAxis: e.target.value }))}
+ className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
+ </div>
+ </div>
+ <div className="flex gap-2">
+ <button
+ onClick={editingEyeIdx != null ? handleUpdateEye : handleAddEye}
+ disabled={!eyeForm.date}
+ className="flex items-center gap-1 px-3 py-1 bg-port-accent/20 text-port-accent rounded text-sm hover:bg-port-accent/30 disabled:opacity-40"
+ >
+ <Check size={14} /> {editingEyeIdx != null ? 'Save' : 'Add'}
+ </button>
+ <button
+ onClick={() => { setShowEyeForm(false); setEditingEyeIdx(null); setEyeForm(EMPTY_EYE_FORM); }}
+ className="flex items-center gap-1 px-3 py-1 text-gray-400 hover:text-gray-200 text-sm"
+ >
+ <X size={14} /> Cancel
+ </button>
+ </div>
+ </div>
+ )}
+
+ {eyeLoading ? (
+ <div className="flex justify-center py-12">
+ <BrailleSpinner text="Loading eye data" />
+ </div>
+ ) : eyeExams.length === 0 ? (
+ <div className="bg-port-card border border-port-border rounded-xl p-6">
+ <p className="text-gray-500 text-sm">No eye exam data. Import your health spreadsheet or add exams manually.</p>
+ </div>
+ ) : (
+ <div className="bg-port-card border border-port-border rounded-xl overflow-hidden">
+ <table className="w-full text-sm">
+ <thead>
+ <tr className="text-xs text-gray-500 uppercase border-b border-port-border">
+ <th className="text-left py-2 px-3">Date</th>
+ <th className="text-right py-2 px-2">L SPH</th>
+ <th className="text-right py-2 px-2">L CYL</th>
+ <th className="text-right py-2 px-2">L AXIS</th>
+ <th className="text-right py-2 px-2">R SPH</th>
+ <th className="text-right py-2 px-2">R CYL</th>
+ <th className="text-right py-2 px-2">R AXIS</th>
+ <th className="w-16"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {[...eyeExams].reverse().map((exam, revIdx) => {
+ const realIdx = eyeExams.length - 1 - revIdx;
+ return (
+ <tr key={realIdx} className="border-b border-port-border/50 hover:bg-port-bg/30">
+ <td className="py-1.5 px-3 font-mono text-gray-400">{exam.date}</td>
+ <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.leftSphere)}</td>
+ <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.leftCylinder)}</td>
+ <td className="py-1.5 px-2 text-right font-mono text-gray-300">{exam.leftAxis != null ? `${exam.leftAxis}\u00B0` : '\u2014'}</td>
+ <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.rightSphere)}</td>
+ <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.rightCylinder)}</td>
+ <td className="py-1.5 px-2 text-right font-mono text-gray-300">{exam.rightAxis != null ? `${exam.rightAxis}\u00B0` : '\u2014'}</td>
+ <td className="py-1.5 px-2 text-right">
+ <div className="flex items-center justify-end gap-1">
+ <button
+ onClick={() => startEditEye(exam, realIdx)}
+ className="p-1 text-gray-600 hover:text-port-accent transition-colors"
+ title="Edit"
+ >
+ <Pencil size={12} />
+ </button>
+ <button
+ onClick={() => handleDeleteEye(realIdx)}
+ className="p-1 text-gray-600 hover:text-port-error transition-colors"
+ title="Delete"
+ >
+ <Trash2 size={12} />
+ </button>
+ </div>
+ </td>
+ </tr>
+ );
+ })}
+ </tbody>
+ </table>
+ </div>
+ )}
+ </div>
</div>
);
}
diff --git a/client/src/components/meatspace/tabs/EyesTab.jsx b/client/src/components/meatspace/tabs/EyesTab.jsx
deleted file mode 100644
index ee7391dbc2..0000000000
--- a/client/src/components/meatspace/tabs/EyesTab.jsx
+++ /dev/null
@@ -1,239 +0,0 @@
-import { useState, useEffect, useCallback } from 'react';
-import { Eye, Plus, Pencil, Trash2, Check, X } from 'lucide-react';
-import * as api from '../../../services/api';
-import BrailleSpinner from '../../BrailleSpinner';
-
-const EMPTY_EYE_FORM = {
- date: '', leftSphere: '', leftCylinder: '', leftAxis: '',
- rightSphere: '', rightCylinder: '', rightAxis: ''
-};
-
-function formatSph(val) {
- if (val == null) return '\u2014';
- return (val > 0 ? '+' : '') + val.toFixed(2);
-}
-
-export default function EyesTab() {
- const [eyeData, setEyeData] = useState(null);
- const [loading, setLoading] = useState(true);
- const [refreshKey, setRefreshKey] = useState(0);
- const [showEyeForm, setShowEyeForm] = useState(false);
- const [eyeForm, setEyeForm] = useState(EMPTY_EYE_FORM);
- const [editingEyeIdx, setEditingEyeIdx] = useState(null);
-
- const fetchData = useCallback(async () => {
- const eyes = await api.getEyeExams().catch(() => ({ exams: [] }));
- setEyeData(eyes);
- setLoading(false);
- }, []);
-
- useEffect(() => {
- fetchData();
- }, [fetchData, refreshKey]);
-
- const parseNum = (v) => {
- if (v === '' || v === null || v === undefined) return null;
- const n = parseFloat(v);
- return isNaN(n) ? null : n;
- };
-
- const buildEyePayload = (form) => {
- const payload = { date: form.date };
- for (const key of ['leftSphere', 'leftCylinder', 'leftAxis', 'rightSphere', 'rightCylinder', 'rightAxis']) {
- const v = parseNum(form[key]);
- if (v !== null) payload[key] = v;
- }
- return payload;
- };
-
- const handleAddEye = async () => {
- if (!eyeForm.date) return;
- await api.addEyeExam(buildEyePayload(eyeForm));
- setEyeForm(EMPTY_EYE_FORM);
- setShowEyeForm(false);
- setRefreshKey(k => k + 1);
- };
-
- const startEditEye = (exam, idx) => {
- setEditingEyeIdx(idx);
- setEyeForm({
- date: exam.date,
- leftSphere: exam.leftSphere ?? '',
- leftCylinder: exam.leftCylinder ?? '',
- leftAxis: exam.leftAxis ?? '',
- rightSphere: exam.rightSphere ?? '',
- rightCylinder: exam.rightCylinder ?? '',
- rightAxis: exam.rightAxis ?? ''
- });
- };
-
- const handleUpdateEye = async () => {
- if (editingEyeIdx == null) return;
- await api.updateEyeExam(editingEyeIdx, buildEyePayload(eyeForm));
- setEditingEyeIdx(null);
- setEyeForm(EMPTY_EYE_FORM);
- setRefreshKey(k => k + 1);
- };
-
- const handleDeleteEye = async (idx) => {
- await api.removeEyeExam(idx);
- setRefreshKey(k => k + 1);
- };
-
- if (loading) {
- return (
- <div className="flex justify-center py-12">
- <BrailleSpinner text="Loading eye data" />
- </div>
- );
- }
-
- const eyeExams = eyeData?.exams || [];
-
- return (
- <div className="space-y-6">
- <div>
- <div className="flex items-center justify-between mb-3">
- <div className="flex items-center gap-2">
- <Eye size={18} className="text-blue-400" />
- <h3 className="text-sm font-medium text-gray-400 uppercase tracking-wider">
- Eye Prescriptions ({eyeExams.length})
- </h3>
- </div>
- {!showEyeForm && editingEyeIdx == null && (
- <button
- onClick={() => { setShowEyeForm(true); setEyeForm({ ...EMPTY_EYE_FORM, date: new Date().toISOString().split('T')[0] }); }}
- className="flex items-center gap-1 text-xs text-port-accent hover:text-blue-300 transition-colors"
- >
- <Plus size={14} /> Add Exam
- </button>
- )}
- </div>
-
- {(showEyeForm || editingEyeIdx != null) && (
- <div className="bg-port-card border border-port-border rounded-xl p-4 mb-3">
- <h4 className="text-sm font-medium text-gray-300 mb-3">
- {editingEyeIdx != null ? 'Edit Eye Exam' : 'New Eye Exam'}
- </h4>
- <div className="grid grid-cols-7 gap-2 mb-3">
- <div>
- <label className="text-xs text-gray-500">Date</label>
- <input type="date" value={eyeForm.date}
- onChange={e => setEyeForm(f => ({ ...f, date: e.target.value }))}
- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
- </div>
- <div>
- <label className="text-xs text-gray-500">L SPH</label>
- <input type="number" step="0.25" value={eyeForm.leftSphere}
- onChange={e => setEyeForm(f => ({ ...f, leftSphere: e.target.value }))}
- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
- </div>
- <div>
- <label className="text-xs text-gray-500">L CYL</label>
- <input type="number" step="0.25" value={eyeForm.leftCylinder}
- onChange={e => setEyeForm(f => ({ ...f, leftCylinder: e.target.value }))}
- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
- </div>
- <div>
- <label className="text-xs text-gray-500">L AXIS</label>
- <input type="number" step="1" min="0" max="180" value={eyeForm.leftAxis}
- onChange={e => setEyeForm(f => ({ ...f, leftAxis: e.target.value }))}
- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
- </div>
- <div>
- <label className="text-xs text-gray-500">R SPH</label>
- <input type="number" step="0.25" value={eyeForm.rightSphere}
- onChange={e => setEyeForm(f => ({ ...f, rightSphere: e.target.value }))}
- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
- </div>
- <div>
- <label className="text-xs text-gray-500">R CYL</label>
- <input type="number" step="0.25" value={eyeForm.rightCylinder}
- onChange={e => setEyeForm(f => ({ ...f, rightCylinder: e.target.value }))}
- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
- </div>
- <div>
- <label className="text-xs text-gray-500">R AXIS</label>
- <input type="number" step="1" min="0" max="180" value={eyeForm.rightAxis}
- onChange={e => setEyeForm(f => ({ ...f, rightAxis: e.target.value }))}
- className="w-full bg-port-bg border border-port-border rounded px-2 py-1 text-sm text-gray-200 font-mono" />
- </div>
- </div>
- <div className="flex gap-2">
- <button
- onClick={editingEyeIdx != null ? handleUpdateEye : handleAddEye}
- disabled={!eyeForm.date}
- className="flex items-center gap-1 px-3 py-1 bg-port-accent/20 text-port-accent rounded text-sm hover:bg-port-accent/30 disabled:opacity-40"
- >
- <Check size={14} /> {editingEyeIdx != null ? 'Save' : 'Add'}
- </button>
- <button
- onClick={() => { setShowEyeForm(false); setEditingEyeIdx(null); setEyeForm(EMPTY_EYE_FORM); }}
- className="flex items-center gap-1 px-3 py-1 text-gray-400 hover:text-gray-200 text-sm"
- >
- <X size={14} /> Cancel
- </button>
- </div>
- </div>
- )}
-
- {eyeExams.length === 0 ? (
- <div className="bg-port-card border border-port-border rounded-xl p-6">
- <p className="text-gray-500 text-sm">No eye exam data. Import your health spreadsheet or add exams manually.</p>
- </div>
- ) : (
- <div className="bg-port-card border border-port-border rounded-xl overflow-hidden">
- <table className="w-full text-sm">
- <thead>
- <tr className="text-xs text-gray-500 uppercase border-b border-port-border">
- <th className="text-left py-2 px-3">Date</th>
- <th className="text-right py-2 px-2">L SPH</th>
- <th className="text-right py-2 px-2">L CYL</th>
- <th className="text-right py-2 px-2">L AXIS</th>
- <th className="text-right py-2 px-2">R SPH</th>
- <th className="text-right py-2 px-2">R CYL</th>
- <th className="text-right py-2 px-2">R AXIS</th>
- <th className="w-16"></th>
- </tr>
- </thead>
- <tbody>
- {[...eyeExams].reverse().map((exam, revIdx) => {
- const realIdx = eyeExams.length - 1 - revIdx;
- return (
- <tr key={realIdx} className="border-b border-port-border/50 hover:bg-port-bg/30">
- <td className="py-1.5 px-3 font-mono text-gray-400">{exam.date}</td>
- <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.leftSphere)}</td>
- <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.leftCylinder)}</td>
- <td className="py-1.5 px-2 text-right font-mono text-gray-300">{exam.leftAxis != null ? `${exam.leftAxis}\u00B0` : '\u2014'}</td>
- <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.rightSphere)}</td>
- <td className="py-1.5 px-2 text-right font-mono text-gray-300">{formatSph(exam.rightCylinder)}</td>
- <td className="py-1.5 px-2 text-right font-mono text-gray-300">{exam.rightAxis != null ? `${exam.rightAxis}\u00B0` : '\u2014'}</td>
- <td className="py-1.5 px-2 text-right">
- <div className="flex items-center justify-end gap-1">
- <button
- onClick={() => startEditEye(exam, realIdx)}
- className="p-1 text-gray-600 hover:text-port-accent transition-colors"
- title="Edit"
- >
- <Pencil size={12} />
- </button>
- <button
- onClick={() => handleDeleteEye(realIdx)}
- className="p-1 text-gray-600 hover:text-port-error transition-colors"
- title="Delete"
- >
- <Trash2 size={12} />
- </button>
- </div>
- </td>
- </tr>
- );
- })}
- </tbody>
- </table>
- </div>
- )}
- </div>
- </div>
- );
-}
diff --git a/client/src/components/meatspace/tabs/OverviewTab.jsx b/client/src/components/meatspace/tabs/OverviewTab.jsx
index 37c2f0b666..4ca8d349bb 100644
--- a/client/src/components/meatspace/tabs/OverviewTab.jsx
+++ b/client/src/components/meatspace/tabs/OverviewTab.jsx
@@ -314,7 +314,7 @@ export default function OverviewTab() {
icon={Eye}
iconColor="text-cyan-400"
label="Eyes"
- onClick={() => navigate('/meatspace/eyes')}
+ onClick={() => navigate('/meatspace/body')}
metrics={[
{ label: 'Exams', value: eyes?.exams?.length ?? '—' },
{ label: 'Latest', value: latestEye?.date ?? '—' },
diff --git a/client/src/pages/MeatSpace.jsx b/client/src/pages/MeatSpace.jsx
index cd6573449e..2047351650 100644
--- a/client/src/pages/MeatSpace.jsx
+++ b/client/src/pages/MeatSpace.jsx
@@ -9,12 +9,10 @@ import AlcoholTab from '../components/meatspace/tabs/AlcoholTab';
import BloodTab from '../components/meatspace/tabs/BloodTab';
import BodyTab from '../components/meatspace/tabs/BodyTab';
import CalendarTab from '../components/meatspace/tabs/CalendarTab';
-import EyesTab from '../components/meatspace/tabs/EyesTab';
import GenomeTab from '../components/meatspace/tabs/GenomeTab';
import HealthTab from '../components/meatspace/tabs/HealthTab';
import ImportTab from '../components/meatspace/tabs/ImportTab';
import LifestyleTab from '../components/meatspace/tabs/LifestyleTab';
-import PostTab from '../components/meatspace/tabs/PostTab';
export default function MeatSpace() {
const { tab } = useParams();
@@ -39,8 +37,6 @@ export default function MeatSpace() {
return <BodyTab />;
case 'calendar':
return <CalendarTab />;
- case 'eyes':
- return <EyesTab />;
case 'genome':
return <GenomeTab />;
case 'health':
@@ -49,8 +45,6 @@ export default function MeatSpace() {
return <ImportTab />;
case 'lifestyle':
return <LifestyleTab />;
- case 'post':
- return <PostTab />;
default:
return <OverviewTab />;
}
diff --git a/client/src/pages/Post.jsx b/client/src/pages/Post.jsx
new file mode 100644
index 0000000000..b6b6437fdd
--- /dev/null
+++ b/client/src/pages/Post.jsx
@@ -0,0 +1,19 @@
+import { Zap } from 'lucide-react';
+import PostTab from '../components/meatspace/tabs/PostTab';
+
+export default function Post() {
+ return (
+ <div className="flex flex-col h-full">
+ <div className="shrink-0 px-6 pt-6 pb-4 border-b border-port-border">
+ <div className="flex items-center gap-3">
+ <Zap size={24} className="text-port-warning" />
+ <h1 className="text-2xl font-bold text-white">POST</h1>
+ <span className="text-sm text-gray-500">Physical Observation &amp; Screening Tests</span>
+ </div>
+ </div>
+ <div className="flex-1 overflow-auto p-6">
+ <PostTab />
+ </div>
+ </div>
+ );
+}