Skip to content

CS-365 [Feature] - Add ability to edit/delete findings from admin dashboard#2833

Open
github-actions[bot] wants to merge 6 commits into
mainfrom
chas/edit-delete-finding-in-admin
Open

CS-365 [Feature] - Add ability to edit/delete findings from admin dashboard#2833
github-actions[bot] wants to merge 6 commits into
mainfrom
chas/edit-delete-finding-in-admin

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 13, 2026

This is an automated pull request to merge chas/edit-delete-finding-in-admin into dev.
It was created by the [Auto Pull Request] action.


Summary by cubic

Adds edit and delete controls for findings in the admin orgs dashboard. Supports CS-365 with a platform-admin DELETE endpoint, an edit sheet for content/status/severity, and a delete flow that keeps the confirm dialog open while the request runs.

  • New Features

    • Admin UI: per-row actions menu; inline status select; edit sheet to update content, status, and severity; delete with confirmation and toasts; confirm dialog stays open during delete and only closes on success.
    • API: DELETE /v1/admin/organizations/:orgId/findings/:findingId for platform admins; findings.service.delete accepts memberId: null; test added for admin delete.
  • Refactors

    • Extracted row UI to AdminFindingRow and moved edit UI to EditFindingSheet; simplified FindingsTab by removing duplicate formatting/status code and wiring in the edit/delete flows.

Written for commit aa7a2d5. Summary will update on new commits.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment May 14, 2026 1:55pm
comp-framework-editor Ready Ready Preview, Comment May 14, 2026 1:55pm
portal Ready Ready Preview, Comment May 14, 2026 1:55pm

Request Review

@chasprowebdev chasprowebdev changed the title [dev] [chasprowebdev] chas/edit-delete-finding-in-admin CS-365 [Feature] - Add ability to edit/delete findings from admin dashboard May 13, 2026
@linear
Copy link
Copy Markdown

linear Bot commented May 13, 2026

CS-365

@chasprowebdev
Copy link
Copy Markdown
Contributor

Recording:

edit-delete-finding.mov

@chasprowebdev
Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it.

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented May 13, 2026

@cubic-dev-ai please review it.

@chasprowebdev I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 6 files

Confidence score: 3/5

  • There is a concrete user-facing behavior risk in apps/app/src/app/(app)/[orgId]/admin/organizations/[adminOrgId]/components/FindingsTab.tsx: AlertDialogAction can close the confirmation immediately, even before the async delete state is set.
  • If the delete API fails, the dialog may already be dismissed, which hurts retry flow and can make failure handling feel broken for admins.
  • This lands at moderate merge risk because the issue is reproducible and high-confidence (5/10 severity, 8/10 confidence), but it appears scoped to one interaction path rather than broadly destabilizing the PR.
  • Pay close attention to apps/app/src/app/(app)/[orgId]/admin/organizations/[adminOrgId]/components/FindingsTab.tsx - ensure the dialog stays open during async delete/failure so users can retry.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/app/src/app/(app)/[orgId]/admin/organizations/[adminOrgId]/components/FindingsTab.tsx">

<violation number="1" location="apps/app/src/app/(app)/[orgId]/admin/organizations/[adminOrgId]/components/FindingsTab.tsx:201">
P2: `AlertDialogAction` auto-closes on click, so this async delete flow can close the dialog before `deleting` is set. If the API call fails, the confirmation closes anyway instead of staying open for retry.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

@chasprowebdev
Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review this.

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented May 14, 2026

@cubic-dev-ai please review this.

@chasprowebdev I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants