Skip to content

Plans table view for release target should show diff count #1036

Description

@jsbroks
Image

A column showing diff count, would be cool if you could follow how gh does it but thats just extra

Image

Activity

  1. adityachoudhari26 commented on Apr 23, 2026

    @adityachoudhari26
    Member

    @claude fix this

  2. claude commented on Apr 23, 2026

    @claude

    Claude finished @adityachoudhari26's task in 4m 33s —— View job • claude/issue-1036-20260423-1736 • Create PR ➔


    Fixing Plans Table View - Adding Diff Count

    • Gather context and understand the issue
    • Find the Plans table view component (page.$deploymentId.plans.$planId.tsx)
    • Understand the data model (deploymentPlanTargetResult has current/proposed YAML fields)
    • Add diff stats computation to backend results tRPC procedure
    • Update frontend ChangesCell to display GitHub-style +X -Y counts
    • Commit and push changes

    What was changed

    packages/trpc/src/routes/deployment-plans.ts

    • Added a computeDiffStats(current, proposed) helper that uses an LCS (Longest Common Subsequence) algorithm to compute added/removed line counts from the current and proposed YAML fields already stored in the DB
    • Added current and proposed fields to the results query select
    • Returned diffStats: { added, removed } | null in each result

    apps/web/app/routes/ws/deployments/page.$deploymentId.plans.$planId.tsx

    • Added a DiffStats component that renders +X in green and -Y in red (monospace, xs font)
    • Updated ChangesCell to show diff stats alongside the "View diff" button when there are changes

    The result looks like: [ View diff ] +12 -3

    ·

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