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

feat: add delete button to history entries, alphabetize nav menu

Adam Eivybabbdb7b07d3
diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx
index 4c035ccc81..801c86ab3c 100644
--- a/client/src/components/Layout.jsx
+++ b/client/src/components/Layout.jsx
@@ -25,30 +25,30 @@ import Logo from './Logo';
const navItems = [
{ to: '/', label: 'Dashboard', icon: Home, single: true },
+ { to: '/create', label: 'Add App', icon: PlusCircle, single: true },
+ {
+ label: 'AI Config',
+ icon: Bot,
+ children: [
+ { to: '/prompts', label: 'Prompts', icon: FileText },
+ { to: '/ai', label: 'Providers', icon: Bot }
+ ]
+ },
{ to: '/apps', label: 'Apps', icon: Package, single: true },
- { to: '/logs', label: 'Logs', icon: FileText, single: true },
+ { href: '//:5560', label: 'Autofixer', icon: Wrench, external: true, dynamicHost: true },
{
label: 'Dev Tools',
icon: Terminal,
children: [
- { to: '/devtools/history', label: 'History', icon: History },
+ { to: '/devtools/agents', label: 'AI Agents', icon: Cpu },
{ to: '/devtools/runner', label: 'Code', icon: Code2 },
{ to: '/devtools/git', label: 'Git Status', icon: GitBranch },
- { to: '/devtools/usage', label: 'Usage', icon: BarChart3 },
+ { to: '/devtools/history', label: 'History', icon: History },
{ to: '/devtools/processes', label: 'Processes', icon: Activity },
- { to: '/devtools/agents', label: 'AI Agents', icon: Cpu }
- ]
- },
- {
- label: 'AI Config',
- icon: Bot,
- children: [
- { to: '/ai', label: 'Providers', icon: Bot },
- { to: '/prompts', label: 'Prompts', icon: FileText }
+ { to: '/devtools/usage', label: 'Usage', icon: BarChart3 }
]
},
- { to: '/create', label: 'Add App', icon: PlusCircle, single: true },
- { href: '//:5560', label: 'Autofixer', icon: Wrench, external: true, dynamicHost: true }
+ { to: '/logs', label: 'Logs', icon: FileText, single: true }
];
const SIDEBAR_KEY = 'portos-sidebar-collapsed';
diff --git a/client/src/pages/DevTools.jsx b/client/src/pages/DevTools.jsx
index d6cafa28bb..aabd39d9a0 100644
--- a/client/src/pages/DevTools.jsx
+++ b/client/src/pages/DevTools.jsx
@@ -1,5 +1,5 @@
import { useState, useEffect, useRef, Fragment } from 'react';
-import { GitBranch, Plus, Minus, FileText, Clock, RefreshCw, Activity, Image, X, XCircle, Cpu, MemoryStick, Terminal } from 'lucide-react';
+import { GitBranch, Plus, Minus, FileText, Clock, RefreshCw, Activity, Image, X, XCircle, Cpu, MemoryStick, Terminal, Trash2 } from 'lucide-react';
import * as api from '../services/api';
import socket from '../services/socket';
@@ -39,6 +39,12 @@ export function HistoryPage() {
loadData();
};
+ const handleDelete = async (id, e) => {
+ e.stopPropagation();
+ await api.deleteHistoryEntry(id);
+ loadData();
+ };
+
const formatTime = (timestamp) => {
const date = new Date(timestamp);
const now = new Date();
@@ -163,7 +169,7 @@ export function HistoryPage() {
{history.map(entry => (
<div key={entry.id}>
<div
- className="p-4 hover:bg-port-border/20 cursor-pointer"
+ className="p-4 hover:bg-port-border/20 cursor-pointer group"
onClick={() => toggleExpand(entry.id)}
>
<div className="flex items-center gap-4">
@@ -187,6 +193,13 @@ export function HistoryPage() {
</div>
<span className={`w-2 h-2 rounded-full flex-shrink-0 ${entry.success ? 'bg-port-success' : 'bg-port-error'}`} />
<span className="text-sm text-gray-500 flex-shrink-0">{formatTime(entry.timestamp)}</span>
+ <button
+ onClick={(e) => handleDelete(entry.id, e)}
+ className="p-1 text-gray-500 hover:text-port-error transition-colors opacity-0 group-hover:opacity-100"
+ title="Delete entry"
+ >
+ <Trash2 size={14} />
+ </button>
</div>
</div>
diff --git a/client/src/services/api.js b/client/src/services/api.js
index c88362e1fc..b89d279ad1 100644
--- a/client/src/services/api.js
+++ b/client/src/services/api.js
@@ -189,6 +189,7 @@ export const clearHistory = (olderThanDays) => request(
olderThanDays ? `/history?olderThanDays=${olderThanDays}` : '/history',
{ method: 'DELETE' }
);
+export const deleteHistoryEntry = (id) => request(`/history/${id}`, { method: 'DELETE' });
// Commands
export const executeCommand = (command, workspacePath) => request('/commands/execute', {
diff --git a/server/routes/history.js b/server/routes/history.js
index 06ad2debee..f9ea3af2f7 100644
--- a/server/routes/history.js
+++ b/server/routes/history.js
@@ -29,6 +29,12 @@ router.get('/actions', async (req, res, next) => {
if (actions) res.json(actions);
});
+// DELETE /api/history/:id - Delete single entry
+router.delete('/:id', async (req, res, next) => {
+ const result = await history.deleteEntry(req.params.id).catch(next);
+ if (result) res.json(result);
+});
+
// DELETE /api/history - Clear history
router.delete('/', async (req, res, next) => {
const olderThanDays = req.query.olderThanDays ? parseInt(req.query.olderThanDays) : null;
diff --git a/server/services/history.js b/server/services/history.js
index 58a325a3b2..55f690d4fe 100644
--- a/server/services/history.js
+++ b/server/services/history.js
@@ -94,6 +94,22 @@ export async function getActionTypes() {
return Array.from(types).sort();
}
+/**
+ * Delete a single history entry by ID
+ */
+export async function deleteEntry(id) {
+ const data = await loadHistory();
+ const index = data.entries.findIndex(e => e.id === id);
+
+ if (index === -1) {
+ return { deleted: false, error: 'Entry not found' };
+ }
+
+ data.entries.splice(index, 1);
+ await saveHistory(data);
+ return { deleted: true };
+}
+
/**
* Clear history (optionally older than days)
*/