Skip to content

Feat(UI): Display LLM prompt for PR comment followup tasks #115

Description

@integry

Task Description

Currently, the "View Prompt" button in the Task Details view of the GitFix UI works correctly for standard issue processing tasks. However, this functionality is missing for PR comment followup tasks.

The goal of this task is to enable the "View Prompt" feature for these followup tasks to achieve feature parity and improve debuggability.

The Problem

The root cause is that the processPullRequestCommentJob in src/worker.js does not include the claudeResult object in its return value upon completion. The dashboard's backend API (/api/task/:taskId/history) relies on this return value being present in the completed BullMQ job data to reconstruct the task's history. Without it, the frontend TaskDetails.jsx component never receives the sessionId or conversationId needed to fetch and display the prompt.

Implementation Steps

  1. Modify src/worker.js:

    • Locate the processPullRequestCommentJob function.
    • Find the final return statement within the main try block.
    • Update the returned object to include the claudeResult, which is already available in the function's scope. This should apply to both successful runs (with or without code changes).
  2. Verification:

    • No backend or frontend code changes should be necessary beyond the worker modification.
    • After implementing the change, trigger a PR comment followup task.
    • Navigate to the Task Details view for that task in the GitFix UI.
    • Confirm that a "View Prompt" button appears in the CLAUDE_EXECUTION or CLAUDE_COMPLETED history step.
    • Click the button and verify that the correct LLM prompt is displayed in a modal window.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions