@qablehq/atto 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/main/index.js CHANGED
@@ -49,6 +49,11 @@ const IPC_CHANNELS = {
49
49
  listProjectAiBindings: "taa:ai:listBindings",
50
50
  listAiModels: "taa:ai:listModels",
51
51
  getProjectAiUsage: "taa:ai:getProjectUsage",
52
+ /** Tesbo account: the website decides which projects and agents this login can see. */
53
+ tesboStatus: "taa:tesbo:status",
54
+ tesboLogin: "taa:tesbo:login",
55
+ tesboLogout: "taa:tesbo:logout",
56
+ tesboAgents: "taa:tesbo:agents",
52
57
  // Contextual command handling
53
58
  submitCommand: "taa:sessions:submitCommand",
54
59
  getCommandQueue: "taa:sessions:getCommandQueue",
@@ -3071,6 +3076,170 @@ function registerAppStateHandlers() {
3071
3076
  electron.ipcMain.handle(IPC_CHANNELS.getAppState, () => readAppState());
3072
3077
  electron.ipcMain.handle(IPC_CHANNELS.setAppState, (_e, value) => writeAppState(value));
3073
3078
  }
3079
+ const DEFAULT_BASE_URL = "https://api-app-atto.tesbo.io";
3080
+ const ACCESS_HEADER = "x-atto-access-code";
3081
+ function sessionPath() {
3082
+ return node_path.join(electron.app.getPath("userData"), "tesbo-link.json");
3083
+ }
3084
+ function readLink() {
3085
+ try {
3086
+ const parsed = JSON.parse(node_fs.readFileSync(sessionPath(), "utf8"));
3087
+ if (typeof parsed.code !== "string" || !parsed.code.trim()) return null;
3088
+ return { baseUrl: DEFAULT_BASE_URL, code: parsed.code.trim() };
3089
+ } catch {
3090
+ return null;
3091
+ }
3092
+ }
3093
+ function writeLink(link) {
3094
+ const path = sessionPath();
3095
+ node_fs.mkdirSync(electron.app.getPath("userData"), { recursive: true });
3096
+ node_fs.writeFileSync(path, JSON.stringify(link), { mode: 384 });
3097
+ node_fs.chmodSync(path, 384);
3098
+ }
3099
+ function clearLink() {
3100
+ node_fs.rmSync(sessionPath(), { force: true });
3101
+ }
3102
+ function disconnected(error = null) {
3103
+ return { connected: false, baseUrl: DEFAULT_BASE_URL, user: null, workspaces: [], projects: [], error };
3104
+ }
3105
+ async function errorMessage(response) {
3106
+ try {
3107
+ const body = await response.json();
3108
+ if (typeof body.error === "string" && body.error.trim()) return body.error;
3109
+ if (typeof body.message === "string" && body.message.trim()) return body.message;
3110
+ } catch {
3111
+ }
3112
+ return `Tesbo returned ${response.status}`;
3113
+ }
3114
+ async function tesboFetch(link, path, init) {
3115
+ return fetch(`${link.baseUrl}${path}`, {
3116
+ ...init,
3117
+ headers: {
3118
+ accept: "application/json",
3119
+ [ACCESS_HEADER]: link.code,
3120
+ ...{},
3121
+ ...init?.headers
3122
+ }
3123
+ });
3124
+ }
3125
+ function asProjects(value) {
3126
+ if (!Array.isArray(value)) return [];
3127
+ const projects = [];
3128
+ for (const item of value) {
3129
+ if (!item || typeof item !== "object") continue;
3130
+ const row = item;
3131
+ if (typeof row.id !== "string" || typeof row.name !== "string") continue;
3132
+ projects.push({
3133
+ id: row.id,
3134
+ key: typeof row.key === "string" ? row.key : "",
3135
+ name: row.name,
3136
+ role: typeof row.role === "string" ? row.role : "member"
3137
+ });
3138
+ }
3139
+ return projects;
3140
+ }
3141
+ async function loadAccount(link) {
3142
+ const response = await tesboFetch(link, "/api/atto/projects");
3143
+ if (response.status === 401) {
3144
+ clearLink();
3145
+ return disconnected(await errorMessage(response));
3146
+ }
3147
+ if (!response.ok) throw new Error(await errorMessage(response));
3148
+ return {
3149
+ connected: true,
3150
+ baseUrl: link.baseUrl,
3151
+ user: null,
3152
+ workspaces: [],
3153
+ projects: asProjects(await response.json()),
3154
+ error: null
3155
+ };
3156
+ }
3157
+ async function tesboStatus() {
3158
+ const link = readLink();
3159
+ if (!link) return disconnected();
3160
+ try {
3161
+ return await loadAccount(link);
3162
+ } catch (error) {
3163
+ return disconnected(error instanceof Error ? error.message : "Could not reach Tesbo.");
3164
+ }
3165
+ }
3166
+ async function tesboLogin(cmd) {
3167
+ const code = cmd.code.trim();
3168
+ if (!code) throw new Error("Paste the access code from Tesbo.");
3169
+ const link = { baseUrl: DEFAULT_BASE_URL, code };
3170
+ const response = await fetch(`${link.baseUrl}/api/atto/connect`, {
3171
+ method: "POST",
3172
+ headers: { accept: "application/json", "content-type": "application/json" },
3173
+ body: JSON.stringify({ code })
3174
+ });
3175
+ if (!response.ok) throw new Error(await errorMessage(response));
3176
+ writeLink(link);
3177
+ return {
3178
+ connected: true,
3179
+ baseUrl: link.baseUrl,
3180
+ user: null,
3181
+ workspaces: [],
3182
+ projects: asProjects(await response.json()),
3183
+ error: null
3184
+ };
3185
+ }
3186
+ async function tesboLogout() {
3187
+ clearLink();
3188
+ return disconnected();
3189
+ }
3190
+ const SERVER_AGENTS = [
3191
+ {
3192
+ id: "zyra",
3193
+ name: "Zyra the Test Generator",
3194
+ role: "AI testcase generation agent",
3195
+ summary: "Stays on Tesbo for the QAble team. This package does not open the website.",
3196
+ status: "active",
3197
+ detail: null
3198
+ },
3199
+ {
3200
+ id: "nyra",
3201
+ name: "NYRA",
3202
+ role: "App exploration agent",
3203
+ summary: "Stays on Tesbo for the QAble team. This package does not open the website.",
3204
+ status: "active",
3205
+ detail: null
3206
+ }
3207
+ ];
3208
+ const COMING_SOON = [
3209
+ {
3210
+ id: "run-analyst",
3211
+ name: "Run Analyst",
3212
+ role: "Execution insight agent",
3213
+ summary: "Planned for run failure clustering, flaky-test signals, and release risk notes.",
3214
+ status: "coming-soon",
3215
+ detail: null
3216
+ },
3217
+ {
3218
+ id: "bug-triage",
3219
+ name: "Bug Triage",
3220
+ role: "Defect analysis agent",
3221
+ summary: "Planned for duplicate bug checks, severity suggestions, and owner recommendations.",
3222
+ status: "coming-soon",
3223
+ detail: null
3224
+ }
3225
+ ];
3226
+ async function tesboAgents(projectId) {
3227
+ const link = readLink();
3228
+ if (!link) throw new Error("Connect with an access code first.");
3229
+ if (!projectId.trim()) throw new Error("Choose a project.");
3230
+ const status = await loadAccount(link);
3231
+ if (!status.connected) throw new Error(status.error || "This access code has been stopped.");
3232
+ if (!status.projects.some((project) => project.id === projectId)) {
3233
+ throw new Error("This project is not available for this access code.");
3234
+ }
3235
+ return { projectId, agents: [...SERVER_AGENTS, ...COMING_SOON], notice: null };
3236
+ }
3237
+ function registerTesboHandlers() {
3238
+ electron.ipcMain.handle(IPC_CHANNELS.tesboStatus, () => tesboStatus());
3239
+ electron.ipcMain.handle(IPC_CHANNELS.tesboLogin, (_event, cmd) => tesboLogin(cmd));
3240
+ electron.ipcMain.handle(IPC_CHANNELS.tesboLogout, () => tesboLogout());
3241
+ electron.ipcMain.handle(IPC_CHANNELS.tesboAgents, (_event, projectId) => tesboAgents(projectId));
3242
+ }
3074
3243
  const SCHEME = "taa-media";
3075
3244
  const sessionRoots = /* @__PURE__ */ new Map();
3076
3245
  const FIXTURES_ASSETS_DIR = node_path.join(electron.app.getAppPath(), "src/main/engine/mock/fixtures/assets");
@@ -11898,68 +12067,7 @@ function updateFeedUrl() {
11898
12067
  if (process.platform === "linux") return LINUX_FEED;
11899
12068
  return WINDOWS_FEED;
11900
12069
  }
11901
- function readPackageName() {
11902
- const require2 = node_module.createRequire(__filename);
11903
- const pkg = require2(node_path.join(__dirname, "../../package.json"));
11904
- return pkg.name ?? "@qable/atto";
11905
- }
11906
- function isNewerVersion(latest, current) {
11907
- const parse = (value) => value.split(".").map((part) => Number.parseInt(part, 10) || 0);
11908
- const next = parse(latest);
11909
- const now = parse(current);
11910
- for (let i = 0; i < 3; i += 1) {
11911
- const a = next[i] ?? 0;
11912
- const b = now[i] ?? 0;
11913
- if (a > b) return true;
11914
- if (a < b) return false;
11915
- }
11916
- return false;
11917
- }
11918
- function registryLatestUrl(name) {
11919
- if (name.startsWith("@")) {
11920
- return `https://registry.npmjs.org/${name.replace("/", "%2f")}/latest`;
11921
- }
11922
- return `https://registry.npmjs.org/${name}/latest`;
11923
- }
11924
- function setupNpmUpdater() {
11925
- const name = readPackageName();
11926
- let pending = null;
11927
- electron.app.on("before-quit", () => {
11928
- if (!pending) return;
11929
- const version = pending;
11930
- pending = null;
11931
- const npm = process.platform === "win32" ? "npm.cmd" : "npm";
11932
- console.log(`[npm-updater] installing ${name}@${version} after quit`);
11933
- const child = node_child_process.spawn(npm, ["install", "-g", `${name}@${version}`], {
11934
- detached: true,
11935
- stdio: "ignore",
11936
- windowsHide: true
11937
- });
11938
- child.unref();
11939
- });
11940
- const current = electron.app.getVersion();
11941
- void (async () => {
11942
- const controller = new AbortController();
11943
- const timer = setTimeout(() => controller.abort(), 15e3);
11944
- try {
11945
- const response = await fetch(registryLatestUrl(name), { signal: controller.signal });
11946
- if (!response.ok) return;
11947
- const body = await response.json();
11948
- if (!body.version || !isNewerVersion(body.version, current)) return;
11949
- pending = body.version;
11950
- console.log(`[npm-updater] ${body.version} will install quietly on quit`);
11951
- } catch (error) {
11952
- console.error("[npm-updater] check failed", error);
11953
- } finally {
11954
- clearTimeout(timer);
11955
- }
11956
- })();
11957
- }
11958
12070
  function setupAutoUpdater() {
11959
- if (process.env.ATTO_NPM_PACKAGE === "1") {
11960
- setupNpmUpdater();
11961
- return;
11962
- }
11963
12071
  if (!electron.app.isPackaged) {
11964
12072
  return;
11965
12073
  }
@@ -11985,7 +12093,6 @@ function setupAutoUpdater() {
11985
12093
  console.error("[auto-updater] check failed", error);
11986
12094
  });
11987
12095
  }
