Repository navigation
feat(AuditLog): Filter the organisation audit log by scope - #8941
talissoncosta wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
74c1767 to
6a718ab
Compare
|
Folded into #8940 for now. |
323daba to
bf74ed0
Compare
6a718ab to
7470b48
Compare
7470b48 to
3f336e7
Compare
3f336e7 to
9d152d5
Compare
82843df to
037f138
Compare
037f138 to
c9e83db
Compare
c9e83db to
f3314d5
Compare
Outside click, Escape and focus in one place. The old Popover and FocusMonitor go, and the PanelSearch sort menu moves to the new one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…few options Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keyboard and screen readers now work, a click never unselects, and the dot uses tokens. The feature import strategy moves to it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Docker builds report
|
There was a problem hiding this comment.
8 issues found across 46 files
Confidence score: 3/5
useAuditLogScopeData.tscan show the previous organisation’s projects while the new query is loading. UsecurrentDatafor the project list and colour map.ScopeCard.tsxcan show a selection that no longer matches the URL after browser back/forward navigation. Syncmodewhenscope.typechanges.Chip.tsxdrops the remove action when bothonChangeandonRemoveare set. Keep removal available or reject that prop combination.Chip.tsxstays visually unchecked whenonChangeis set withoutchecked, even after a click. Requirecheckedin this mode or manage the state internally.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="frontend/web/components/audit-log/useAuditLogScopeData.ts">
<violation number="1" location="frontend/web/components/audit-log/useAuditLogScopeData.ts:29">
P2: When `organisationId` changes, `projects.data` can still contain the previous organisation's projects while the new query fetches, and `isLoading` remains false. Use `currentData` for the list and colour map, and show loading when fetching without current data.</violation>
</file>
<file name="frontend/web/components/base/Chip/Chip.tsx">
<violation number="1" location="frontend/web/components/base/Chip/Chip.tsx:19">
P2: With `onChange` but no `checked`, the input stays controlled at `false`, so clicks call the callback without ever showing a selected state. Require `checked` in the checkbox mode or manage the omitted case internally.</violation>
<violation number="2" location="frontend/web/components/base/Chip/Chip.tsx:81">
P2: A chip configured with both `onChange` and `onRemove` loses its remove action because this branch returns before rendering the remove button. Keep removal available outside the label, or reject this prop combination in `ChipProps`.</violation>
</file>
<file name="frontend/web/components/audit-log/__tests__/auditLogFilters.test.ts">
<violation number="1" location="frontend/web/components/audit-log/__tests__/auditLogFilters.test.ts:16">
P3: These added test cases omit the required Given/When/Then structure. Add the phase markers to each test body to follow the test convention.</violation>
<violation number="2" location="frontend/web/components/audit-log/__tests__/auditLogFilters.test.ts:77">
P3: This case does not exercise invalid environment IDs because the invalid project makes parsing return `all` first. Add a valid project with an invalid environment to verify environment IDs are filtered.</violation>
</file>
<file name="frontend/web/components/audit-log/OrganisationAuditLogFilters/ScopeCard/ScopeCard.tsx">
<violation number="1" location="frontend/web/components/audit-log/OrganisationAuditLogFilters/ScopeCard/ScopeCard.tsx:34">
P2: `mode` only reads `scope.type` on mount, so browser back/forward while the popover is open leaves the selected segment and visible sections out of sync with the URL. Sync `mode` when `scope.type` changes.</violation>
</file>
<file name="frontend/web/components/audit-log/auditLogScopeFilter.ts">
<violation number="1" location="frontend/web/components/audit-log/auditLogScopeFilter.ts:7">
P3: Repeated `environment` parameters make the label overstate the selection (`?project=12&environment=4&environment=4` shows “2 environments” for one environment); could `toIds` deduplicate its results?</violation>
</file>
<file name="frontend/web/components/audit-log/OrganisationAuditLogFilters/ScopeCard/useScrollSelectedIntoView.ts">
<violation number="1" location="frontend/web/components/audit-log/OrganisationAuditLogFilters/ScopeCard/useScrollSelectedIntoView.ts:15">
P2: When projects are still loading, this one-time effect finds no checked row and never recentres the selection after the query renders it. Rerun the effect when project data changes so a selected project beyond the visible rows is brought into view.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23163 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #23163 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-16 — run #23163 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #23163 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23162 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #23162 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #23162 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #23162 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #23157 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-16 — run #23157 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #23157 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #23157 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
|
Visual Regression24 screenshots compared. See report for details. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Auto-approval blocked by 3 unresolved issues from previous reviews.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Adds organisation audit-log scope filtering with URL state, rebuilding Popover, Chip, Radio and SegmentedControl. Declining because dismissed findings leave the scope card stale on back/forward and the Popover still has a known clipping edge case.
View guided diff | Turn on auto-fix | Re-trigger cubic
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to #8889
Stacked on #8940.
Filter the organisation audit log by scope. A Scope control beside the search opens a card:
Base components, used here first:
Popoverrebuilt on Floating UI: outside click, Escape and focus handled in one place. The oldPopoverandFocusMonitorare removed, and thePanelSearchsort menu moves to the new one.useOutsideClickaccepts the nullable refs React 19 creates.Chipgets a toggle mode: a checkbox chip that turns accent and shows a tick when checked.SegmentedControl: one choice from a few, as a radio group with arrow keys.Radiorebuilt around a native input: keyboard and screen readers now work, a click never unselects, and the dot uses tokens. The scope card's project list uses it.Two changes here are outside the flag: the
PanelSearchsort menu, and the merge strategy radios on the feature import page.Why Floating UI for the
Popover:d-none, so parents withoverflow: hiddenclipped it, and it never flipped near the edge of the window. The new one renders in a portal, flips and shifts to stay on screen, and caps its height to the space left.@ts-ignore.@floating-ui/reactwas already installed throughreact-datepicker; it is now a direct dependency. It only positions and handles interactions, so it sits under our own components, unlike react-aria or Radix.Next: the stories, then the RTL tests for these components.
How did you test this code?
scope=organisationto the URL; the Audit Log tab resets search and scope.PanelSearchsort menu opens, sorts, and closes on picking an option, outside click and Escape, with focus back on the trigger.