diff --git a/src/servers/api/command-hq/router.ts b/src/servers/api/command-hq/router.ts index 74301230..1e40c8f3 100644 --- a/src/servers/api/command-hq/router.ts +++ b/src/servers/api/command-hq/router.ts @@ -265,6 +265,9 @@ commandHqRouter.get('/commanders', async (ctx) => { // until then the transcript still reports the opening brief, and the row is the only source that is // right from the start. ...(row.name ? { title: row.name } : {}), + // Its directory name, which is also its id. Shown beside the title so the owner can tell which + // `commanders//` on disk a card is, without opening it and reading a path out of a tool call. + dirName: row.dirName, categoryId: row.categoryId, tagIds: tagsByRow.get(row.id) ?? [], running: runningById.get(row.sessionId!) ?? false, diff --git a/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqGrid.tsx b/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqGrid.tsx index 3a31678e..1438e0ff 100644 --- a/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqGrid.tsx +++ b/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqGrid.tsx @@ -72,6 +72,16 @@ const Card = ({ commander, to, selected, onDeleted }: CardProps) => {
{commander.title} + {/* Its directory name, which is its id. Nobody but the owner needs it, and the owner wants to know + which `commanders//` they are looking at without opening the thing to find out. */} + {commander.dirName && ( + + #{commander.dirName} + + )}
diff --git a/src/workspaces/officerdev/src/apps/CommandHQ/types.ts b/src/workspaces/officerdev/src/apps/CommandHQ/types.ts index 81a2e3fd..58d642c9 100644 --- a/src/workspaces/officerdev/src/apps/CommandHQ/types.ts +++ b/src/workspaces/officerdev/src/apps/CommandHQ/types.ts @@ -33,6 +33,8 @@ export type CommandHqCategoryFilter = number | 'none' | undefined; export type CommandHqCommander = { id: string; title: string; + /** Its directory under `commanders/`, which is also its id — shown on the card beside the title. */ + dirName?: string | null; cwd: string; createdAt: string; updatedAt: string;