11988
- electron.app.setName("Atto");
11989
12096
  registerMediaProtocolScheme();
11990
12097
  function createMainWindow() {
11991
12098
  const mainWindow = new electron.BrowserWindow({
@@ -12030,6 +12137,7 @@ electron.app.whenReady().then(() => {
12030
12137
  registerAiHandlers();
12031
12138
  registerProjectFilesHandlers();
12032
12139
  registerAppStateHandlers();
12140
+ registerTesboHandlers();
12033
12141
  createMainWindow();
12034
12142
  setupAutoUpdater();
12035
12143
  electron.app.on("activate", () => {
@@ -38,6 +38,11 @@ const IPC_CHANNELS = {
38
38
  listProjectAiBindings: "taa:ai:listBindings",
39
39
  listAiModels: "taa:ai:listModels",
40
40
  getProjectAiUsage: "taa:ai:getProjectUsage",
41
+ /** Tesbo account: the website decides which projects and agents this login can see. */
42
+ tesboStatus: "taa:tesbo:status",
43
+ tesboLogin: "taa:tesbo:login",
44
+ tesboLogout: "taa:tesbo:logout",
45
+ tesboAgents: "taa:tesbo:agents",
41
46
  // Contextual command handling
42
47
  submitCommand: "taa:sessions:submitCommand",
43
48
  getCommandQueue: "taa:sessions:getCommandQueue",
@@ -98,6 +103,12 @@ const api = {
98
103
  appState: {
99
104
  get: () => electron.ipcRenderer.invoke(IPC_CHANNELS.getAppState),
100
105
  set: (value) => electron.ipcRenderer.invoke(IPC_CHANNELS.setAppState, value)
106
+ },
107
+ tesbo: {
108
+ status: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboStatus),
109
+ login: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogin, cmd),
110
+ logout: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogout),
111
+ agents: (projectId) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboAgents, projectId)
101
112
  }
102
113
  };
103
114
  electron.contextBridge.exposeInMainWorld("taa", api);
@@ -33024,6 +33024,154 @@ function CreateProjectDialog({ open, onOpenChange, onCreated }) {
33024
33024
  }
33025
33025
  );
33026
33026
  }
33027
+ const REFRESH_MS = 5e3;
33028
+ const STATUS_LABEL$1 = {
33029
+ active: "Active",
33030
+ inactive: "Inactive",
33031
+ "coming-soon": "Coming soon"
33032
+ };
33033
+ function TesboPanel() {
33034
+ const [status, setStatus] = reactExports.useState(null);
33035
+ const [code, setCode] = reactExports.useState("");
33036
+ const [busy, setBusy] = reactExports.useState(false);
33037
+ const [formError, setFormError] = reactExports.useState(null);
33038
+ const [projectId, setProjectId] = reactExports.useState("");
33039
+ const [agents, setAgents] = reactExports.useState(null);
33040
+ const statusRef = reactExports.useRef(null);
33041
+ const refreshGeneration = reactExports.useRef(0);
33042
+ reactExports.useEffect(() => {
33043
+ let cancelled = false;
33044
+ const apply = (next, stamp) => {
33045
+ if (cancelled || stamp !== refreshGeneration.current) return;
33046
+ const offline = !next.connected && next.error === "Could not reach Tesbo.";
33047
+ if (offline && statusRef.current?.connected) return;
33048
+ statusRef.current = next;
33049
+ setStatus(next);
33050
+ setProjectId(
33051
+ (current) => next.projects.some((project) => project.id === current) ? current : next.projects[0]?.id ?? ""
33052
+ );
33053
+ if (!next.connected) setAgents(null);
33054
+ if (next.error) setFormError(next.error);
33055
+ };
33056
+ const refresh = () => {
33057
+ const stamp = refreshGeneration.current;
33058
+ void window.taa.tesbo.status().then((next) => apply(next, stamp));
33059
+ };
33060
+ refresh();
33061
+ const timer = window.setInterval(refresh, REFRESH_MS);
33062
+ window.addEventListener("focus", refresh);
33063
+ return () => {
33064
+ cancelled = true;
33065
+ window.clearInterval(timer);
33066
+ window.removeEventListener("focus", refresh);
33067
+ };
33068
+ }, []);
33069
+ reactExports.useEffect(() => {
33070
+ if (!status?.connected || !projectId) {
33071
+ setAgents(null);
33072
+ return;
33073
+ }
33074
+ let cancelled = false;
33075
+ void window.taa.tesbo.agents(projectId).then((next) => {
33076
+ if (!cancelled) setAgents(next);
33077
+ }).catch((error) => {
33078
+ if (cancelled) return;
33079
+ setAgents(null);
33080
+ setFormError(error instanceof Error ? error.message : "Could not load agents.");
33081
+ });
33082
+ return () => {
33083
+ cancelled = true;
33084
+ };
33085
+ }, [status?.connected, projectId]);
33086
+ const connect = async () => {
33087
+ setBusy(true);
33088
+ setFormError(null);
33089
+ try {
33090
+ refreshGeneration.current += 1;
33091
+ const next = await window.taa.tesbo.login({ code });
33092
+ statusRef.current = next;
33093
+ setStatus(next);
33094
+ setCode("");
33095
+ setProjectId(next.projects[0]?.id ?? "");
33096
+ if (next.error) setFormError(next.error);
33097
+ } catch (error) {
33098
+ setFormError(error instanceof Error ? error.message : "Could not connect.");
33099
+ } finally {
33100
+ setBusy(false);
33101
+ }
33102
+ };
33103
+ const disconnect = async () => {
33104
+ setBusy(true);
33105
+ setFormError(null);
33106
+ try {
33107
+ refreshGeneration.current += 1;
33108
+ const next = await window.taa.tesbo.logout();
33109
+ statusRef.current = next;
33110
+ setStatus(next);
33111
+ setAgents(null);
33112
+ setProjectId("");
33113
+ } finally {
33114
+ setBusy(false);
33115
+ }
33116
+ };
33117
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "mb-6 rounded-lg border border-border bg-card p-4", children: [
33118
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
33119
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
33120
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-sm font-semibold", children: "Tesbo projects" }),
33121
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Paste the access code from your QAble contact. Atto does not open the Tesbo website." })
33122
+ ] }),
33123
+ status?.connected && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", variant: "outline", onClick: () => void disconnect(), disabled: busy, children: "Disconnect" })
33124
+ ] }),
33125
+ !status?.connected ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
33126
+ "form",
33127
+ {
33128
+ className: "mt-4 grid gap-3",
33129
+ onSubmit: (event) => {
33130
+ event.preventDefault();
33131
+ void connect();
33132
+ },
33133
+ children: [
33134
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "grid gap-1 text-xs text-muted-foreground", children: [
33135
+ "Access code",
33136
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33137
+ "input",
33138
+ {
33139
+ value: code,
33140
+ onChange: (event) => setCode(event.target.value),
33141
+ className: "h-9 rounded-md border border-border bg-background px-3 text-sm text-foreground",
33142
+ autoComplete: "off",
33143
+ spellCheck: false
33144
+ }
33145
+ )
33146
+ ] }),
33147
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", type: "submit", disabled: busy || !code.trim(), children: busy ? "Connecting…" : "Connect" }) })
33148
+ ]
33149
+ }
33150
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 grid gap-3", children: [
33151
+ status.projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "No project is turned on for this code. It appears here when the project is turned on." }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "grid max-w-md gap-1 text-xs text-muted-foreground", children: [
33152
+ "Project",
33153
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33154
+ "select",
33155
+ {
33156
+ value: projectId,
33157
+ onChange: (event) => setProjectId(event.target.value),
33158
+ className: "h-9 rounded-md border border-border bg-background px-3 text-sm text-foreground",
33159
+ children: status.projects.map((project) => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: project.id, children: project.name }, project.id))
33160
+ }
33161
+ )
33162
+ ] }),
33163
+ agents && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: agents.agents.map((agent) => /* @__PURE__ */ jsxRuntimeExports.jsxs("article", { className: "rounded-md border border-border p-3", children: [
33164
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
33165
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h3", { className: "truncate text-sm font-medium", children: agent.name }),
33166
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "shrink-0 text-[10px] uppercase tracking-wide text-muted-foreground", children: STATUS_LABEL$1[agent.status] })
33167
+ ] }),
33168
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: agent.role }),
33169
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-xs", children: agent.summary })
33170
+ ] }, agent.id)) })
33171
+ ] }),
33172
+ formError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-3 text-sm text-destructive", children: formError })
33173
+ ] });
33174
+ }
33027
33175
  function ProjectList() {
33028
33176
  const projectsById = useAppStore((s2) => s2.projectsById);
33029
33177
  const projectOrder = useAppStore((s2) => s2.projectOrder);
@@ -33046,56 +33194,59 @@ function ProjectList() {
33046
33194
  "New project"
33047
33195
  ] })
