Skip to content

feat(dashboard): Add "Pick up where you left off" personalization panel#935

Open
ishaanxgupta wants to merge 21 commits into
mainfrom
feat/personalisation
Open

feat(dashboard): Add "Pick up where you left off" personalization panel#935
ishaanxgupta wants to merge 21 commits into
mainfrom
feat/personalisation

Conversation

@ishaanxgupta
Copy link
Copy Markdown
Contributor

@ishaanxgupta ishaanxgupta commented May 12, 2026

Summary
Adds a new "Pick up where you left off" panel to the home dashboard that displays the user's most recent plugin and MCP activity, filling the empty space to the right of "Suggested for you" on desktop.

Changes

  • New Component: RecentToolUsageCard displays up to 3 recent tool usage items with:
  • Tool icon (from plugin catalog or MCP icon fallback)
  • Tool/client name (e.g., "Claude Code", "OpenCode", "Supermemory MCP")
  • Type label ("Plugin" or "MCP")
  • Relative last-used time (e.g., "2h ago", "Yesterday", "Never used")

Data Layer:

  • Fetches /v3/auth/keys to get API key metadata
  • Parses plugin keys via metadata.sm_type === "plugin_auth" and metadata.sm_client
  • Parses MCP keys via metadata.sm_source === "mcp" or metadata.sm_kind === "mcp_oauth_exchange"
  • Uses lastRequest for recency, falls back to createdAt for connected-but-never-used items
  • Deduplicates by tool ID, keeps most recent usage per tool
image

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 12, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-mcp 504490f May 21 2026, 10:46 AM

@claude
Copy link
Copy Markdown

claude Bot commented May 12, 2026

Claude finished @ishaanxgupta's task in 1m 51s —— View job


Review Complete

  • Fetch PR diff and review changes
  • Check for bugs, security issues, and logic errors
  • Review existing comments to avoid duplicates
  • Submit review findings

Overview: Adds a "Pick up where you left off" panel showing recent plugin/MCP activity.

