@app-vitals/agent-admin 1.112.0 → 1.113.1

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.
Files changed (34) hide show
  1. package/e2e/real/member-agents.real.e2e.ts +8 -4
  2. package/package.json +2 -2
  3. package/prisma/client/browser.ts +2 -2
  4. package/prisma/client/client.ts +2 -2
  5. package/prisma/client/internal/class.ts +7 -7
  6. package/prisma/client/internal/prismaNamespace.ts +39 -39
  7. package/prisma/client/internal/prismaNamespaceBrowser.ts +3 -3
  8. package/prisma/client/models/UserPrefs.ts +1249 -0
  9. package/prisma/client/models.ts +1 -1
  10. package/prisma/schema/schema.prisma +2 -2
  11. package/src/account-member-removal.integration.test.ts +5 -5
  12. package/src/account-members.ts +2 -2
  13. package/src/account-move.integration.test.ts +4 -4
  14. package/src/account-move.ts +1 -1
  15. package/src/admin-boot.ts +15 -6
  16. package/src/admin-extension.ts +10 -1
  17. package/src/admin-ui-agent-members.smoke.test.ts +1 -1
  18. package/src/admin-ui-layout.ts +2 -0
  19. package/src/admin-ui-preferences-pages.ts +79 -0
  20. package/src/admin-ui-preferences.smoke.test.ts +168 -0
  21. package/src/admin-ui-preferences.ts +103 -0
  22. package/src/admin-ui-settings-layout.ts +12 -1
  23. package/src/admin-ui.ts +78 -12
  24. package/src/ensure-account-member.integration.test.ts +1 -1
  25. package/src/member-rows.ts +2 -2
  26. package/src/member-rows.unit.test.ts +2 -2
  27. package/src/test-support/member-id-test-support.ts +1 -1
  28. package/src/timezone-resolver.ts +88 -0
  29. package/src/timezone-resolver.unit.test.ts +127 -0
  30. package/src/user-prefs.integration.test.ts +5 -5
  31. package/src/user-prefs.ts +9 -12
  32. package/prisma/client/models/UserNotificationPrefs.ts +0 -1249
  33. package/src/user-notification-prefs.ts +0 -16
  34. package/src/user-notification-prefs.unit.test.ts +0 -9
@@ -156,17 +156,21 @@ test.describe("member, self-serve off: agents", () => {
156
156
  });
157
157
 
158
158
  test.describe("member, self-serve off: settings and account", () => {
159
- test("no settings are available: no nav and refused URLs", async ({
159
+ test("only Preferences is available: no admin-only nav and refused URLs", async ({
160
160
  page,
161
161
  context,
162
162
  }) => {
163
163
  await harness.signIn(context, EMAILS.member1);
164
164
  const base = harness.adminUrl;
165
165
 
166
- // /admin/settings has no first item for a member and shows no sidebar.
166
+ // /admin/settings lands a member on Preferences, the only item every role
167
+ // has, so the sidebar lists that one entry and nothing admin- or owner-only.
167
168
  const landing = await page.goto(`${base}/admin/settings`);
168
- expect(landing?.status()).toBe(404);
169
- await expect(page.locator("nav.settings-sidebar")).toHaveCount(0);
169
+ expect(landing?.status()).toBe(200);
170
+ await expect(page.locator("nav.settings-sidebar a")).toHaveCount(1);
171
+ await expect(
172
+ page.locator('nav.settings-sidebar a[href^="/admin/settings/preferences"]'),
173
+ ).toHaveCount(1);
170
174
 
171
175
  // A page the member can reach links to none of the admin-only or
172
176
  // owner-only items.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-vitals/agent-admin",
3
- "version": "1.112.0",
3
+ "version": "1.113.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/app-vitals/agent.git",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@anthropic-ai/sdk": "0.137.0",
47
- "@app-vitals/agent-lib": "1.112.0",
47
+ "@app-vitals/agent-lib": "1.113.1",
48
48
  "@hono/zod-openapi": "^1.0.0",
49
49
  "@prisma/adapter-pg": "^7.10.0",
50
50
  "@prisma/client": "^7.10.0",
@@ -153,10 +153,10 @@ export type PushSubscription = Prisma.PushSubscriptionModel
153
153
  */
154
154
  export type ChatThreadWatch = Prisma.ChatThreadWatchModel
155
155
  /**
156
- * Model UserNotificationPrefs
156
+ * Model UserPrefs
157
157
  *
158
158
  */
159
- export type UserNotificationPrefs = Prisma.UserNotificationPrefsModel
159
+ export type UserPrefs = Prisma.UserPrefsModel
160
160
  /**
161
161
  * Model AgentMarketplace
162
162
  *
@@ -177,10 +177,10 @@ export type PushSubscription = Prisma.PushSubscriptionModel
177
177
  */
178
178
  export type ChatThreadWatch = Prisma.ChatThreadWatchModel
179
179
  /**
180
- * Model UserNotificationPrefs
180
+ * Model UserPrefs
181
181
  *
182
182
  */
183
- export type UserNotificationPrefs = Prisma.UserNotificationPrefsModel
183
+ export type UserPrefs = Prisma.UserPrefsModel
184
184
  /**
185
185
  * Model AgentMarketplace
186
186
  *