33048
33196
  ] }),
33049
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-3 text-center", children: [
33050
- /* @__PURE__ */ jsxRuntimeExports.jsx(FolderKanban, { className: "size-8 text-muted-foreground" }),
33051
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
33052
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "No projects yet" }),
33053
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Create a project to start generating test cases." })
33054
- ] }),
33055
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { size: "sm", className: "gap-2", onClick: () => setDialogOpen(true), children: [
33056
- /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
33057
- "New project"
33058
- ] })
33059
- ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: projects.map((project) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
33060
- "div",
33061
- {
33062
- role: "button",
33063
- tabIndex: 0,
33064
- onClick: () => setActiveProject(project.id),
33065
- onKeyDown: (e) => {
33066
- if (e.key === "Enter") setActiveProject(project.id);
33067
- },
33068
- className: "group flex cursor-pointer flex-col gap-2 rounded-lg border border-border bg-card p-4 text-left transition-colors hover:border-primary/40 hover:bg-accent/40",
33069
- children: [
33070
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
33071
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-sm font-medium", children: project.name }),
33072
- /* @__PURE__ */ jsxRuntimeExports.jsx(
33073
- "button",
33074
- {
33075
- onClick: (e) => {
33076
- e.stopPropagation();
33077
- openProjectSettings(project.id);
33078
- },
33079
- className: "rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100",
33080
- title: "Project settings",
33081
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings, { className: "size-3.5" })
33082
- }
33083
- )
33084
- ] }),
33085
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "truncate text-xs text-muted-foreground", children: project.targetUrl ?? "No target URL set" }),
33086
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 flex items-center justify-between text-[11px] text-muted-foreground", children: [
33087
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
33088
- project.sessionIds.length,
33089
- " ",
33090
- project.sessionIds.length === 1 ? "test" : "tests"
33197
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 overflow-y-auto px-6 py-5", children: [
33198
+ /* @__PURE__ */ jsxRuntimeExports.jsx(TesboPanel, {}),
33199
+ projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center gap-3 py-16 text-center", children: [
33200
+ /* @__PURE__ */ jsxRuntimeExports.jsx(FolderKanban, { className: "size-8 text-muted-foreground" }),
33201
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
33202
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "No projects yet" }),
33203
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "Create a project to start generating test cases." })
33204
+ ] }),
33205
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { size: "sm", className: "gap-2", onClick: () => setDialogOpen(true), children: [
33206
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
33207
+ "New project"
33208
+ ] })
33209
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: projects.map((project) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
33210
+ "div",
33211
+ {
33212
+ role: "button",
33213
+ tabIndex: 0,
33214
+ onClick: () => setActiveProject(project.id),
33215
+ onKeyDown: (e) => {
33216
+ if (e.key === "Enter") setActiveProject(project.id);
33217
+ },
33218
+ className: "group flex cursor-pointer flex-col gap-2 rounded-lg border border-border bg-card p-4 text-left transition-colors hover:border-primary/40 hover:bg-accent/40",
33219
+ children: [
33220
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
33221
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-sm font-medium", children: project.name }),
33222
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33223
+ "button",
33224
+ {
33225
+ onClick: (e) => {
33226
+ e.stopPropagation();
33227
+ openProjectSettings(project.id);
33228
+ },
33229
+ className: "rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100",
33230
+ title: "Project settings",
33231
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings, { className: "size-3.5" })
33232
+ }
33233
+ )
33091
33234
  ] }),
