feat: make graph popover content scrollable and add View full button#920
Conversation
|
Claude finished @MaheshtheDev's task in 5m 43s —— View job Review Complete
Result: No issues found. The PR correctly implements scrollable popover content and the "View document" button with proper prop threading, defensive guards, and popover dismissal logic. Score: 10/10 |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | b0e5766 | May 11 2026, 02:10 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | b0e5766 | Commit Preview URL Branch Preview URL |
May 11 2026, 02:11 AM |
There was a problem hiding this comment.
Overview: Makes graph popover content scrollable and adds a "View full" button to open the document modal directly from the graph view.
Issues found: None — this looks good to ship.
Details reviewed:
documentIdis correctly derived: usesMemoryNodeData.documentId(always present per type definition and data construction inuse-graph-data.ts:208) for memory nodes,node.idfor document nodes- Defensive guard
{onOpenDocument && documentId && ...}correctly prevents rendering the button when either is falsy handleOpenDocumentwrapper properly dismisses the popover (setSelectedNode(null),setHoveredNode(null)) before invoking the callback, preventing z-index overlap with the modal- Card height calculation correctly accounts for the optional button row via
viewFullRowH - Prop threading is clean through the component chain
- Analytics tracking matches the existing pattern in
handleOpenDocument
Score: 10/10
There was a problem hiding this comment.
Overview: Makes graph popover content scrollable and adds a "View full" button to open the document modal directly from the graph view.
Issues found: None — this looks good to ship.
Details reviewed:
documentIdis correctly derived: usesMemoryNodeData.documentId(always present per type definition and data construction inuse-graph-data.ts:208) for memory nodes,node.idfor document nodes- Defensive guard
{onOpenDocument && documentId && ...}correctly prevents rendering the button when either is falsy handleOpenDocumentwrapper properly dismisses the popover (setSelectedNode(null),setHoveredNode(null)) before invoking the callback, preventing z-index overlap with the modal- Card height calculation correctly accounts for the optional button row via
viewFullRowH - Prop threading is clean through the component chain
- Analytics tracking matches the existing pattern in
handleOpenDocument
Score: 10/10
Merge activity
|
There was a problem hiding this comment.
Overview: Makes graph popover content scrollable and adds a "View full" button to open the document modal directly from the graph view.
Issues found: None — this looks good to ship.
Details reviewed:
documentIdis correctly derived: usesMemoryNodeData.documentId(always present per type definition and data construction inuse-graph-data.ts:208) for memory nodes,node.idfor document nodes- Defensive guard
{onOpenDocument && documentId && ...}correctly prevents rendering the button when either is falsy handleOpenDocumentwrapper properly dismisses the popover (setSelectedNode(null),setHoveredNode(null)) before invoking the callback, preventing z-index overlap with the modal- Card height calculation correctly accounts for the optional button row via
viewFullRowH - Prop threading is clean through the component chain
- Analytics tracking matches the existing pattern in
handleOpenDocument
Score: 10/10
…920) ## 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.
c30c2fa to
b0e5766
Compare
…920) ## 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.
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)
truncate(content, 100)call -- full content is now rendered in the popovermaxHeight: 100pxandoverflowY: auto"View document" in shortcuts panel
onOpenDocumentcallback through the full component chain:page.tsx->GraphLayoutView->MemoryGraphwrapper ->MemoryGraphBase->NodeHoverPopoverShortcuts panel visual cleanup
KeyBadge) retain dark background and border for a keyboard-key badge lookKeyBadgefor consistent stylingType safety improvement
MemoryGraphProps.colorsfromGraphThemeColorstoPartial<GraphThemeColors>to match actual usage (callers pass partial overrides that get merged with defaults)as Partial<typeof import(...)>cast with propersatisfies Partial<GraphThemeColors>using a direct type importFiles changed
packages/memory-graph/src/components/node-hover-popover.tsx-- scrollable content, EyeIcon + "View document" in shortcuts, KeyBadge styling, NavButton icon type broadened toReact.ReactNode, all icons wrapped in KeyBadgepackages/memory-graph/src/components/memory-graph.tsx-- popover dismissal wrapper (handleOpenDocument), prop forwardingpackages/memory-graph/src/types.ts--onOpenDocumentprop onMemoryGraphProps,colorschanged toPartial<GraphThemeColors>apps/web/components/graph-layout-view.tsx-- accepts and passesonOpenDocumentapps/web/components/memory-graph/memory-graph-wrapper.tsx--onOpenDocumentin wrapper props, clean type importapps/web/app/(app)/page.tsx--handleOpenDocumentByIdhandler, wired toGraphLayoutViewTesting
Unit Tests (154/154 passed)
cd packages/memory-graph && bun run testpackages/memory-graph/src/__tests__/node-hover-popover.test.tsxcovering:SHORTCUTS_W=160,CARD_W=280,TOTAL_Wformula)maxHeight:100,overflowY:auto,flex:1 1 auto, no truncation)backgroundColor: colors.controlBg, hasborderwithcolors.controlBorder)backgroundColor, noborder, noborderRadius)aria-hidden, viewBox, path, circle, stroke)onOpenDocument && documentId)documentIdderivation (memory vs document node)onOpenDocumentprop wiringReact.ReactNode), all icons wrapped in KeyBadgehandleOpenDocumentwrapper in MemoryGraph (dismiss calls, ordering, useCallback deps)Build
bun run --filter=@supermemory/memory-graph buildLint/Format
bunx biome ci --changed --since=origin/main --no-errors-on-unmatchedType Checking
packages/memory-graph: 0 errorsapps/web: 0 new errors introducedCI
non-human actor: vorfluxnot inallowed_botslist) -- not related to code changesSession Details
(aside)to your comment to have me ignore it.