feat: workspace-level sidebar shortcuts with shortcut badges and desktop tabs extraction

This commit is contained in:
Mohamed Boudra
2026-03-03 20:56:42 +07:00
parent 73eabd2eea
commit 74ac17f910
22 changed files with 1287 additions and 629 deletions
+34 -1
View File
@@ -1,5 +1,9 @@
import { describe, expect, it } from "vitest";
import { deriveRemoteProjectKey, groupAgents } from "./agent-grouping";
import {
deriveProjectDisplayName,
deriveRemoteProjectKey,
groupAgents,
} from "./agent-grouping";
import type { AggregatedAgent } from "@/hooks/use-aggregated-agents";
function makeAgent(overrides: Partial<AggregatedAgent> = {}): AggregatedAgent {
@@ -35,6 +39,35 @@ describe("deriveRemoteProjectKey", () => {
});
});
describe("deriveProjectDisplayName", () => {
it("shows owner/repo for GitHub remote keys", () => {
expect(
deriveProjectDisplayName({
projectKey: "remote:github.com/getpaseo/paseo",
projectName: "paseo",
})
).toBe("getpaseo/paseo");
});
it("shows remote path for non-GitHub remote keys", () => {
expect(
deriveProjectDisplayName({
projectKey: "remote:gitlab.example.com/group/repo",
projectName: "repo",
})
).toBe("group/repo");
});
it("falls back to projectName for local keys", () => {
expect(
deriveProjectDisplayName({
projectKey: "/Users/me/dev/paseo",
projectName: "paseo",
})
).toBe("paseo");
});
});
describe("groupAgents", () => {
it("groups active agents by remote URL when available", () => {
const agents = [