-
Notifications
You must be signed in to change notification settings - Fork 711
fix: streams list render issue main #8644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR fixes a streams list rendering issue in the IAM role permissions interface. The fix involves two key changes:
EditRole.vue: Moves the parent visibility check (permission.show = true) to execute before stream-specific rendering logic, ensuring parent resources are properly shown when their filtered entities have content.
PermissionsTable.vue: Replaces raw rows array usage with a computed getFilteredRows property that filters by row?.show, improving the accuracy of display conditions and virtual scroll rendering.
These changes address a rendering bug where parent resources weren't being displayed correctly when child entities were filtered, particularly affecting the streams list in the permissions table.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- The changes are focused, well-targeted bug fixes that improve UI rendering logic without introducing side effects. Both changes follow Vue best practices and address a specific rendering issue with clear, logical solutions.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| web/src/components/iam/roles/EditRole.vue | 5/5 | Fixed parent visibility logic by moving filteredEntities check before stream-specific rendering logic |
| web/src/components/iam/roles/PermissionsTable.vue | 5/5 | Improved table rendering by using filtered rows instead of raw rows for display conditions |
Sequence Diagram
sequenceDiagram
participant User
participant EditRole as EditRole.vue
participant PermissionsTable as PermissionsTable.vue
participant API as Backend API
Note over User,API: Streams List Render Issue Fix
User->>EditRole: Load role permissions
EditRole->>API: Fetch role data and resources
API-->>EditRole: Return role permissions and resources
Note over EditRole: updatePermissionVisibility() called
EditRole->>EditRole: Check filteredEntities.length
alt filteredEntities has content
EditRole->>EditRole: Set permission.show = true (moved earlier)
Note over EditRole: Fix ensures parent resources shown<br/>when children are filtered
end
EditRole->>EditRole: Apply stream-specific logic
Note over EditRole: logs, metrics, traces, index handling
EditRole->>PermissionsTable: Pass filtered permissions
Note over PermissionsTable: Template rendering improvements
PermissionsTable->>PermissionsTable: getFilteredRows computed property
Note over PermissionsTable: Uses rows.filter(row => row?.show)<br/>instead of raw rows array
PermissionsTable->>PermissionsTable: Update display conditions
Note over PermissionsTable: v-if="!getFilteredRows.length"<br/>instead of v-if="!rows.length"
PermissionsTable->>PermissionsTable: Update virtual scroll items
Note over PermissionsTable: :items="getFilteredRows"<br/>:items-size="getFilteredRows.length"
PermissionsTable-->>User: Render correctly filtered permissions table
2 files reviewed, no comments
9cc1e95 to
aef6ed3
Compare
358c6b4 to
06d8a6a
Compare
PR Type
Bug fix
Description
Show parent when children visible
Filter rows by show before render
Update empty/loading checks to filtered rows
Limit items-size and rows to filtered data
Diagram Walkthrough
File Walkthrough
EditRole.vue
Ensure parent permission shows when children visibleweb/src/components/iam/roles/EditRole.vue
permission.show = truewhenfilteredEntitiesexistfilteredEntitiesafter processingPermissionsTable.vue
Render only visible rows via computed filterweb/src/components/iam/roles/PermissionsTable.vue
getFilteredRowscomputed to filter byrow.showrowswithgetFilteredRowsacross templatecomputedanddefineEmits