@qablehq/atto 0.0.23 → 0.0.26

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
@@ -54,6 +54,7 @@ const IPC_CHANNELS = {
54
54
  tesboStatus: "taa:tesbo:status",
55
55
  tesboLogin: "taa:tesbo:login",
56
56
  tesboLogout: "taa:tesbo:logout",
57
+ tesboUnlockProject: "taa:tesbo:unlockProject",
57
58
  tesboAgents: "taa:tesbo:agents",
58
59
  tesboRemoteConfig: "taa:tesbo:remoteConfig",
59
60
  /** Main → renderer: start a Chat-queued desktop session (New session equivalent). */
@@ -104,7 +105,8 @@ function readLink() {
104
105
  try {
105
106
  const parsed = JSON.parse(node_fs.readFileSync(sessionPath(), "utf8"));
106
107
  if (typeof parsed.code !== "string" || !parsed.code.trim()) return null;
107
- return { baseUrl: DEFAULT_BASE_URL, code: parsed.code.trim() };
108
+ const unlocked = Array.isArray(parsed.unlockedProjectIds) ? parsed.unlockedProjectIds.filter((id) => typeof id === "string" && Boolean(id.trim())) : [];
109
+ return { baseUrl: DEFAULT_BASE_URL, code: parsed.code.trim(), unlockedProjectIds: unlocked };
108
110
  } catch {
109
111
  return null;
110
112
  }
@@ -112,14 +114,30 @@ function readLink() {
112
114
  function writeLink(link) {
113
115
  const path = sessionPath();
114
116
  node_fs.mkdirSync(electron.app.getPath("userData"), { recursive: true });
115
- node_fs.writeFileSync(path, JSON.stringify(link), { mode: 384 });
117
+ node_fs.writeFileSync(
118
+ path,
119
+ JSON.stringify({
120
+ baseUrl: link.baseUrl,
121
+ code: link.code,
122
+ unlockedProjectIds: link.unlockedProjectIds
123
+ }),
124
+ { mode: 384 }
125
+ );
116
126
  node_fs.chmodSync(path, 384);
117
127
  }
118
128
  function clearLink() {
119
129
  node_fs.rmSync(sessionPath(), { force: true });
120
130
  }
121
131
  function disconnected(error = null) {
122
- return { connected: false, baseUrl: DEFAULT_BASE_URL, user: null, workspaces: [], projects: [], error };
132
+ return {
133
+ connected: false,
134
+ baseUrl: DEFAULT_BASE_URL,
135
+ user: null,
136
+ workspaces: [],
137
+ projects: [],
138
+ unlockedProjectIds: [],
139
+ error
140
+ };
123
141
  }
124
142
  async function errorMessage(response) {
125
143
  try {
@@ -186,14 +204,15 @@ async function loadAccount(link) {
186
204
  user: signedInUser(projects),
187
205
  workspaces: [],
188
206
  projects,
207
+ unlockedProjectIds: link.unlockedProjectIds,
189
208
  error: null
190
209
  };
191
210
  }
192
211
  function signedInUser(projects) {
193
212
  const project = projects.find((item) => item.userName || item.clientName);
194
213
  if (!project) return null;
195
- const name = [project.userName, project.clientName].filter(Boolean).join(" · ");
196
- return { userId: project.userName || project.clientName || "", email: null, name: name || null };
214
+ const name = (project.userName || project.clientName || "").trim() || null;
215
+ return { userId: project.userName || project.clientName || "", email: null, name };
197
216
  }
198
217
  async function tesboStatus() {
199
218
  const link = readLink();
@@ -207,8 +226,13 @@ async function tesboStatus() {
207
226
  }
208
227
  async function tesboLogin(cmd) {
209
228
  const code = cmd.code.trim();
210
- if (!code) throw new Error("Paste the access code from Tesbo.");
211
- const link = { baseUrl: DEFAULT_BASE_URL, code };
229
+ if (!code) throw new Error("Paste the list access code from Tesbo (Agents → Atto).");
230
+ const previous = readLink();
231
+ const link = {
232
+ baseUrl: DEFAULT_BASE_URL,
233
+ code,
234
+ unlockedProjectIds: previous?.code === code ? previous.unlockedProjectIds : []
235
+ };
212
236
  const connectOnce = () => fetch(`${link.baseUrl}/api/atto/connect`, {
213
237
  method: "POST",
214
238
  headers: { accept: "application/json", "content-type": "application/json" },
@@ -231,9 +255,32 @@ async function tesboLogin(cmd) {
231
255
  user: signedInUser(projects),
232
256
  workspaces: [],
233
257
  projects,
258
+ unlockedProjectIds: link.unlockedProjectIds,
234
259
  error: null
235
260
  };
236
261
  }
262
+ async function tesboUnlockProject(cmd) {
263
+ const link = readLink();
264
+ if (!link) throw new Error("Connect with your list access code first.");
265
+ const projectId = String(cmd.projectId || "").trim();
266
+ const projectCode = String(cmd.projectCode || "").trim();
267
+ if (!projectId) throw new Error("Pick a project to unlock.");
268
+ if (!projectCode) throw new Error("Paste the project code from Agents → Atto on the website.");
269
+ const response = await tesboFetch(link, `/api/atto/projects/${encodeURIComponent(projectId)}/unlock`, {
270
+ method: "POST",
271
+ body: JSON.stringify({ projectCode })
272
+ });
273
+ if (!response.ok) throw new Error(await errorMessage(response));
274
+ const unlocked = link.unlockedProjectIds.includes(projectId) ? link.unlockedProjectIds : [...link.unlockedProjectIds, projectId];
275
+ writeLink({ ...link, unlockedProjectIds: unlocked });
276
+ const body = await response.json().catch(() => ({}));
277
+ return {
278
+ ok: true,
279
+ projectId,
280
+ projectName: typeof body.projectName === "string" ? body.projectName : void 0,
281
+ unlockedProjectIds: unlocked
282
+ };
283
+ }
237
284
  async function tesboLogout() {
238
285
  clearLink();
239
286
  return disconnected();
@@ -3695,6 +3742,10 @@ function registerTesboHandlers(adapter) {
3695
3742
  electron.ipcMain.handle(IPC_CHANNELS.tesboStatus, () => tesboStatus());
3696
3743
  electron.ipcMain.handle(IPC_CHANNELS.tesboLogin, (_event, cmd) => tesboLogin(cmd));
3697
3744
  electron.ipcMain.handle(IPC_CHANNELS.tesboLogout, () => tesboLogout());
3745
+ electron.ipcMain.handle(
3746
+ IPC_CHANNELS.tesboUnlockProject,
3747
+ (_event, cmd) => tesboUnlockProject(cmd)
3748
+ );
3698
3749
  electron.ipcMain.handle(IPC_CHANNELS.tesboAgents, (_event, projectId) => tesboAgents(projectId));
3699
3750
  electron.ipcMain.handle(IPC_CHANNELS.tesboRemoteConfig, () => fetchAttoRemoteConfig());
3700
3751
  electron.ipcMain.handle(
@@ -42,6 +42,7 @@ const IPC_CHANNELS = {
42
42
  tesboStatus: "taa:tesbo:status",
43
43
  tesboLogin: "taa:tesbo:login",
44
44
  tesboLogout: "taa:tesbo:logout",
45
+ tesboUnlockProject: "taa:tesbo:unlockProject",
45
46
  tesboAgents: "taa:tesbo:agents",
46
47
  tesboRemoteConfig: "taa:tesbo:remoteConfig",
47
48
  /** Main → renderer: start a Chat-queued desktop session (New session equivalent). */
@@ -114,6 +115,7 @@ const api = {
114
115
  status: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboStatus),
115
116
  login: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogin, cmd),
116
117
  logout: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboLogout),
118
+ unlockProject: (cmd) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboUnlockProject, cmd),
117
119
  agents: (projectId) => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboAgents, projectId),
118
120
  remoteConfig: () => electron.ipcRenderer.invoke(IPC_CHANNELS.tesboRemoteConfig),
119
121
  onRemoteSession: (cb) => {
@@ -17037,10 +17037,24 @@ const useAppStore = create$1()(
17037
17037
  view: "projects",
17038
17038
  setView: (view) => set({ view }),
17039
17039
  activeProjectId: null,
17040
- setActiveProject: (id) => set((state) => {
17041
- if (!id) return { activeProjectId: null, view: "projects", activeSessionId: null };
17040
+ pinProjectsList: true,
17041
+ setActiveProject: (id, options2) => set((state) => {
17042
+ if (!id) {
17043
+ return {
17044
+ activeProjectId: null,
17045
+ pinProjectsList: true,
17046
+ view: "projects",
17047
+ activeSessionId: null
17048
+ };
17049
+ }
17050
+ if (state.pinProjectsList && !options2?.force) return state;
17042
17051
  const ready = isProjectReady(state.projectsById[id]);
17043
- return { activeProjectId: id, view: ready ? "session" : "project-settings", activeSessionId: null };
17052
+ return {
17053
+ activeProjectId: id,
17054
+ pinProjectsList: false,
17055
+ view: ready ? "session" : "project-settings",
17056
+ activeSessionId: null
17057
+ };
17044
17058
  }),
17045
17059
  createProject: (input) => {
17046
17060
  const id = `proj-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`;
@@ -33141,8 +33155,8 @@ function TesboPanel() {
33141
33155
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "mb-6 rounded-lg border border-border bg-card p-4", children: [
33142
33156
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
33143
33157
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
33144
- /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-sm font-semibold", children: status?.connected ? "Tesbo connection" : "Connect with access code" }),
33145
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: status?.connected ? "This PC is linked. Choose a project below to start testing." : "Paste the access code from Agents → Atto on the website. This is the first step — no local project needed." }),
33158
+ /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { className: "text-sm font-semibold", children: status?.connected ? "Tesbo connection" : "Connect with list code" }),
33159
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: status?.connected ? "List code linked. Click a project below and paste its project code to open it." : "Paste the list access code from Agents → Atto. That shows all projects; each project still needs its own project code to open." }),
33146
33160
  status?.connected && status.user?.name && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-foreground", children: status.user.name })
33147
33161
  ] }),
33148
33162
  status?.connected && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", variant: "outline", onClick: () => void disconnect(), disabled: busy, children: "Disconnect" })
@@ -33157,7 +33171,7 @@ function TesboPanel() {
33157
33171
  },
33158
33172
  children: [
33159
33173
  /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "grid gap-1 text-xs text-muted-foreground", children: [
33160
- "Access code",
33174
+ "List access code",
33161
33175
  /* @__PURE__ */ jsxRuntimeExports.jsx(
33162
33176
  "input",
33163
33177
  {
@@ -33202,6 +33216,9 @@ function TesboPanel() {
33202
33216
  function tesboProjectId$1(remoteProjectId) {
33203
33217
  return `tesbo-${remoteProjectId}`;
33204
33218
  }
33219
+ function remoteIdFromLocal(localId) {
33220
+ return localId.startsWith("tesbo-") ? localId.slice("tesbo-".length) : null;
33221
+ }
33205
33222
  function ProjectList() {
33206
33223
  const projectsById = useAppStore((s2) => s2.projectsById);
33207
33224
  const projectOrder = useAppStore((s2) => s2.projectOrder);
@@ -33213,11 +33230,69 @@ function ProjectList() {
33213
33230
  const setMemories = useAppStore((s2) => s2.setProjectMemories);
33214
33231
  const [dialogOpen, setDialogOpen] = reactExports.useState(false);
33215
33232
  const [tesboConnected, setTesboConnected] = reactExports.useState(false);
33233
+ const [unlockedRemoteIds, setUnlockedRemoteIds] = reactExports.useState([]);
33234
+ const [unlockFor, setUnlockFor] = reactExports.useState(null);
33235
+ const [projectCode, setProjectCode] = reactExports.useState("");
33236
+ const [unlockBusy, setUnlockBusy] = reactExports.useState(false);
33237
+ const [unlockError, setUnlockError] = reactExports.useState(null);
33216
33238
  const projects = projectOrder.map((id) => projectsById[id]);
33239
+ const isUnlocked = (localId) => {
33240
+ const remoteId = remoteIdFromLocal(localId);
33241
+ if (!remoteId) return true;
33242
+ return unlockedRemoteIds.includes(remoteId);
33243
+ };
33217
33244
  const openProjectSettings = (id) => {
33218
- setActiveProject(id);
33245
+ if (!isUnlocked(id)) {
33246
+ requestUnlock(id);
33247
+ return;
33248
+ }
33249
+ setActiveProject(id, { force: true });
33219
33250
  setView("project-settings");
33220
33251
  };
33252
+ const requestUnlock = (localId) => {
33253
+ const remoteId = remoteIdFromLocal(localId);
33254
+ if (!remoteId) {
33255
+ setActiveProject(localId, { force: true });
33256
+ return;
33257
+ }
33258
+ if (unlockedRemoteIds.includes(remoteId)) {
33259
+ setActiveProject(localId, { force: true });
33260
+ return;
33261
+ }
33262
+ setUnlockFor({
33263
+ localId,
33264
+ remoteId,
33265
+ name: projectsById[localId]?.name || "Tesbo project"
33266
+ });
33267
+ setProjectCode("");
33268
+ setUnlockError(null);
33269
+ };
33270
+ const openProject = (id) => {
33271
+ if (!isUnlocked(id)) {
33272
+ requestUnlock(id);
33273
+ return;
33274
+ }
33275
+ setActiveProject(id, { force: true });
33276
+ };
33277
+ const submitUnlock = async () => {
33278
+ if (!unlockFor) return;
33279
+ setUnlockBusy(true);
33280
+ setUnlockError(null);
33281
+ try {
33282
+ const result = await window.taa.tesbo.unlockProject({
33283
+ projectId: unlockFor.remoteId,
33284
+ projectCode
33285
+ });
33286
+ setUnlockedRemoteIds(result.unlockedProjectIds);
33287
+ setUnlockFor(null);
33288
+ setProjectCode("");
33289
+ setActiveProject(unlockFor.localId, { force: true });
33290
+ } catch (error) {
33291
+ setUnlockError(error instanceof Error ? error.message : "Could not unlock project.");
33292
+ } finally {
33293
+ setUnlockBusy(false);
33294
+ }
33295
+ };
33221
33296
  reactExports.useEffect(() => {
33222
33297
  let cancelled = false;
33223
33298
  const syncRemote = (remote) => {
@@ -33245,6 +33320,7 @@ function ProjectList() {
33245
33320
  const status = await window.taa.tesbo.status();
33246
33321
  if (cancelled) return;
33247
33322
  setTesboConnected(Boolean(status.connected));
33323
+ setUnlockedRemoteIds(status.unlockedProjectIds || []);
33248
33324
  if (!status.connected) return;
33249
33325
  for (const project of status.projects) {
33250
33326
  ensureProject(tesboProjectId$1(project.id), {
@@ -33268,7 +33344,7 @@ function ProjectList() {
33268
33344
  /* @__PURE__ */ jsxRuntimeExports.jsxs("header", { className: "flex items-center justify-between border-b border-border px-6 py-4", children: [
33269
33345
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
33270
33346
  /* @__PURE__ */ jsxRuntimeExports.jsx("h1", { className: "text-lg font-semibold", children: tesboConnected ? "Projects" : "Connect Atto" }),
33271
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tesboConnected ? "Pick a Tesbo project below. Folder and browser mode come from Agents → Atto on the website." : "Paste your access code to link this PC. You do not need a local project first." })
33347
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: tesboConnected ? "Projects appear after the list code. Click a project and paste its project code to open it." : "Paste your list access code from Agents → Atto to see projects." })
33272
33348
  ] }),
33273
33349
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { size: "sm", variant: "outline", className: "gap-2", onClick: () => setDialogOpen(true), children: [
33274
33350
  /* @__PURE__ */ jsxRuntimeExports.jsx(Plus, { className: "size-4" }),
@@ -33279,55 +33355,110 @@ function ProjectList() {
33279
33355
  /* @__PURE__ */ jsxRuntimeExports.jsx(TesboPanel, {}),
33280
33356
  !tesboConnected && projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-2 rounded-lg border border-dashed border-border px-4 py-8 text-center", children: [
33281
33357
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Connect to see your projects" }),
33282
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "After you connect, Tesbo projects (including ones shared with you) show up here." })
33358
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "After the list code, shared projects show up here. Opening still needs each project code." })
33283
33359
  ] }) : tesboConnected && projects.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col items-center justify-center gap-3 py-16 text-center", children: [
33284
33360
  /* @__PURE__ */ jsxRuntimeExports.jsx(FolderKanban, { className: "size-8 text-muted-foreground" }),
33285
33361
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
33286
33362
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm font-medium", children: "Waiting for website settings" }),
33287
33363
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-sm text-muted-foreground", children: "On the website open Agents → Atto, set the project folder path, then keep Atto connected." })
33288
33364
  ] })
33289
- ] }) : /* @__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(
33290
- "div",
33291
- {
33292
- role: "button",
33293
- tabIndex: 0,
33294
- onClick: () => setActiveProject(project.id),
33295
- onKeyDown: (e) => {
33296
- if (e.key === "Enter") setActiveProject(project.id);
33297
- },
33298
- 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",
33299
- children: [
33300
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
33301
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-sm font-medium", children: project.name }),
33302
- /* @__PURE__ */ jsxRuntimeExports.jsx(
33303
- "button",
33304
- {
33305
- onClick: (e) => {
33306
- e.stopPropagation();
33307
- openProjectSettings(project.id);
33308
- },
33309
- className: "rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100",
33310
- title: "Project settings",
33311
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings, { className: "size-3.5" })
33312
- }
33313
- )
33314
- ] }),
33315
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "truncate text-xs text-muted-foreground", children: project.targetUrl ?? "No target URL set" }),
33316
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 flex items-center justify-between text-[11px] text-muted-foreground", children: [
33317
- /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
33318
- project.sessionIds.length,
33319
- " ",
33320
- project.sessionIds.length === 1 ? "test" : "tests"
33365
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3", children: projects.map((project) => {
33366
+ const locked = !isUnlocked(project.id);
33367
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
33368
+ "div",
33369
+ {
33370
+ role: "button",
33371
+ tabIndex: 0,
33372
+ onClick: () => openProject(project.id),
33373
+ onKeyDown: (e) => {
33374
+ if (e.key === "Enter") openProject(project.id);
33375
+ },
33376
+ 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",
33377
+ children: [
33378
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-start justify-between gap-2", children: [
33379
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate text-sm font-medium", children: project.name }),
33380
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1", children: [
33381
+ locked && /* @__PURE__ */ jsxRuntimeExports.jsx(Lock, { className: "size-3.5 text-muted-foreground", "aria-label": "Needs project code" }),
33382
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33383
+ "button",
33384
+ {
33385
+ onClick: (e) => {
33386
+ e.stopPropagation();
33387
+ openProjectSettings(project.id);
33388
+ },
33389
+ className: "rounded-md p-1 text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100",
33390
+ title: "Project settings",
33391
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Settings, { className: "size-3.5" })
33392
+ }
33393
+ )
33394
+ ] })
33321
33395
  ] }),
33322
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: new Date(project.updatedAt).toLocaleDateString() })
33323
- ] }),
33324
- !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" })
33325
- ]
33326
- },
33327
- project.id
33328
- )) })
33396
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "truncate text-xs text-muted-foreground", children: project.targetUrl ?? "No target URL set" }),
33397
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-1 flex items-center justify-between text-[11px] text-muted-foreground", children: [
33398
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
33399
+ project.sessionIds.length,
33400
+ " ",
33401
+ project.sessionIds.length === 1 ? "test" : "tests"
33402
+ ] }),
33403
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: locked ? "Locked" : new Date(project.updatedAt).toLocaleDateString() })
33404
+ ] }),
33405
+ locked ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "w-fit rounded-full bg-sky-500/10 px-2 py-0.5 text-[10px] font-medium text-sky-600 dark:text-sky-400", children: "Project code needed" }) : !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" })
33406
+ ]
33407
+ },
33408
+ project.id
33409
+ );
33410
+ }) })
33329
33411
  ] }),
33330
- /* @__PURE__ */ jsxRuntimeExports.jsx(CreateProjectDialog, { open: dialogOpen, onOpenChange: setDialogOpen, onCreated: (id) => setActiveProject(id) })
33412
+ unlockFor && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "w-full max-w-md rounded-lg border border-border bg-card p-5 shadow-lg", children: [
33413
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("h2", { className: "text-sm font-semibold", children: [
33414
+ "Open ",
33415
+ unlockFor.name
33416
+ ] }),
33417
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: "Paste this project's code from Agents → Atto on the website. List code only shows projects; project code opens them." }),
33418
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { className: "mt-4 grid gap-1 text-xs text-muted-foreground", children: [
33419
+ "Project code",
33420
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33421
+ "input",
33422
+ {
33423
+ value: projectCode,
33424
+ onChange: (event) => setProjectCode(event.target.value),
33425
+ className: "h-10 rounded-md border border-border bg-background px-3 text-sm text-foreground",
33426
+ placeholder: "atto_proj_…",
33427
+ autoComplete: "off",
33428
+ spellCheck: false,
33429
+ autoFocus: true,
33430
+ onKeyDown: (event) => {
33431
+ if (event.key === "Enter" && projectCode.trim()) void submitUnlock();
33432
+ }
33433
+ }
33434
+ )
33435
+ ] }),
33436
+ unlockError && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "mt-2 text-sm text-destructive", children: unlockError }),
33437
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
33438
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33439
+ Button,
33440
+ {
33441
+ size: "sm",
33442
+ variant: "outline",
33443
+ disabled: unlockBusy,
33444
+ onClick: () => {
33445
+ setUnlockFor(null);
33446
+ setUnlockError(null);
33447
+ },
33448
+ children: "Cancel"
33449
+ }
33450
+ ),
33451
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "sm", disabled: unlockBusy || !projectCode.trim(), onClick: () => void submitUnlock(), children: unlockBusy ? "Unlocking…" : "Unlock & open" })
33452
+ ] })
33453
+ ] }) }),
33454
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
33455
+ CreateProjectDialog,
33456
+ {
33457
+ open: dialogOpen,
33458
+ onOpenChange: setDialogOpen,
33459
+ onCreated: (id) => setActiveProject(id, { force: true })
33460
+ }
33461
+ )
33331
33462
  ] });
33332
33463
  }
33333
33464
  const AI_PROVIDERS = [
@@ -34570,7 +34701,7 @@ async function bootstrapEngineConnection() {
34570
34701
  for (const sessionId of unlinked) linkSessionToProject2(activeProjectId, sessionId);
34571
34702
  }
34572
34703
  if (activeProjectId && useAppStore.getState().projectsById[activeProjectId]) {
34573
- setActiveProject(activeProjectId);
34704
+ setActiveProject(activeProjectId, { force: true });
34574
34705
  const project = useAppStore.getState().projectsById[activeProjectId];
34575
34706
  const sessionsById = useAppStore.getState().sessionsById;
34576
34707
  const mostRecent = project.sessionIds.map((id) => sessionsById[id]).filter(Boolean).map(toSessionListItem).sort((a, b2) => new Date(b2.updatedAt).getTime() - new Date(a.updatedAt).getTime())[0];
@@ -34808,11 +34939,12 @@ function ProjectSettings() {
34808
34939
  function AppShell() {
34809
34940
  const view = useAppStore((s2) => s2.view);
34810
34941
  const activeProjectId = useAppStore((s2) => s2.activeProjectId);
34942
+ const pinProjectsList = useAppStore((s2) => s2.pinProjectsList);
34811
34943
  const activeSessionId = useAppStore((s2) => s2.activeSessionId);
34812
34944
  const session = useAppStore((s2) => activeSessionId ? s2.sessionsById[activeSessionId] ?? null : null);
34813
34945
  const toggleCanvas = useAppStore((s2) => s2.toggleCanvas);
34814
34946
  const isCanvasOpen = session ? session.isCanvasOpen : true;
34815
- if (!activeProjectId || view === "projects") {
34947
+ if (pinProjectsList || !activeProjectId || view === "projects") {
34816
34948
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex h-screen w-screen flex-col overflow-hidden bg-background text-foreground", children: [
34817
34949
  /* @__PURE__ */ jsxRuntimeExports.jsx(TitleBar, {}),
34818
34950
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ProjectList, {}) })
@@ -34869,7 +35001,7 @@ async function startRemoteSession(job) {
34869
35001
  targetUrl: job.targetUrl
34870
35002
  });
34871
35003
  }
34872
- setActiveProject(id);
35004
+ setActiveProject(id, { force: true });
34873
35005
  setView("session");
34874
35006
  const bindings = await window.taa.ai.listBindings().catch(() => ({}));
34875
35007
  if (bindings[id]) setProjectAiBinding2(id, bindings[id]);
@@ -72,6 +72,9 @@
72
72
  --color-amber-600: oklch(66.6% .179 58.318);
73
73
  --color-amber-700: oklch(55.5% .163 48.998);
74
74
  --color-emerald-600: oklch(59.6% .145 163.225);
75
+ --color-sky-400: oklch(74.6% .16 232.661);
76
+ --color-sky-500: oklch(68.5% .169 237.323);
77
+ --color-sky-600: oklch(58.8% .158 241.966);
75
78
  --color-black: #000;
76
79
  --spacing: .25rem;
77
80
  --container-xs: 20rem;
@@ -1226,6 +1229,16 @@
1226
1229
  background-color: var(--sidebar-accent);
1227
1230
  }
