kleneway / jacob

Just Another Coding Bot
https://jacb.ai
Apache License 2.0
0 stars 0 forks source link

"Generate Research" Button Remains Disabled When Switching Todos #122

Open kleneway opened 1 month ago

kleneway commented 1 month ago

Description

In the Todo frontend dashboard, there's a bug where the "Generate Research" button stays grayed out when a user navigates from one todo to another while research is being generated. This persistent disabled state occurs because the generate state is managed by a single boolean value, which incorrectly affects all todos instead of handling each todo's state individually.

Steps to Reproduce

  1. Open the Todo dashboard in your browser.
  2. Select a specific todo item from the list.
  3. Click the "Generate Research" button for the selected todo.
  4. While the research is being generated, navigate to a different todo item.
  5. Observe the state of the "Generate Research" button in the newly selected todo.

Expected Behavior

Each todo item's "Generate Research" button should manage its own state independently. When generating research for one todo:

Actual Behavior

After initiating research generation for a specific todo and navigating to a different todo:

Additional Information

The issue stems from the generate state being managed globally with a single boolean value. Implementing individual state management for each todo item will ensure that the "Generate Research" button accurately reflects the status of each todo independently.

Suggested Fix

Refactor the state management logic to handle the generate state on a per-todo basis. This can be achieved by: