webhelm 1.0.23 → 1.0.24

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/README.md CHANGED
@@ -39,7 +39,7 @@ The daemon-managed Chrome Extension is installed from the npm Runtime and does n
39
39
 
40
40
  The compact popup shows daemon connectivity and per-workspace capacity and Session counts, with confirmation before stopping a Session or clearing Sessions in one workspace. The popup does not include a global stop-all action. These actions are executed by the same Node daemon as the CLI, over the existing CDP-backed Extension RPC. No shell access or HTTP listener is granted to the Extension. The persistent ChatGPT queue is not deleted, and queued work may create new Sessions afterward.
41
41
 
42
- New installations use the default Chrome tab group `WebHelm` and the idle page `helm.html`. Idle URLs use only `workspace` and `role=idle`; Lease URLs use Chrome's actual `tabId` for initial CDP target discovery. There is no separate slot identity. The default `WebHelm` tab group is placed at the first position after pinned tabs when created or restored, while Session allocation does not override later user rearrangement. Chrome-saved tab group shortcuts in the bookmarks bar are separate from active groups and cannot safely be deduplicated through the Extension API. Legacy `Harness` default groups migrate only when their tabs are idle. Custom workspace names are unchanged; the old `workspace.html` path and lease titles remain readable until their Sessions finish. Closing an allocated Session returns its managed tabs to the idle page, retaining physical Chrome targets, while unleased popup children are closed. Do not manually remove active managed tabs.
42
+ New installations use the default Chrome tab group `WebHelm` and the idle page `helm.html`. Idle URLs use only `workspace` and `role=idle`; Lease URLs use Chrome's actual `tabId` for initial CDP target discovery. There is no separate slot identity. Every newly created WebHelm-managed tab group (default and custom) is placed at the far right of its Chrome window. Existing groups retain their user-chosen position during restoration, legacy migration and Session allocation. Chrome-saved tab group shortcuts in the bookmarks bar are separate from active groups and cannot safely be deduplicated through the Extension API. Legacy `Harness` default groups migrate only when their tabs are idle. Custom workspace names are unchanged; the old `workspace.html` path and lease titles remain readable until their Sessions finish. Closing an allocated Session returns its managed tabs to the idle page, retaining physical Chrome targets, while unleased popup children are closed. Do not manually remove active managed tabs.
43
43
 
44
44
  For a real browser integration check on macOS, run `node test/e2e/extension-control.e2e.mjs`; it creates a temporary isolated Chrome profile and daemon and does not touch the current production Sessions.
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webhelm",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
4
4
  "description": "Agent browser automation in a visible managed Chrome with persistent JavaScript sessions",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "WebHelm",
4
- "version": "0.4.8",
4
+ "version": "0.4.9",
5
5
  "description": "Own named Chrome tab-group workspaces and lazy reusable tab pools for browser agents.",
6
6
  "permissions": [
7
7
  "storage",
@@ -242,20 +242,10 @@ export class WorkspaceManager {
242
242
  return await this.chrome.tabs.query({ groupId });
243
243
  }
244
244
 
245
- // Only position the default group when it is created, migrated or restored.
246
- // Never move it during routine Session allocation or periodic health checks,
247
- // since the user may intentionally reorder the tab strip.
248
- async positionDefaultGroupFirst(groupId, name) {
249
- if (name !== "WebHelm") return false;
250
- const groupTabs = await this.groupTabs(groupId);
251
- if (!groupTabs.length) return false;
252
- const windowId = groupTabs[0].windowId;
253
- const windowTabs = await this.chrome.tabs.query({windowId});
254
- const firstUnpinnedIndex = windowTabs.filter(tab => tab.pinned).length;
255
- const firstGroupIndex = Math.min(...groupTabs.map(tab => tab.index));
256
- if (firstGroupIndex === firstUnpinnedIndex) return false;
257
- await this.chrome.tabGroups.move(groupId, {index: firstUnpinnedIndex});
258
- return true;
245
+ // New groups belong at the right edge, regardless of Chrome's new-tab
246
+ // insertion policy. Never reorder existing groups on restore or lease.
247
+ async positionNewGroupRightmost(groupId) {
248
+ await this.chrome.tabGroups.move(groupId, { index: -1 });
259
249
  }
260
250
 
261
251
  tabUrl(tab) {
@@ -507,7 +497,7 @@ export class WorkspaceManager {
507
497
  for (const tab of created) this.markOwned(tab.id);
508
498
  const groupId = await this.chrome.tabs.group({ tabIds: created.map((tab) => tab.id) });
509
499
  await this.chrome.tabGroups.update(groupId, { title: name, collapsed: true });
510
- await this.positionDefaultGroupFirst(groupId, name);
500
+ await this.positionNewGroupRightmost(groupId);
511
501
  for (const tab of created) await this.waitForIdleTab(tab.id, name);
512
502
  return await this.status(name);
513
503
  }
@@ -586,8 +576,6 @@ export class WorkspaceManager {
586
576
  for (const name of Object.keys(config.workspaces || {}).sort()) {
587
577
  restored.push(await this.ensureWorkspace(name));
588
578
  }
589
- const defaultGroup = restored.find(item => item.name === "WebHelm" && item.initialized);
590
- if (defaultGroup) await this.positionDefaultGroupFirst(defaultGroup.groupId, "WebHelm");
591
579
  return { workspaces: restored };
592
580
  }
593
581
 
@@ -625,9 +613,6 @@ export class WorkspaceManager {
625
613
  await this.chrome.tabs.update(tab.id, {url: this.idleUrl(newName), active: false});
626
614
  updated.push(tab);
627
615
  }
628
- // Position before committing the new config so move failures still
629
- // unwind the legacy migration coherently in the catch block.
630
- if (group) await this.positionDefaultGroupFirst(group.id, newName);
631
616
  config.workspaces[newName] = config.workspaces[oldName];
632
617
  delete config.workspaces[oldName];
633
618
  await this.saveConfig(config);