33092
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: new Date(project.updatedAt).toLocaleDateString() })
33093
- ] }),
33094
- !isProjectReady(project) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-fit rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-600 dark:text-amber-400", children: "Setup needed" })
33095
- ]
33096
- },
33097
- project.id
33098
- )) }) }),
33235
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "truncate text-xs text-muted-foreground", children: project.targetUrl ?? "No target URL set" }),
33236
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 flex items-center justify-between text-[11px] text-muted-foreground", children: [
33237
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
33238
+ project.sessionIds.length,
33239
+ " ",
33240
+ project.sessionIds.length === 1 ? "test" : "tests"
33241
+ ] }),
33242
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: new Date(project.updatedAt).toLocaleDateString() })
33243
+ ] }),
33244
+ !isProjectReady(project) && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-fit rounded-full bg-amber-500/10 px-2 py-0.5 text-[10px] font-medium text-amber-600 dark:text-amber-400", children: "Setup needed" })
33245
+ ]
33246
+ },
33247
+ project.id
33248
+ )) })
33249
+ ] }),
33099
33250
  /* @__PURE__ */ jsxRuntimeExports.jsx(CreateProjectDialog, { open: dialogOpen, onOpenChange: setDialogOpen, onCreated: (id) => setActiveProject(id) })
33100
33251
  ] });
33101
33252
  }
@@ -478,6 +478,10 @@
478
478
  margin-bottom: calc(var(--spacing) * 3);
479
479
  }
480
480
 
481
+ .mb-6 {
482
+ margin-bottom: calc(var(--spacing) * 6);
483
+ }
484
+
481
485
  .ml-1 {
482
486
  margin-left: var(--spacing);
483
487
  }
@@ -1376,6 +1380,10 @@
1376
1380
  padding-block: calc(var(--spacing) * 6);
1377
1381
  }
1378
1382
 
1383
+ .py-16 {
1384
+ padding-block: calc(var(--spacing) * 16);
1385
+ }
1386
+
1379
1387
  .py-px {
1380
1388
  padding-block: 1px;
1381
1389
  }
@@ -8,8 +8,8 @@
8
8
  />
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
10
10
  <title>Tesbo Automate</title>
11
- <script type="module" crossorigin src="./assets/index-B2Nb_GBv.js"></script>
12
- <link rel="stylesheet" crossorigin href="./assets/index-BQ0eUj03.css">
11
+ <script type="module" crossorigin src="./assets/index-BMItL8CR.js"></script>
12
+ <link rel="stylesheet" crossorigin href="./assets/index-CKtSvvUQ.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qablehq/atto",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Atto — AI-assisted desktop test automation",
5
5
  "homepage": "https://github.com/QAbleHQ/Atto",
6
6
  "author": {