Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(remote): make session project-id decoration best effort and keep test-asserted CSS formatting

koeriaa80b9ab386c1
diff --git a/apps/desktop/src/components/remote/RemoteProjectGroups.tsx b/apps/desktop/src/components/remote/RemoteProjectGroups.tsx
index 1c0091429..cfbbc4c89 100644
--- a/apps/desktop/src/components/remote/RemoteProjectGroups.tsx
+++ b/apps/desktop/src/components/remote/RemoteProjectGroups.tsx
@@ -59,11 +59,7 @@ export function RemoteProjectGroups({
return (
<>
{groups.map(({ project, sessions }) => {
- const runSummary = summarizeProjectRuns(
- sessions,
- runningSessions,
- pendingPermissions,
- );
+ const runSummary = summarizeProjectRuns(sessions, runningSessions, pendingPermissions);
const runIsLive = projectRunSummaryIsLive(runSummary);
const showRunBadge = runAffordances.badge && runIsLive;
const showRunRail = runAffordances.rail && runIsLive;
diff --git a/apps/desktop/src/styles/sidebar-threads.css b/apps/desktop/src/styles/sidebar-threads.css
index 63abde14a..cdfa111ed 100644
--- a/apps/desktop/src/styles/sidebar-threads.css
+++ b/apps/desktop/src/styles/sidebar-threads.css
@@ -9,9 +9,7 @@
min-height: 28px;
border-radius: var(--radius-sm);
color: var(--ds-text-secondary);
- transition:
- background var(--motion-duration-fast) var(--motion-ease-out),
- color var(--motion-duration-fast) var(--motion-ease-out);
+ transition: background var(--motion-duration-fast) var(--motion-ease-out), color var(--motion-duration-fast) var(--motion-ease-out);
}
.thread-item {
@@ -97,9 +95,7 @@
/* Window blur releases hover, not selection or drag feedback. */
.sidebar[data-window-blur="true"] .thread-item:hover:not(.active),
-.sidebar[data-window-blur="true"]
- .project-group:not(.is-drop-target)
- > .sidebar-session-group-header:hover {
+.sidebar[data-window-blur="true"] .project-group:not(.is-drop-target) > .sidebar-session-group-header:hover {
background: transparent;
color: var(--ds-text-secondary);
}
@@ -255,8 +251,7 @@
grid-template-rows: 1fr;
margin-left: 13px;
padding-left: 9px;
- transition: grid-template-rows var(--motion-duration-normal)
- var(--motion-ease-out);
+ transition: grid-template-rows var(--motion-duration-normal) var(--motion-ease-out);
}
.sidebar-session-group-body.project.collapsed {
@@ -296,9 +291,7 @@
color: var(--ds-text-muted);
font-size: var(--text-xs-plus);
text-align: left;
- transition:
- background var(--motion-duration-fast) var(--motion-ease-out),
- color var(--motion-duration-fast) var(--motion-ease-out);
+ transition: background var(--motion-duration-fast) var(--motion-ease-out), color var(--motion-duration-fast) var(--motion-ease-out);
}
.sidebar-load-more:hover {
@@ -372,6 +365,8 @@
background: var(--ds-bg-active);
}
+
+
/* ============================================================
Project-level running affordances: count badge + activity rail.
diff --git a/packages/host-runtime/src/host-ports.ts b/packages/host-runtime/src/host-ports.ts
index 250bdd6db..7049965cc 100644
--- a/packages/host-runtime/src/host-ports.ts
+++ b/packages/host-runtime/src/host-ports.ts
@@ -118,15 +118,23 @@ export async function withSessionProjectIds(
host: HostRpc,
records: HostSessionRecord[],
): Promise<SessionSummary[]> {
- const needsLookup = records.some((record) => record.projectPath);
+ const needsLookup = records.some(
+ (record) => record.projectPath && !record.projectId,
+ );
const byPath = new Map<string, string>();
if (needsLookup) {
- const { projects } = await host.call<{ projects?: ProjectRow[] }>(
- "projects.list",
- {},
- );
- for (const project of projects ?? [])
- byPath.set(project.path, String(project.id));
+ // Best effort: decoration must never break the session read itself.
+ // Hosts that predate the projects table (or harnesses / reduced-RPC
+ // connections) reject `projects.list`; an undecorated summary only loses
+ // its group affiliation, while a thrown error wedges prompt admission.
+ try {
+ const { projects } = await host.call<{ projects?: ProjectRow[] }>(
+ "projects.list",
+ {},
+ );
+ for (const project of projects ?? [])
+ byPath.set(project.path, String(project.id));
+ } catch {}
}
return records.map((record) => {
const summary = toSessionSummary(record);