Skip to content

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

Closed

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

  1. integry commented on Oct 8, 2025

    @integry
    OwnerAuthor

    Here is the suggested implementation to resolve the issue:

    The fix involves modifying a single return statement in src/worker.js to ensure the claudeResult object is persisted in the job's return value.

    --- a/src/worker.js
    +++ b/src/worker.js
    @@ -632,7 +632,8 @@
             return {
                 status: 'complete',
                 commit: commitResult?.commitHash,
    -            pullRequestNumber
    +            pullRequestNumber,
    +            claudeResult
             };
     
         } catch (error) {
    
  2. propr-dev commented on Oct 8, 2025

    @propr-dev
    Contributor

    🤖 AI processing has started for this issue using claude-sonnet-4-5-20250929 model.

    I'll analyze the problem and work on a solution. This may take a few minutes.

    Processing Details:

    • Model: claude-sonnet-4-5-20250929
    • Branch: ai-fix/115-feat-ui-display-llm-promp-20251008-0906-claude-sonnet-4-5-20250929-khb
    • Base Branch: main
    • Worktree: issue-115-20251008-0906-claude-sonnet-4-5-20250929-khb
  3. added a commit that references this issue on Oct 8, 2025
  4. added a commit that references this issue on Oct 8, 2025
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions