Merge remote-tracking branch 'origin/eric/dev' into eric/dev

This commit is contained in:
ciregenz
2026-06-14 07:44:15 -07:00
6 changed files with 21 additions and 27 deletions
+4 -4
View File
@@ -61,8 +61,8 @@ def _delete(dashboard_id: str):
os.remove(path)
def _migrate_if_needed():
"""One-time migration: if no dashboards exist, create 'Dashboard 1' from old layout."""
def migrate_if_needed():
"""One-time migration: if no dashboards exist, create the default from old layout."""
existing = _load_all()
if existing:
return
@@ -80,7 +80,7 @@ def _migrate_if_needed():
except Exception:
logger.exception("Failed to read old layout.json, using empty layout")
dashboard = Dashboard(name="Dashboard 1", layout=layout)
dashboard = Dashboard(name="Untitled Dashboard", layout=layout)
_save(dashboard)
logger.info(f"Created default dashboard: {dashboard.id}")
@@ -105,7 +105,7 @@ def _migrate_if_needed():
@asynccontextmanager
async def dashboards_lifespan():
os.makedirs(DATA_DIR, exist_ok=True)
_migrate_if_needed()
migrate_if_needed()
yield
+1 -1
View File
@@ -143,7 +143,7 @@ def test_migration_survives_corrupt_session(tmp_path, monkeypatch):
(sess_dir / "good.json").write_text(json.dumps({"id": "good"}))
(sess_dir / "bad.json").write_text("{ truncated ,,,")
dmod._migrate_if_needed() # must not raise despite the corrupt session
dmod.migrate_if_needed() # must not raise despite the corrupt session
dashboards = dmod._load_all()
assert len(dashboards) == 1
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "openswarm",
"version": "1.2.77",
"version": "1.2.84",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "openswarm",
"version": "1.2.77",
"version": "1.2.84",
"hasInstallScript": true,
"dependencies": {
"electron-updater": "6.8.3",
+11 -9
View File
@@ -1,6 +1,6 @@
{
"name": "openswarm",
"version": "1.2.83",
"version": "1.2.84",
"description": "OpenSwarm — AI Agent Orchestrator",
"author": "openswarm-ai",
"main": "main.js",
@@ -51,7 +51,16 @@
"category": "public.app-category.developer-tools",
"hardenedRuntime": true,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist"
"entitlementsInherit": "build/entitlements.mac.plist",
"extraResources": [
{
"from": "build-staging/mouseclamp/${arch}",
"to": "mouseclamp",
"filter": [
"**/*"
]
}
]
},
"dmg": {
"artifactName": "OpenSwarm-${arch}.${ext}",
@@ -149,13 +158,6 @@
"**/*"
]
},
{
"from": "build-staging/mouseclamp/${arch}",
"to": "mouseclamp",
"filter": [
"**/*"
]
},
{
"from": "build-staging/uv-bin/${arch}",
"to": "backend/uv-bin",
@@ -215,12 +215,7 @@ export function useAgentSpawn({
(s) => s.status !== 'draft' && s.dashboard_id === dashboardId,
).length;
const NAME_GEN_TRIGGERS = [1, 3, 6];
const currentDash = store.getState().dashboards.items[dashboardId];
const canAutoName =
currentDash &&
(currentDash.auto_named || currentDash.name === 'Untitled Dashboard');
if (NAME_GEN_TRIGGERS.includes(agentCount) && canAutoName) {
if (NAME_GEN_TRIGGERS.includes(agentCount)) {
dispatch(generateDashboardName(dashboardId));
}
}
@@ -255,16 +255,13 @@ export function useDashboardLifecycle({
const namedOnFirstMessageRef = useRef<string | null>(null);
useEffect(() => {
if (!dashboardId || !layoutInitialized) return;
if (!dashboardId) return;
if (namedOnFirstMessageRef.current === dashboardId) return;
const dash = store.getState().dashboards.items[dashboardId];
if (!dash) return;
if (!dash.auto_named && dash.name !== 'Untitled Dashboard') return;
const hasUserMessage = Object.values(sessions).some(
(s) => s.dashboard_id === dashboardId && s.messages?.some((m) => m.role === 'user'),
);
if (!hasUserMessage) return;
namedOnFirstMessageRef.current = dashboardId;
dispatch(generateDashboardName(dashboardId));
}, [sessions, dashboardId, layoutInitialized, dispatch]);
}, [sessions, dashboardId, dispatch]);
}