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(apps): tighten apps header — "+ Add App" → "+ Add" and move icon detection per-app

Adam Eivyc5acb7e0e8c5
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 460ad78329..f608b5c78f 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -30,6 +30,8 @@
## Changed
+- **Apps page header tightened — "Add App" → "Add", icon detection moved per-app.** The Apps page header had a `+ Add App` button next to a `Detect Icons` button that scanned every registered app's repo on click. Both are noisier than they need to be: the heading already says "Apps" so the button reads `+ Add`, and bulk icon scanning is something you almost never want — you typically want it for the one app you just added. The `Detect Icons` header button is removed and replaced with a per-app `Detect Icon` action in each app's Overview tab Quick Actions row, backed by a new `POST /api/apps/:id/detect-icon` endpoint that scans only that app's repoPath via the existing `detectAppIcon()` service and toasts success/failure. The bulk `POST /api/apps/detect-icons` endpoint is kept for completeness (no UI consumer remains in PortOS itself, but it's a small server route that may still be useful for scripts). Touched: `server/routes/apps.js`, `client/src/{services/apiApps.js,pages/Apps.jsx,components/apps/tabs/OverviewTab.jsx}`.
+
- **Writers Room storyboard Config — inline "Backends" button opens the Image Gen settings drawer.** The Config tab's image gen section already had a Local/Codex backend chip strip, but the chip only appeared when more than one backend was configured — and to enable Codex `$imagegen` you had to leave the Writers Room and navigate to Settings → Image Gen. The Config tab now mirrors the pattern from `ImageGen.jsx`: a small **Backends** gear-button next to the "Image generation" header opens a slide-over `Drawer` hosting the same `<ImageGenTab />` settings UI (deep-linkable via `?settings=imagegen`). When the drawer closes, `getSettings()` is re-fetched so newly-enabled backends surface as chips immediately without a page reload. A warning row also renders when zero backends are configured, pointing the user at the Backends button. Touched: `client/src/components/writers-room/StoryboardPanel.jsx`.
- **Gemini-CLI provider model list updated to current Google releases.** Replaced the deprecated `gemini-2.5-flash-lite` with the current set: `gemini-3.1-pro` (heavy), `gemini-3-flash` (medium), `gemini-2.5-pro`, `gemini-2.5-flash` (light + default). Tier mappings remap: `defaultModel`/`lightModel` → `gemini-2.5-flash`, `mediumModel` → `gemini-3-flash`, `heavyModel` → `gemini-3.1-pro`. The hardcoded gemini-cli fallback in `brain.js` and `writersRoom/evaluator.js` (used when both `defaultModel` and `lightModel` are unset on the provider) now points to `gemini-2.5-flash` instead of `gemini-2.5-flash-lite`. Mirror change applied to the upstream `portos-ai-toolkit` `providers.sample.json` so fresh installs pick up the new defaults. Touched: `data{,sample}/providers.json`, `server/services/{brain.js,brain.test.js,writersRoom/evaluator.js}`, `../portos-ai-toolkit/src/defaults/providers.sample.json`.
diff --git a/client/src/components/apps/tabs/OverviewTab.jsx b/client/src/components/apps/tabs/OverviewTab.jsx
index b2e1994ae4..0b4b19a3d8 100644
--- a/client/src/components/apps/tabs/OverviewTab.jsx
+++ b/client/src/components/apps/tabs/OverviewTab.jsx
@@ -1,5 +1,5 @@
import { useState, useEffect, useMemo } from 'react';
-import { FolderOpen, Terminal, Code, RefreshCw, Wrench, Archive, ArchiveRestore, Ticket, Download, Tag, AlertTriangle, Rocket, Camera } from 'lucide-react';
+import { FolderOpen, Terminal, Code, RefreshCw, Wrench, Archive, ArchiveRestore, Ticket, Download, Tag, AlertTriangle, Rocket, Camera, Image } from 'lucide-react';
import toast from '../../ui/Toast';
import { NON_PM2_TYPES } from '../constants';
import BrailleSpinner from '../../BrailleSpinner';
@@ -23,6 +23,7 @@ export default function OverviewTab({ app, onRefresh }) {
const [jiraTickets, setJiraTickets] = useState(null);
const [loadingTickets, setLoadingTickets] = useState(false);
const [installingScripts, setInstallingScripts] = useState(false);
+ const [detectingIcon, setDetectingIcon] = useState(false);
const onComplete = useMemo(() => () => onRefresh(), [onRefresh]);
const { steps, isOperating, operationType, error, completed, startUpdate, startStandardize } = useAppOperation({ onComplete });
@@ -50,6 +51,19 @@ export default function OverviewTab({ app, onRefresh }) {
const handleStandardize = () => startStandardize(app.id);
+ const handleDetectIcon = async () => {
+ setDetectingIcon(true);
+ const result = await api.detectAppIcon(app.id).catch(() => null);
+ setDetectingIcon(false);
+ if (!result) return;
+ if (result.detected) {
+ toast.success(`Icon detected for ${app.name}`);
+ onRefresh();
+ } else {
+ toast.error(`No icon found for ${app.name}`);
+ }
+ };
+
const missingScripts = app.xcodeScripts?.missing || [];
const handleInstallScripts = async (scriptNames) => {
@@ -280,6 +294,15 @@ export default function OverviewTab({ app, onRefresh }) {
<RefreshCw size={14} className={refreshingConfig ? 'animate-spin' : ''} />
Refresh Config
</button>
+ <button
+ onClick={handleDetectIcon}
+ disabled={detectingIcon}
+ className="px-3 py-1.5 bg-port-border hover:bg-port-border/80 text-white rounded-lg text-xs flex items-center gap-1 disabled:opacity-50"
+ title="Scan the app's repo for an icon/logo"
+ >
+ <Image size={14} />
+ {detectingIcon ? 'Scanning...' : 'Detect Icon'}
+ </button>
{!NON_PM2_TYPES.has(app.type) && (
<button
onClick={handleStandardize}
diff --git a/client/src/pages/Apps.jsx b/client/src/pages/Apps.jsx
index 7dac92d797..4680706e61 100644
--- a/client/src/pages/Apps.jsx
+++ b/client/src/pages/Apps.jsx
@@ -1,6 +1,6 @@
import { useState, useEffect, useCallback } from 'react';
import { Link } from 'react-router-dom';
-import { ExternalLink, Play, Square, RotateCcw, FolderOpen, Terminal, Code, RefreshCw, Wrench, Archive, ArchiveRestore, Ticket, Download, Hammer, Smartphone, Image } from 'lucide-react';
+import { ExternalLink, Play, Square, RotateCcw, FolderOpen, Terminal, Code, RefreshCw, Wrench, Archive, ArchiveRestore, Ticket, Download, Hammer, Smartphone } from 'lucide-react';
import toast from '../components/ui/Toast';
import AppIcon from '../components/AppIcon';
import BrailleSpinner from '../components/BrailleSpinner';
@@ -127,16 +127,6 @@ export default function Apps() {
toast.success(`${app.name} unarchived - included in COS tasks`);
};
- const [detectingIcons, setDetectingIcons] = useState(false);
- const handleDetectIcons = async () => {
- setDetectingIcons(true);
- const result = await api.detectAppIcons().catch(() => null);
- setDetectingIcons(false);
- if (result) {
- toast.success(`Detected icons for ${result.detected} of ${result.total} apps`);
- }
- };
-
// Filter apps based on archive status
const activeApps = apps.filter(app => !app.archived);
const archivedApps = apps.filter(app => app.archived);
@@ -160,15 +150,6 @@ export default function Apps() {
<p className="text-gray-500 text-sm sm:text-base">Manage registered applications</p>
</div>
<div className="flex items-center gap-3">
- <button
- onClick={handleDetectIcons}
- disabled={detectingIcons}
- className="px-3 py-2 rounded-lg text-sm flex items-center gap-2 bg-port-border text-gray-400 hover:text-white transition-colors disabled:opacity-50"
- title="Detect app icons from project directories"
- >
- <Image size={16} />
- {detectingIcons ? 'Detecting...' : 'Detect Icons'}
- </button>
{/* Archive Toggle */}
{archivedApps.length > 0 && (
<button
@@ -187,7 +168,7 @@ export default function Apps() {
to="/apps/create"
className="px-4 py-2 bg-port-accent hover:bg-port-accent/80 text-white rounded-lg transition-colors text-center"
>
- + Add App
+ + Add
</Link>
</div>
</div>
diff --git a/client/src/services/apiApps.js b/client/src/services/apiApps.js
index dc177e6e8c..719bf49c35 100644
--- a/client/src/services/apiApps.js
+++ b/client/src/services/apiApps.js
@@ -67,6 +67,7 @@ export const bulkUpdateAppTaskTypeOverride = (taskType, { enabled }) => request(
body: JSON.stringify({ enabled })
});
export const detectAppIcons = () => request('/apps/detect-icons', { method: 'POST' });
+export const detectAppIcon = (id) => request(`/apps/${id}/detect-icon`, { method: 'POST' });
export const getAppLogs = (id, lines = 100, processName) => {
const params = new URLSearchParams({ lines: String(lines) });
if (processName) params.set('process', processName);
diff --git a/server/routes/apps.js b/server/routes/apps.js
index e5980048f9..8aa94da591 100644
--- a/server/routes/apps.js
+++ b/server/routes/apps.js
@@ -424,6 +424,26 @@ router.post('/detect-icons', asyncHandler(async (req, res) => {
res.json({ success: true, detected, total: apps.length });
}));
+// POST /api/apps/:id/detect-icon - Detect and persist app icon for a single app
+router.post('/:id/detect-icon', loadApp, asyncHandler(async (req, res) => {
+ const app = req.loadedApp;
+ if (!app.repoPath || !await pathExists(app.repoPath)) {
+ throw new ServerError('App repoPath is missing or inaccessible', { status: 400, code: 'INVALID_REPO_PATH' });
+ }
+
+ const iconPath = await detectAppIcon(app.repoPath, app.type);
+ if (!iconPath) {
+ console.log(`🎨 No icon detected for ${app.name}`);
+ res.json({ success: true, detected: false, appIconPath: null });
+ return;
+ }
+
+ await appsService.updateApp(app.id, { appIconPath: iconPath });
+ notifyAppsChanged('detect-icon');
+ console.log(`🎨 Detected icon for ${app.name}: ${iconPath.split('/').pop()}`);
+ res.json({ success: true, detected: true, appIconPath: iconPath });
+}));
+
// GET /api/apps/:id/task-types - Get per-app task type overrides
router.get('/:id/task-types', loadApp, asyncHandler(async (req, res) => {
const app = req.loadedApp;