kleneway / jacob

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

Update Dashboard to use new Plan from events #73

Open kleneway opened 1 month ago

kleneway commented 1 month ago

Update Dashboard to use new Plan from events

Description

The current Dashboard has a "Plan" tab in the workspace that displays an array of plan steps to the user. Currently, the dashboard uses a hardcoded set of plan steps using an outdated Plan type. We recently added Plan and PlanStep types in the agent/plan.ts file and new events for those Plan and PlanStep objects that are emitted when the Planning agent creates a new plan. We need to update the dashboard to use these new events from the database from the existing "events" router.

Requirements

  1. Remove outdated Plan types and functions:

    • Remove the existing plan types from router/events.ts and data/plans.ts.
    • Remove the getPlanForTaskSubType function.
  2. Update Task type:

    • Update the Task type in router/events.ts to use the new Plan instead of the old Plan.
    • Update the code in router/events.ts to add the plan and plan steps from the events.
  3. Update Dashboard's onAdd functionality:

    • Modify the onAdd functionality in Dashboard.tsx to add the Plan and plan steps when new ones are created.
    • Add the plan to the task and the plan steps to the plan.
  4. Update Workspace components:

    • Update workspace/index.tsx and workspace/Plan.tsx to account for the new Plan type.
    • Set the current plan step to the first step in the plan (if it exists) in the footer of the main Workspace index page.

Files to Update:

Acceptance Criteria:

@jacob-ai-bot

Steps to Address Issue: 1. Remove outdated Plan types and functions from router/events.ts and data/plans.ts

  1. Update Task type in router/events.ts to use new Plan type
  2. Modify onAdd functionality in Dashboard.tsx to add new Plan and PlanSteps
  3. Update workspace/index.tsx and workspace/Plan.tsx to use new Plan type
  4. Set current plan step to first step in plan in Workspace index page footer

Files to Update: src/app/dashboard/[org]/[repo]/[developer]/Dashboard.tsx, src/server/api/routers/events.ts, src/app/dashboard/[org]/[repo]/[developer]/components/workspace/index.tsx, src/app/dashboard/[org]/[repo]/[developer]/components/workspace/Plan.tsx, src/data/plans.ts

task assigned to: @jacob-ai-bot

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

JACoB here...

You mentioned me on this issue and I am busy taking a look at it.

I'll continue to comment on this issue with status as I make progress.

jacob-local-kevin[bot] commented 1 month ago

Update

I've completed my initial work on this issue and have created a pull request: JACoB PR for Issue Update Dashboard to use new Plan from events.

The changes currently result in an error, so I'll be making some additional changes before it is ready to merge.