@app-vitals/agent-lib 1.50.0 → 1.52.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-lib",
3
- "version": "1.50.0",
3
+ "version": "1.52.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",
package/web/toolbar.ts CHANGED
@@ -22,11 +22,6 @@ export interface ShipwrightToolbarOptions {
22
22
  readOnly?: boolean;
23
23
  /** Public task board URL, used only in readOnly mode. Defaults to "/public/tasks". */
24
24
  tasksUrl?: string;
25
- /**
26
- * Render the "Account" nav entry (self-serve accounts, admin service only).
27
- * Defaults to false so other services sharing this toolbar never show it.
28
- */
29
- showAccount?: boolean;
30
25
  /**
31
26
  * Render the "Settings" nav entry (links to /admin/settings; shown to
32
27
  * admins and account members). Defaults to false.
@@ -125,6 +120,7 @@ export function baseStyles(): string {
125
120
  margin: 0 auto;
126
121
  padding: 32px 24px 64px;
127
122
  }
123
+ .vos-page-wide { max-width: none; width: 100%; }
128
124
 
129
125
  /* ─── Hamburger toggle (CSS-only, no JS) ───────────── */
130
126
  .vos-nav-toggle { display: none; }
@@ -235,7 +231,7 @@ export function renderShipwrightToolbar(
235
231
  <a href="${adminBase}/admin/prs" class="vos-nav-link${active("/admin/prs")}">PRs</a>
236
232
  <a href="${adminBase}/admin/chat" class="vos-nav-link${active("/admin/chat")}">Chat</a>
237
233
  <a href="${adminBase}/admin/queue-activity" class="vos-nav-link${isQueueActivity ? " active" : ""}">Queue &amp; Activity</a>
238
- ${opts.showAccount ? `<a href="${adminBase}/admin/account" class="vos-nav-link${active("/admin/account")}">Account</a>\n ` : ""}${opts.showSettings ? `<a href="${adminBase}/admin/settings" class="vos-nav-link${active("/admin/settings")}">Settings</a>\n ` : ""}<a href="${metricsUrl}" class="vos-nav-link${active(metricsUrl)}">Metrics</a>
234
+ ${opts.showSettings ? `<a href="${adminBase}/admin/settings" class="vos-nav-link${active("/admin/settings")}">Settings</a>\n ` : ""}<a href="${metricsUrl}" class="vos-nav-link${active(metricsUrl)}">Metrics</a>
239
235
  </div>
240
236
  <div class="vos-user">
241
237
  <span class="vos-username">${escapeHtml(userName)}</span>
@@ -207,38 +207,15 @@ describe("renderShipwrightToolbar", () => {
207
207
  });
208
208
  });
209
209
 
210
- describe("renderShipwrightToolbar Account entry (SSP-3.2)", () => {
211
- const base = {
212
- userName: "Alice",
213
- activePath: "/admin/agents",
214
- logoutAction: "/auth/logout",
215
- };
216
-
217
- test("omits the Account link by default so other services never render it", () => {
218
- expect(renderShipwrightToolbar(base)).not.toContain("/admin/account");
219
- });
220
-
221
- test("renders the Account link when showAccount is true", () => {
222
- const html = renderShipwrightToolbar({ ...base, showAccount: true });
223
- expect(html).toContain('href="/admin/account" class="vos-nav-link');
224
- });
225
-
226
- test("highlights Account when it is the active path", () => {
227
- const html = renderShipwrightToolbar({
228
- ...base,
229
- activePath: "/admin/account",
230
- showAccount: true,
231
- });
232
- expect(html).toContain('href="/admin/account" class="vos-nav-link active"');
233
- });
234
-
235
- test("readOnly mode never renders Account even when showAccount is true", () => {
210
+ describe("renderShipwrightToolbar Account entry (SGL-2.3)", () => {
211
+ test("never renders a top-level Account link (Settings covers it)", () => {
236
212
  const html = renderShipwrightToolbar({
237
- ...base,
238
- readOnly: true,
239
- showAccount: true,
213
+ userName: "Alice",
214
+ activePath: "/admin/agents",
215
+ logoutAction: "/auth/logout",
216
+ showSettings: true,
240
217
  });
241
- expect(html).not.toContain("/admin/account");
218
+ expect(html).not.toContain('href="/admin/account"');
242
219
  });
243
220
  });
244
221