Commit graph

1605 commits

Author SHA1 Message Date
Ishaan Gupta
82c308be49
Merge branch 'main' into feat/personalisation 2026-05-16 18:32:28 +05:30
vorflux
b6913a0375 feat: highlight chat shows inline reply and uses highlight as assistant's first message (#944)
## Summary

Changes the highlight "Chat" button behavior:

- **Before**: Clicking "Chat" immediately opened the chat view with "Tell me more about XYZ" sent as the user's first message
- **After**: Clicking "Chat" reveals an inline reply input right under the highlight card. The user types their response, and when they submit:
  - The highlight content appears as the **assistant's first message** (prefixed with "Here is a highlight from your memories:")
  - The user's reply appears as the second message
  - A fresh chat thread is created (no overwriting existing conversations)

### Files Changed

- **`apps/web/components/highlights-card.tsx`** - Added inline reply input UI with send/cancel buttons, keyboard handling (Enter/Escape), auto-focus, and state reset on item navigation or items refresh
- **`apps/web/components/chat/index.tsx`** - Added `queuedHighlightContent` prop, fresh thread creation for highlight chats, deferred `setMessages` to ensure correct Chat instance targeting, and `awaitingHighlightInjectionRef` for safe reply dispatch
- **`apps/web/app/(app)/page.tsx`** - Added `queuedHighlightContent` state, updated `handleHighlightsChat` to accept highlight content + user reply, cleared stale highlight content in `handleHomeChatStart`
- **`apps/web/components/dashboard-view.tsx`** - Updated `onHighlightsChat` type signature
- **`apps/web/components/memories-grid.tsx`** - Updated `HighlightsProps.onChat` type signature

## Testing

### TypeScript
- `npx tsc --noEmit` — no new type errors (all errors are pre-existing in unrelated files)

### Biome
- `bunx biome check --write` — clean on all changed files (pre-existing warnings only in dashboard-view.tsx)

### Automated Tests (via testing subagent)
- **25 passed / 0 failed / 1 skipped** (26 total)
- Tests covered: inline reply input visibility, keyboard handling (Enter/Escape), reply state reset on navigation, highlight content injection as assistant message, user reply dispatch, fresh thread creation, stale highlight content prevention, pagination dot handler
- The testing agent discovered and fixed a race condition where `setMessages` was called before `useChat` had recreated its internal Chat object after `setFallbackChatId` — the fix defers `setMessages` to a separate effect gated on `currentChatId` matching the target
- 1 test skipped (T12): Nova FAB button not separately visible from highlights card button at 1440px viewport — expected structural behavior

