supermemory/packages/lib
vorflux 8071a7b085 Add Nova workspace prompt settings (#1323)
Adds a dedicated Workspace Prompt editor for Company Brain organizations while preserving the existing Organization Context ingestion-filter controls for every organization manager.

## Changes

- Keeps Organization Context byte-for-byte unchanged and available independently to all organization managers.
- Adds Workspace Prompt as a separate Company-Brain-only section below it, using the established settings styling and contextual divider.
- Describes Workspace Prompt as persistent guidance that can shape operating preferences, priorities, source/tool choices, workflows, terminology, formatting, and communication style.
- Adds nullable, 1,500-character `workspacePrompt` support to shared request, GET response, and PATCH response contracts.
- Aligns PATCH validation with the real `{ orgId, orgSlug, updated }` API response.
- Merges canonical `updated` settings into the submitting organization’s cache, then exactly refetches that organization.
- Preserves drafts during background refetches, isolates organization switches, retains actionable errors, accessibility, empty `filterPrompt` compatibility, and `X-App-Source: nova`.

## Testing

- Passed focused Biome checks on all changed files.
- Passed `packages/lib` and `packages/validation` TypeScript checks.
- Verified GET/PATCH settings response contracts, partial/null/limit validation, canonical cache merge, and exact organization-bound invalidation.
- Verified Organization Context remains unchanged and Workspace Prompt is separately Company-Brain/manager-gated.
- Confirmed no remaining Workspace Persona identifiers.
- Public preview returns HTTP 200; authenticated settings interactions remain unavailable without a saved OAuth session.
- Full web type-check remains blocked by unrelated baseline diagnostics; none reference changed files.
- No dedicated tests were added, per requester instruction.

---
**Session Details**
- Session: [View Session](https://supermemory.us1.vorflux.com/agent-sessions/7544b72b-aeca-48e2-81c3-514df21cd081)
- Requested by: Soham Daga (soham@supermemory.com)
- Address comments on this PR. Add `(aside)` to your comment to have me ignore it.
2026-07-29 21:13:59 +00:00
..
api.ts Add Nova workspace prompt settings (#1323) 2026-07-29 21:13:59 +00:00
auth-context.tsx feat(web): company brain entitlement helper, hook + ?org deep-link activation (#1110) 2026-06-22 17:54:13 +00:00
auth.middleware.ts New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00
auth.ts feat: add X-App-Source header to Nova + remove notify checkbox (#926) 2026-05-11 13:11:04 -07:00
constants.ts feat(web): company brain entitlement helper, hook + ?org deep-link activation (#1110) 2026-06-22 17:54:13 +00:00
error-tracking.tsx feat: optional posthog intialization (#525) 2025-10-27 16:10:15 -07:00
generate-id.ts perf(lib): hoist customAlphabet factory in generateId (#1204) 2026-07-10 19:15:21 -07:00
glass-effect-manager.ts New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00
package.json 😭 fixing builds (#767) 2026-03-05 19:26:05 -08:00
posthog.tsx feat(web): add Slack connect card to home + space selector polish (#1137) 2026-06-22 18:20:09 +00:00
queries.ts docs(brain): note trial attach after Slack OAuth (#1313) 2026-07-21 21:34:25 +00:00
query-client.tsx New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00
similarity.ts New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00
tsconfig.json New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00
types.ts feat(web): company brain entitlement helper, hook + ?org deep-link activation (#1110) 2026-06-22 17:54:13 +00:00
utils.ts New Version of Supermemory Consumer App 2025-08-16 18:50:10 -07:00