Skip to content

1143 delete multiple jobs changes#1272

Merged
anurag91jain merged 4 commits intodevfrom
1143-delete-multiple-jobs-changes
Jun 10, 2025
Merged

1143 delete multiple jobs changes#1272
anurag91jain merged 4 commits intodevfrom
1143-delete-multiple-jobs-changes

Conversation

@SindhuHarika
Copy link
Copy Markdown
Contributor

Description

Made some changes to how the Removefromdb reactor is called, instead of passing a comma separated string, passing an array as input to the reactor.

@SindhuHarika SindhuHarika requested a review from a team as a code owner June 6, 2025 06:33
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 6, 2025

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

1143 delete multiple jobs changes


User description

Description

Made some changes to how the Removefromdb reactor is called, instead of passing a comma separated string, passing an array as input to the reactor.


PR Type

Enhancement


Description

  • Use JSON.stringify for job arrays in delete call

  • Remove manual join and quoting logic

  • Keep fallback for single-job deletion


Changes walkthrough 📝

Relevant files
Enhancement
JobsPage.tsx
Simplify multi-job deletion string construction                   

packages/client/src/pages/jobs/JobsPage.tsx

  • Replaced manual string joins with JSON.stringify for arrays
  • Removed extra quotes and comma formatting logic
  • Kept single-item deletion branch unchanged
  • +3/-3     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @SindhuHarika SindhuHarika requested a review from johbaxter June 6, 2025 06:34
    @github-actions
    Copy link
    Copy Markdown

    github-actions bot commented Jun 6, 2025

    @CodiumAI-Agent /review

    @github-actions
    Copy link
    Copy Markdown

    github-actions bot commented Jun 6, 2025

    @CodiumAI-Agent /improve

    @SindhuHarika SindhuHarika linked an issue Jun 6, 2025 that may be closed by this pull request
    3 tasks
    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Logical Condition

    The if (jobId.length > 1 && jobGroup.length > 1) only triggers when both arrays have multiple items.
    If one array has multiple entries but the other doesn't, you fall back to the single-item branch and drop extra items.

    if (jobId.length > 1 && jobGroup.length > 1) {
        pixel = `META | RemoveJobFromDB(jobId=${JSON.stringify(
            jobId,
        )}, jobGroup=${JSON.stringify(jobGroup)}) `;
    Payload Formatting

    Ensure that JSON.stringify(jobId) and JSON.stringify(jobGroup) produce the exact pixel payload format
    expected by the RemoveJobFromDB reactor (brackets, quoting, spacing).

    pixel = `META | RemoveJobFromDB(jobId=${JSON.stringify(
        jobId,
    )}, jobGroup=${JSON.stringify(jobGroup)}) `;

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Serialize when either array is multi-item

    Use a logical OR instead of AND to ensure that multiple entries in either array are
    serialized, not just when both arrays have more than one element. This prevents
    losing context when one array is single-item and the other is multi-item.

    packages/client/src/pages/jobs/JobsPage.tsx [157]

    -if (jobId.length > 1 && jobGroup.length > 1) {
    +if (jobId.length > 1 || jobGroup.length > 1) {
    Suggestion importance[1-10]: 4

    __

    Why: Changing the condition to use || alters the business logic by serializing when only one array is multi-item, which may or may not be intended but isn’t critical and has moderate impact.

    Low

    @anurag91jain anurag91jain merged commit 012493b into dev Jun 10, 2025
    3 checks passed
    @anurag91jain anurag91jain deleted the 1143-delete-multiple-jobs-changes branch June 10, 2025 04:45
    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /update_changelog

    @QodoAI-Agent
    Copy link
    Copy Markdown

    Changelog updates: 🔄

    2025-06-10

    Changed

    • Pass arrays to the RemoveJobFromDB reactor instead of comma-separated strings

    to commit the new content to the CHANGELOG.md file, please type:
    '/update_changelog --pr_update_changelog.push_changelog_changes=true'

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

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    Create multi-delete functionality for jobs (FE)

    4 participants