mlim-usfca / PersonalKnowledge

https://personal-knowledge.vercel.app
0 stars 0 forks source link

Refactor response in "Add New Category" Supabase Function #54

Closed TanyaaCJain closed 6 months ago

TanyaaCJain commented 6 months ago

Description

The current implementation of the "Add New Category" feature in our backend does not send the full category object to Supabase. This omission hinders the application's state management capability to accurately map categories to their respective links within the correct chat interface.

Impact

Expected Behavior

When a new category is added via the Supabase function, the complete category object should be sent and processed. This would allow the frontend state to be updated appropriately, maintaining the integrity of the chat interface's link-category mapping.

Please Note - The frontend state management slice has an async thunk that must update for the entire flow to be functional. Modifications elsewhere in the application, such as writing independent functions do not inherently handle the state management functions, as done before for saved content feature. This fix in #50 can be referenced for this implementation as well.

Steps to Reproduce

These steps are reproducible post PR #50

  1. Go to the Saved interface.
  2. Attempt to add a new category and associate a link with it.
  3. Go to the Chat interface.
  4. Attempt to query Dragon AI for the new category just added.
  5. Notice the erroneous response in category-link mapping.

Proposed Solution

Acceptance Criteria

Please prioritize this issue as it is critical to the user experience and the overall functionality of our chat interfaces. @inhwaS

TanyaaCJain commented 6 months ago

Closing as the originating bug is defined in #61 and this does not seem to be the issue.