Issues found:

  1. Character encoding corruption — The TIPS array and other strings in dashboard-view.tsx have corrupted Unicode characters (⌘, â€", etc.). This will cause garbled text in the UI. See inline comment for details.

The new feature logic is well-implemented — date validation, error handling, deduplication, and query gating are all correct. The redirect fix for the reported issue also looks good.

Score: 6/10 — Once the encoding issue is fixed, this is ready to ship.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 12, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 504490f Commit Preview URL

Branch Preview URL
May 21 2026, 10:47 AM

@ishaanxgupta ishaanxgupta changed the title Feat/personalisation feat(dashboard): Add "Pick up where you left off" personalization panel May 12, 2026
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds a "Pick up where you left off" panel showing recent plugin/MCP activity by parsing API key metadata and document sources.

Issues found: None — this looks good to ship.

The implementation is solid:

  • toValidDate properly handles invalid dates with Number.isNaN check
  • JSON.parse of metadata is wrapped in try-catch with graceful fallback
  • Deduplication logic correctly keeps the most recent usage per tool
  • Sorting prioritizes used items over never-used, then by recency
  • Empty state handling is clean
  • React Query usage is correct with appropriate staleTime and enabled conditions

Score: 9/10

Minor note (not blocking): The API keys fetch uses raw fetch while other endpoints use the typed $fetch wrapper. This is fine if /v3/auth/keys isn't in the API schema, but worth considering adding it for consistency if the endpoint stabilizes.

ishaanxgupta and others added 5 commits May 12, 2026 20:27
- 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 <[email protected]>
Copy link
Copy Markdown
Member

@ved015 ved015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds a "Pick up where you left off" panel showing recent plugin/MCP activity by parsing API key metadata and document sources.

Issues found: None — this looks good to ship.

The implementation is solid:

  • toValidDate properly handles invalid dates with Number.isNaN check
  • JSON.parse of metadata is wrapped in try-catch with graceful fallback
  • Deduplication logic correctly keeps the most recent usage per tool
  • Sorting prioritizes used items over never-used, then by recency
  • Empty state handling is clean
  • React Query usage is correct with appropriate staleTime and enabled conditions

Score: 9/10

Minor note (not blocking): The API keys fetch uses raw fetch while other endpoints use the typed $fetch wrapper. This is fine if /v3/auth/keys isn't in the API schema, but worth considering adding it for consistency if the endpoint stabilizes.

Copy link
Copy Markdown
Member

@MaheshtheDev MaheshtheDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not working properly

Image

I click on "No memory saved". It is redirecting me to connect plugins page.

@ishaanxgupta
Copy link
Copy Markdown
Contributor Author

@MaheshtheDev resolved, please have a look

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds a "Pick up where you left off" panel showing recent plugin/MCP activity, with a fix for the redirect issue reported by @MaheshtheDev.

Issues found: None — this looks good to ship.

The fix for the reported issue is correctly implemented:

  • New handleOpenToolDocument function (page.tsx:408-421) properly extracts the document's space/container tag and calls setSelectedProject() before opening the document
  • This ensures clicking a tool usage item navigates to the correct space context instead of redirecting to the plugins page

The implementation remains solid:

  • toValidDate properly handles invalid dates with Number.isNaN check
  • JSON.parse of metadata is wrapped in try-catch with graceful fallback
  • Deduplication logic correctly keeps the most recent usage per tool
  • Query enabled condition now includes !!org?.id to prevent premature fetching
  • Empty state handling is clean

Score: 9/10

@ishaanxgupta
Copy link
Copy Markdown
Contributor Author

@claude resolve these conflicts

@claude
Copy link
Copy Markdown

claude Bot commented May 20, 2026

Claude encountered an error after 1m 40s —— View job


Resolving Merge Conflicts

  • Check for merge conflicts with main branch
  • Fetch full git history (shallow clone detected)
  • Resolve conflicts in apps/web/components/dashboard-view.tsx
  • Resolve conflicts in apps/web/middleware.ts
  • Commit and push resolved changes

Found 2 files with conflicts:

  • apps/web/components/dashboard-view.tsx
  • apps/web/middleware.ts

Resolving...

# Conflicts:
#	apps/web/components/dashboard-view.tsx
#	apps/web/middleware.ts
Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds a "Pick up where you left off" panel showing recent plugin/MCP activity by parsing API key metadata and document sources.

Issues found:

  1. Character encoding corruption (blocking): The TIPS array and several other strings throughout dashboard-view.tsx have corrupted Unicode characters. Special characters like , , , , and · are displaying as mojibake (⌘, â€", âœ", â†', ·). This will cause garbled text in the UI for all users.

The new feature implementation itself is solid:

  • toValidDate correctly uses Number.isNaN for date validation
  • JSON.parse of metadata is properly wrapped in try-catch
  • Deduplication and sorting logic is correct
  • Query enabled conditions properly gate fetches on org?.id
  • The fix for @MaheshtheDev's reported redirect issue looks correct

Score: 6/10 — The encoding issue is a significant visual bug that affects the entire dashboard. Once fixed, this should be ready to ship.

Comment thread apps/web/components/dashboard-view.tsx Outdated
const TIPS: Record<Profession, string[]> = {
developer: [
"Use K to search code snippets and docs by intent, not just keywords",
"Use ⌘K to search code snippets and docs by intent, not just keywords",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Character encoding corruption

The entire TIPS array and other strings have corrupted Unicode characters:

  • ⌘ (command symbol)
  • â€" (em dash)
  • âœ" (checkmark)
  • â†' (arrow)
  • ·Â· (middle dot)

This will cause garbled text to appear in the UI. For example, users will see "Use ⌘K to search..." instead of "Use ⌘K to search...".

This appears to be a UTF-8 encoding issue that occurred during the commit process (possibly text was re-encoded as Latin-1 then interpreted as UTF-8, or vice versa).

Fix: Restore the original UTF-8 characters throughout this file. You can run:

git diff origin/main -- apps/web/components/dashboard-view.tsx | grep "^-.*[⌘—✓→·]"

to see the original correct characters that need to be restored.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude fix this

Copy link
Copy Markdown

@claude claude Bot May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @ishaanxgupta's task in 1m 2s —— View job


Fixing Character Encoding

  • Read dashboard-view.tsx to identify all corrupted characters
  • Fix UTF-8 encoding issues (⌘, —, ✓, →, · etc.)
  • Commit and push the fix

Fixed all corrupted Unicode characters in dashboard-view.tsx:

  • ⌘ (command symbol)
  • â€" (em dash)
  • âœ" (checkmark)
  • â†' (arrow)
  • ·· (middle dot)

55 occurrences replaced across the TIPS array, plugin taglines, and UI strings.

Fix corrupted Unicode characters (⌘, —, ✓, →, ·) that were displaying
as mojibake (⌘, â€", âœ", â†', ·) in the TIPS array and other strings.

Co-authored-by: Ishaan Gupta <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants