jacob-ai-bot / jacob

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

Add Live Updates to JACoB Assigned-Tasks Workspace #161

Closed kleneway closed 3 weeks ago

kleneway commented 3 weeks ago

Description

Enhance the JACoB assigned-tasks workspace by implementing real-time live updates. When new events are received through the subscription (api.events.onAdd.useSubscription in TasksPage.tsx), the workspace should automatically update to display the specific component associated with the latest event related to the selected task. This ensures that users always see the most recent activity without needing to manually refresh the workspace.

Current Behavior

Desired Behavior

Implementation Details

  1. Event Handling:

    • Listen for new events using api.events.onAdd.useSubscription in TasksPage.tsx.
    • Filter events to determine if they are related to the currently selected task.
  2. Component Rendering:

    • Utilize the event.type from the TaskType enumeration to decide which component to render.
    • Update the workspace UX to display the relevant component corresponding to the latest event in the events array.
    export enum TaskType {
     task = "task",
     code = "code",
     design = "design",
     terminal = "terminal",
     plan = "plan",
     plan_step = "plan step",
     prompt = "prompt",
     issue = "issue",
     pull_request = "pull request",
     command = "command",
    }
  3. Data Management:

    • Create a new TRPC route to fetch events for a given repository and issue ID.
    • Ensure events are sorted from oldest to newest.
    • As new events arrive, append them to the local events array using setState in TaskPage.tsx.

Acceptance Criteria

Additional Information

jacob-ai-bot[bot] commented 3 weeks 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-ai-bot[bot] commented 3 weeks ago

Update

I've completed my work on this issue and have created a pull request: JACoB PR for Issue Add Live Updates to JACoB Assigned-Tasks Workspace.

Please review my changes there.

jacob-ai-bot[bot] commented 3 weeks ago

Update

I've updated this pull request: JACoB PR for Issue Add Live Updates to JACoB Assigned-Tasks Workspace.

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

jacob-ai-bot[bot] commented 3 weeks ago

Update

I've updated this pull request: JACoB PR for Issue Add Live Updates to JACoB Assigned-Tasks Workspace.

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

jacob-ai-bot[bot] commented 3 weeks ago

Update

I've updated this pull request: JACoB PR for Issue Add Live Updates to JACoB Assigned-Tasks Workspace.

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

jacob-ai-bot[bot] commented 3 weeks ago

Update

I've completed my work on this issue and have updated this pull request: JACoB PR for Issue Add Live Updates to JACoB Assigned-Tasks Workspace.

Please review my changes there.