supermemoryai / supermemory

Build your own second brain with supermemory. It's a ChatGPT for your bookmarks. Import tweets or save websites and content using the chrome extension.
https://supermemory.ai
MIT License
6.22k stars 594 forks source link

optimistic ui with jobs table, half baked (need to test & work on design) #228

Closed CodeTorso closed 1 month ago

CodeTorso commented 1 month ago

Optimistic UI with Jobs Table, Half Baked

Overview

This pull request introduces significant enhancements to the Memories Page component within the web application. The primary focus is on integrating a new data structure called Job into the existing MemoriesAndSpaces object, which previously only contained Content and StoredSpace data. This update aims to improve the user interface by displaying unsaved job data alongside saved memories.

Changes

✨ Generated with love by Kaizen ❤️

Original Description None
kaizen-bot[bot] commented 1 month ago

Code Review

Attention Required: This PR has potential issues. 🚨

Direct use of JSON.stringify in JSX

Avoid using `JSON.stringify` directly in JSX for rendering as it can lead to unexpected output or errors. It's generally preferable to extract the desired values and format them appropriately for display. Potential Solution: 1. Extract the relevant information from `memoriesAndSpaces.unSavedMemories`. 2. Format the extracted data into a user-friendly string or use JSX elements for structured display.

apps/web/app/(dash)/(memories)/content.tsx | 235 - 235

reason_for_request: Directly using `JSON.stringify` in JSX can lead to unexpected output, especially when dealing with nested objects or arrays. It might not always render as intended and can hinder the user experience. Additionally, if the data contains circular references, it can cause runtime errors.

level: [critical] , severity: [10]

✨ Generated with love by Kaizen ❤️

Useful Commands
Dhravya commented 1 month ago

Excited for this

CodeTorso commented 1 month ago

Excited for this

this implementation sucks, should wait for the backend change, till then will make a workaround in the next pr that is #232