1228
1231
 
1232
+ .bg-sky-500\/10 {
1233
+ background-color: #00a5ef1a;
1234
+ }
1235
+
1236
+ @supports (color: color-mix(in lab, red, red)) {
1237
+ .bg-sky-500\/10 {
1238
+ background-color: color-mix(in oklab, var(--color-sky-500) 10%, transparent);
1239
+ }
1240
+ }
1241
+
1229
1242
  .bg-success, .bg-success\/10 {
1230
1243
  background-color: var(--success);
1231
1244
  }
@@ -1604,6 +1617,10 @@
1604
1617
  }
1605
1618
  }
1606
1619
 
1620
+ .text-sky-600 {
1621
+ color: var(--color-sky-600);
1622
+ }
1623
+
1607
1624
  .text-success {
1608
1625
  color: var(--success);
1609
1626
  }
@@ -1916,6 +1933,10 @@
1916
1933
  color: var(--color-amber-400);
1917
1934
  }
1918
1935
 
1936
+ .dark\:text-sky-400:is(.dark *) {
1937
+ color: var(--color-sky-400);
1938
+ }
1939
+
1919
1940
  .\[\&_pre\]\:\!bg-transparent pre {
1920
1941
  background-color: #0000 !important;
1921
1942
  }
@@ -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-DhNABw4-.js"></script>
12
- <link rel="stylesheet" crossorigin href="./assets/index-Cq11Gc4F.css">
11
+ <script type="module" crossorigin src="./assets/index-D6IRitH-.js"></script>
12
+ <link rel="stylesheet" crossorigin href="./assets/index-DyJdhPcb.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.23",
3
+ "version": "0.0.26",
4
4
  "description": "Atto — AI-assisted desktop test automation",
5
5
  "homepage": "https://github.com/QAbleHQ/Atto",
6
6
  "author": {