---
**Session Details**
- Session: [View Session](https://supermemory.us1.vorflux.com/agent-sessions/9cbf2106-b7b9-4d7c-b275-2a7e72417793)
- Requested by: Soham Daga (soham@supermemory.com)
- Address comments on this PR. Add `(aside)` to your comment to have me ignore it.
2026-05-16 08:11:08 +00:00
MaheshtheDev
ee7951f6ba fix(mcp): align oauth protected-resource metadata with MCP 2025-06-18 spec (#945)
## Summary

Fixes MCP OAuth discovery so the client-server handshake actually validates against the **MCP 2025-06-18 authorization spec** (which adopts RFC 9728 Protected Resource Metadata + RFC 8707 Resource Indicators).

Previously, a client connecting to `https://mcp.dev.supermemory.ai/mcp` would receive `resource: "https://mcp.supermemory.ai"` (bare host, prod fallback) and reject the connection:

> Protected resource https://mcp.supermemory.ai does not match expected https://mcp.dev.supermemory.ai/mcp (or origin)

## Changes

- **`resource` now includes the `/mcp` endpoint path** — the spec wants the canonical MCP server URI, and the bundled `@modelcontextprotocol/sdk` reference implementation emits the same shape (`new URL(rsPath, base).href`). Bare-host worked with lenient clients that fell back to origin-matching; strict clients rejected it.
- **Path-suffixed metadata route** added at `/.well-known/oauth-protected-resource/mcp` alongside the bare path. The SDK's `metadataHandler` mounts under the resource path, so this matches what spec-strict clients probe first.
- **`WWW-Authenticate`'s `resource_metadata` URL** points to the canonical full URL (`https://host/.well-known/oauth-protected-resource/mcp`).
- **Centralized base-URL derivation** in a new `mcpBaseUrl()` helper, with priority:
  1. `MCP_URL` env var — set by portless dev script so dev requests resolve to the tunneled host, not whatever the local proxy sticks in `Host`
  2. `x-forwarded-host` / `host` request headers
  3. `https://mcp.supermemory.ai` last-resort fallback (only hit when the worker can't see the inbound host at all)

## Production impact

`MCP_URL` is dev-only (not in `wrangler.jsonc` vars), so prod falls through to the `Host` header → `https://mcp.supermemory.ai/mcp`. The wire change in prod is that `resource` now ends with `/mcp` instead of being bare — spec-correct, what strict clients require, and tolerated by lenient ones.

## Contributor DX

Added `apps/mcp/.dev.vars.example` documenting `API_URL`, `MCP_URL`, and `POSTHOG_API_KEY` for contributors running plain `wrangler dev` without portless.

## Test plan

- [x] `curl https://mcp.dev.supermemory.ai/.well-known/oauth-protected-resource` returns `resource: https://mcp.dev.supermemory.ai/mcp`
- [x] `curl https://mcp.dev.supermemory.ai/.well-known/oauth-protected-resource/mcp` returns the same payload
- [x] 401 from `/mcp` carries `WWW-Authenticate: Bearer resource_metadata="…/oauth-protected-resource/mcp"`
- [x] MCP client (vscode extension) connects successfully — previously failed with the resource-mismatch error
- [ ] Verify in prod that bare-host clients continue to work after deploy
2026-05-15 23:56:25 +00:00
ved015
4e607f9fd7 fix: Add plugin document rendering and MCP preview support (#938)
<h3>Implement comprehensive plugin document rendering support including MCP previews and plugin specific content handling.</h3>
<br>
<br>

<img width="1680" height="471" alt="Screenshot 2026-05-12 at 8 24 49 PM" src="https://github.com/user-attachments/assets/f1294bc2-2841-4833-9f01-ac47b8c52c01" />

<br>
<br>

<img width="1680" height="963" alt="Screenshot 2026-05-12 at 8 28 25 PM" src="https://github.com/user-attachments/assets/9436c7ab-3b9b-4366-86fd-1465407ff0f9" />
2026-05-15 18:26:37 +00:00
Ishaan Gupta
5065d66989
add responsivness in share graph, bookmark section, navigation controls (#940)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-15 08:37:01 -07:00
Ishaan Gupta
06d5bbfefa
add codex plugin logo and add in description (#943) 2026-05-15 08:25:43 -07:00
vorflux
1f2b5dfca2 docs: add filtered writes documentation (#834)
### TL;DR

Documents the new `filterByMetadata` parameter for the memory ingestion API, added in [supermemoryai/mono#1283](https://github.com/supermemoryai/mono/pull/1283).

### What changed?

- Added a new "Filtered Writes" section to the `add-memories.mdx` page explaining how to scope memory context during ingestion
- Added `filterByMetadata` to the Parameters table with a link to the new section
- Included TypeScript, Python, and cURL examples
- Documented scalar vs array value matching semantics (AND/OR logic)

### Key documentation points

- The metadata itself is still written to the document, but memories are only built on top of existing memories matching the filter
- Scalar values match exactly, array values create OR conditions
- Multiple keys are combined with AND logic

### Related

- Implementation PR: [supermemoryai/mono#1283](https://github.com/supermemoryai/mono/pull/1283)

---
**Session Details**
- Session: [View Session](https://supermemory.us1.vorflux.com/agent-sessions/14d33783-50b0-4fc8-8e0f-abc6346336f1)
- Requested by: Dhravya Shah (dhravya@supermemory.com)
- Address comments on this PR. Add `(aside)` to your comment to have me ignore it.
2026-05-15 14:53:54 +00:00
claude[bot]
91b96c679f fix: remove duplicate codex key in PLUGIN_INFO
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-15 08:08:04 +00:00
ved015
6fa2a8c70e add support for other plugins 2026-05-15 13:13:31 +05:30
MaheshtheDev
aa83c0bc12 fix: onboarding bounce rate (#942) 2026-05-14 14:37:05 +00:00
Prasanna
0b5081698c
docs: fix s3 connector config shape (#941) 2026-05-13 12:40:22 -07:00
Ishaan Gupta
0ae8200c4f add title in place of name 2026-05-13 21:26:01 +05:30
MaheshtheDev
62ac31ecaa chore: theme default fix (#929) 2026-05-13 14:17:51 +00:00
Ishaan Gupta
bc97cb6862 remove unused imports 2026-05-13 11:15:28 +05:30
Ishaan Gupta
89777ce8b0 add plugin on top and on hover show summary 2026-05-13 11:05:51 +05:30
claude[bot]
6cd2547dc2 fix: add missing closing parenthesis in handleOpenToolDocument callback
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-13 04:41:27 +00:00
Ishaan Gupta
44ac45fb53
Merge branch 'main' into feat/personalisation 2026-05-13 10:09:13 +05:30
Ishaan Gupta
da1d6476be add recent section 2026-05-13 10:06:35 +05:30
ved015
5cf770336a fix recent convo and redirect path 2026-05-12 23:16:00 +05:30
claude[bot]
e14e418854 fix: apply Biome formatting to dashboard-view.tsx
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-12 15:46:05 +00:00
Ishaan Gupta
b8d2caee53 Merge branch 'feat/personalisation' of https://github.com/supermemoryai/supermemory into feat/personalisation 2026-05-12 21:05:37 +05:30
Ishaan Gupta
eddd799504 enhance UI of personalisation section 2026-05-12 20:55:55 +05:30
claude[bot]
5259180cce fix lint errors in dashboard-view.tsx
- Replace non-null assertions with nullish coalescing fallbacks
- Rename unused parameter with underscore prefix
- Apply Biome formatting fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-12 15:00:23 +00:00
Ishaan Gupta
37a07184bf enhance UI of personalisation section 2026-05-12 20:27:18 +05:30
ved015
f604f96a41 add orgid back removed when testing in local 2026-05-12 19:55:46 +05:30
ved015
5ce1247847 add codex plugin 2026-05-12 19:51:44 +05:30
vorflux[bot]
68a7781de7
feat: add connector sync visibility to NOVA settings page (#930)
Co-authored-by: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com>
Co-authored-by: Mahesh Sanikommu <maheshthedev@gmail.com>
2026-05-12 11:59:56 +05:30
MaheshtheDev
5a0dffbc4c feat: in-app subscription cancellation for paid plans (#934)
## Summary
- Add a "Cancel subscription" button to the billing card for Pro and Scale users, alongside the existing "Manage billing" portal link.
- Cancellation is scheduled end-of-cycle via `autumn.updateSubscription({ planId, cancelAction: "cancel_end_of_cycle" })`, so users keep paid features until period end.
- Confirmation dialog surfaces remaining days from `useTokenUsage` and the correct plan name (Pro/Scale).
- Enterprise users do not see the cancel button — contract-based, portal/sales only.

Previously, the only path off a paid plan was Autumn's external customer portal, which contradicted the in-app "cancel anytime from the Billing tab" copy in the support FAQ.
2026-05-12 05:36:27 +00:00
MaheshtheDev
085c3dd8b3 feat: add codex and revamp plugins page (#931) 2026-05-11 23:13:08 +00:00
Mahesh Sanikommu
6437814f25
feat: add X-App-Source header to Nova + remove notify checkbox (#926)
Co-authored-by: Ishaan Gupta <ishaankone@gmail.com>
Co-authored-by: Vedant Mahajan <vedant.04.mahajan@gmail.com>
Co-authored-by: Akhilesh Arora <akhildawra@gmail.com>
2026-05-11 13:11:04 -07:00
Vedant Mahajan
bb50685ff4
Fix chat auto-scroll during streaming responses (#928)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-11 11:10:05 -07:00
Vedant Mahajan
82ff92b560
fix: fetch chat history when opening recent conversations sheet (#919) 2026-05-11 11:09:11 -07:00
Sreeram
b9f3bcad93
convex integration with supermemory (#880)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-11 10:59:14 -07:00
vorflux[bot]
7c9f2efc4c
fix: redirect new users to onboarding from plugin connect page (#908)
Co-authored-by: Vorflux AI <noreply@vorflux.com>
Co-authored-by: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com>
2026-05-11 10:57:43 -07:00
Mahesh Sanikommu
787fadf648
fix: remove excessive bottom padding below input bar on mobile dashboard (#925) 2026-05-11 20:38:28 +05:30
Ishaan Gupta
55558f5562
fix: Implement the onboarding account lookup (#913) 2026-05-11 02:29:15 -07:00
Akhilesh Arora
9cae1959c8
security(browser-extension): fix DOM-based XSS vulnerability (#838) 2026-05-11 02:26:42 -07:00
MaheshtheDev
b0e5766a65 feat: make graph popover content scrollable and add View full button (#920)
Some checks failed
Publish Memory Graph / publish (push) Has been cancelled
## Summary

Addresses user feedback about the graph view: content in node popovers was hard-truncated at 100 characters with no way to read the full text or navigate to the document.

### Changes

**Scrollable popover content (no more truncation)**
- Removed the `truncate(content, 100)` call -- full content is now rendered in the popover
- Made the content area scrollable with `maxHeight: 100px` and `overflowY: auto`
- Increased version timeline entry truncation from 60 to 120 characters
- Increased version timeline container height from 120px to 160px

**"View document" in shortcuts panel**
- Added an eye icon + "View document" entry to the shortcuts panel (alongside existing arrow navigation)
- Clicking opens the Document Modal for the corresponding document
- Works for both document nodes (opens that document) and memory nodes (opens the parent document)
- Popover is automatically dismissed before the modal opens (prevents z-index overlap)
- Wired `onOpenDocument` callback through the full component chain: `page.tsx` -> `GraphLayoutView` -> `MemoryGraph` wrapper -> `MemoryGraphBase` -> `NodeHoverPopover`

**Shortcuts panel visual cleanup**
- Icon badges (`KeyBadge`) retain dark background and border for a keyboard-key badge look
- All icons (including the new EyeIcon) are uniformly wrapped in `KeyBadge` for consistent styling
- Removed background, border, and border-radius from the shortcuts panel container itself
- Widened shortcuts panel from 100px to 160px so navigation labels are fully visible

**Type safety improvement**
- Changed `MemoryGraphProps.colors` from `GraphThemeColors` to `Partial<GraphThemeColors>` to match actual usage (callers pass partial overrides that get merged with defaults)
- Replaced `as Partial<typeof import(...)>` cast with proper `satisfies Partial<GraphThemeColors>` using a direct type import

### Files changed
- `packages/memory-graph/src/components/node-hover-popover.tsx` -- scrollable content, EyeIcon + "View document" in shortcuts, KeyBadge styling, NavButton icon type broadened to `React.ReactNode`, all icons wrapped in KeyBadge
- `packages/memory-graph/src/components/memory-graph.tsx` -- popover dismissal wrapper (`handleOpenDocument`), prop forwarding
- `packages/memory-graph/src/types.ts` -- `onOpenDocument` prop on `MemoryGraphProps`, `colors` changed to `Partial<GraphThemeColors>`
- `apps/web/components/graph-layout-view.tsx` -- accepts and passes `onOpenDocument`
- `apps/web/components/memory-graph/memory-graph-wrapper.tsx` -- `onOpenDocument` in wrapper props, clean type import
- `apps/web/app/(app)/page.tsx` -- `handleOpenDocumentById` handler, wired to `GraphLayoutView`

## Testing

### Unit Tests (154/154 passed)
- **Command:** `cd packages/memory-graph && bun run test`
- **Result:** 9 test files, 154 tests passed (107 existing + 47 new)
- **New test file:** `packages/memory-graph/src/__tests__/node-hover-popover.test.tsx` covering:
  - Layout constants (`SHORTCUTS_W=160`, `CARD_W=280`, `TOTAL_W` formula)
  - Content area scrollability (`maxHeight:100`, `overflowY:auto`, `flex:1 1 auto`, no truncation)
  - KeyBadge styles (has `backgroundColor: colors.controlBg`, has `border` with `colors.controlBorder`)
  - Shortcuts panel styles (no `backgroundColor`, no `border`, no `borderRadius`)
  - EyeIcon SVG component (`aria-hidden`, viewBox, path, circle, stroke)
  - "View document" button render guard (`onOpenDocument && documentId`)
  - `documentId` derivation (memory vs document node)
  - VersionTimeline truncation limit (120 chars) and container maxHeight (160)
  - `onOpenDocument` prop wiring
  - NavButton icon prop type (`React.ReactNode`), all icons wrapped in KeyBadge
  - `handleOpenDocument` wrapper in MemoryGraph (dismiss calls, ordering, useCallback deps)

### Build
- **Command:** `bun run --filter=@supermemory/memory-graph build`
- **Result:** Build succeeds, 0 errors

### Lint/Format
- **Command:** `bunx biome ci --changed --since=origin/main --no-errors-on-unmatched`
- **Result:** 6 files checked, no fixes applied, 0 errors

### Type Checking
- `packages/memory-graph`: 0 errors
- `apps/web`: 0 new errors introduced

### CI
- "CI - Type Check, Format & Lint" workflow passes
- "Claude Code Review" workflow fails due to repo config (`non-human actor: vorflux` not in `allowed_bots` list) -- not related to code changes

---
**Session Details**
- Session: [View Session](https://supermemory.us1.vorflux.com/agent-sessions/d0c067f1-38c1-40c5-ada9-b2ffb7331d1c)
- Requested by: Mahesh Sanikommu (mahesh@supermemory.com)
- Address comments on this PR. Add `(aside)` to your comment to have me ignore it.
2026-05-11 02:09:36 +00:00
Ishaan Gupta
f045f863c0
fix: improve settings sidebar overflow (#924)
Co-authored-by: ved015 <vedant.04.mahajan@gmail.com>
2026-05-10 17:56:28 -07:00
Vedant Mahajan
2d44ecda1e
Fix mobile header layout and space selector dropdown alignment (#921) 2026-05-10 17:56:08 -07:00
Ishaan Gupta
ae35b7a0e5
fix: Usagemeter not defined error [P0] (#922) 2026-05-10 17:55:50 -07:00
MaheshtheDev
1acc156363 fix: payment upgrade issue (#918) 2026-05-09 19:52:21 +00:00
MaheshtheDev
8f6c16de49 chore: improve the codebase with react doctor (#917) 2026-05-09 19:12:01 +00:00
Mahesh Sanikommu
0cbcd44e76
fix: mobile view usage bar fix (#914) 2026-05-09 11:29:14 -07:00
Dhravya Shah
03e37df455
fix: update web app for presigned R2 URL compatibility (#916) 2026-05-09 10:25:33 -07:00
Vedant Mahajan
5771618dbb
Fix missing blue gradient (Nova tint) on mobile and adjust position (#911) 2026-05-09 09:18:08 -07:00
Ishaan Gupta
45979647c1 fix minor bugs 2026-05-09 21:13:49 +05:30
Ishaan Gupta
47bd9805ef
fix responsiveness for graph layout (#910) 2026-05-08 21:10:05 -07:00
MaheshtheDev
debac33eba feat: autumn migration (#902) 2026-05-08 22:42:55 +00:00
ved015
72fd8749d3 add user personalization section 2026-05-08 21:35:30 +05:30