Skip to content

Follow-up: Queries and Policies page "Manage Automations" buttons not visible as admin#40435

Merged
nulmete merged 3 commits intomainfrom
nulmete/manage-automations-queries-policies-followup
Feb 25, 2026
Merged

Follow-up: Queries and Policies page "Manage Automations" buttons not visible as admin#40435
nulmete merged 3 commits intomainfrom
nulmete/manage-automations-queries-policies-followup

Conversation

@nulmete
Copy link
Copy Markdown
Member

@nulmete nulmete commented Feb 24, 2026

Related issue: Resolves #25080 (specifically this comment #25080 (comment))

Checklist for submitter

  • Changes file added (has already been added as part of previous PRs).

Testing

  • QA'd all new/changed functionality manually
Screen.Recording.2026-02-24.at.6.10.25.PM.mov

Comment on lines +18 to +20
return (
selectableRows.length > 0 && selectableRows.every((row) => row.isSelected)
);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

probably an existing bug; every returns true for empty arrays

@nulmete nulmete marked this pull request as ready for review February 24, 2026 21:11
@nulmete nulmete requested a review from a team as a code owner February 24, 2026 21:11
Comment on lines +98 to +106
// Hide the selection column if the current page has no selectable rows
// (e.g., all rows are inherited policies that can't be selected)
const pageHasSelectableRows =
!viewingTeamPolicies ||
isPrimoMode ||
policiesList.some((p) => p.team_id !== null);

const hasPermissionAndPoliciesToDelete =
canAddOrDeletePolicies && hasPoliciesToDelete;
canAddOrDeletePolicies && hasPoliciesToDelete && pageHasSelectableRows;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we have this pattern in the Reports page so I decided to follow that.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 24, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.26%. Comparing base (1c67a06) to head (9e3c1be).
⚠️ Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
...es/queries/ManageQueriesPage/ManageQueriesPage.tsx 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #40435      +/-   ##
==========================================
- Coverage   66.27%   66.26%   -0.02%     
==========================================
  Files        2461     2460       -1     
  Lines      197510   197230     -280     
  Branches     8754     8655      -99     
==========================================
- Hits       130902   130691     -211     
+ Misses      54762    54714      -48     
+ Partials    11846    11825      -21     
Flag Coverage Δ
frontend 54.14% <75.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@RachelElysia RachelElysia left a comment

Choose a reason for hiding this comment

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

lgtm!

@nulmete nulmete merged commit 1f662ca into main Feb 25, 2026
17 checks passed
@nulmete nulmete deleted the nulmete/manage-automations-queries-policies-followup branch February 25, 2026 11:49
nulmete added a commit that referenced this pull request Feb 25, 2026
… visible as admin (#40435)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #25080 (specifically this comment
#25080 (comment))

# Checklist for submitter

- [x] Changes file added (has already been added as part of previous
PRs).

## Testing

- [x] QA'd all new/changed functionality manually



https://github.com/user-attachments/assets/e9d1e38c-8a6d-4cc9-9af2-a1466ba3454f
nulmete added a commit that referenced this pull request Feb 25, 2026
… visible as admin (#40435) (#40479)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->

Already merged to main.

**Related issue:** Resolves #25080 (specifically this comment
#25080 (comment))

# Checklist for submitter

- [x] Changes file added (has already been added as part of previous
PRs).

## Testing

- [x] QA'd all new/changed functionality manually




https://github.com/user-attachments/assets/e9d1e38c-8a6d-4cc9-9af2-a1466ba3454f
@georgekarrv georgekarrv mentioned this pull request Mar 3, 2026
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.

Queries and Policies page "Manage Automations" buttons not visible as admin [REOPENED]

2 participants