Skip to content

Company member access group#1778

Merged
lyubov-voloshko merged 4 commits into
mainfrom
company-member-access-group
May 15, 2026
Merged

Company member access group#1778
lyubov-voloshko merged 4 commits into
mainfrom
company-member-access-group

Conversation

@lyubov-voloshko
Copy link
Copy Markdown
Collaborator

@lyubov-voloshko lyubov-voloshko commented May 15, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced the company members table with an interactive popup displaying detailed access information, including connection titles, databases, and associated groups when hovering over the access indicator.
  • Style

    • Added dark mode styling support for the new access information popup.
  • Chores

    • Integrated Mermaid diagram rendering support into the application.

Review Change Stack

lyubov-voloshko and others added 3 commits May 15, 2026 10:25
Add mermaid.min.js to angular.json scripts so ngx-markdown can use the
mermaid attribute, and add the required `provide: MERMAID_OPTIONS` key
to satisfy the TypedValueProvider type constraint.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…table

Shows a CDK overlay popup on hover of the check_circle icon listing each
connection (title + database name) and its groups for the member.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use Material font tokens for font-family/size and tighten gaps between connections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 15, 2026 10:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@lyubov-voloshko has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 35 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 055b6687-5bb9-4472-9130-50723ba83f50

📥 Commits

Reviewing files that changed from the base of the PR and between bd8c045 and af9e209.

📒 Files selected for processing (1)
  • frontend/src/app/components/company/company.component.spec.ts
📝 Walkthrough

Walkthrough

This PR adds an interactive access popup to the company component's member table, displaying connection and group membership details. It introduces new TypeScript data models, updates the component template to use CDK overlay directives, adds CSS styling, and configures Mermaid build and markdown support.

Changes

Member Access Popup Feature

Layer / File(s) Summary
Membership Data Models
frontend/src/app/models/company.ts
New CompanyMembershipGroup and CompanyMembershipConnection interfaces define group identifiers and connection metadata; Company interface extended with user_membership array property.
Component Overlay Template & Logic
frontend/src/app/components/company/company.component.ts, frontend/src/app/components/company/company.component.html
Component imports and registers CDK overlay directives; template replaces static icon display with hover-triggered cdkConnectedOverlay popup that renders connection titles, database names, and group titles via nested @if/@for directives.
Access Popup Styling
frontend/src/app/components/company/company.component.css, frontend/src/styles.scss
CSS block for .access-popup with connection and group subsection styles, dark-mode color overrides, and whitespace formatting adjustment.
Mermaid Build & Markdown Configuration
frontend/angular.json, frontend/src/main.ts
Angular build configuration includes Mermaid script in output; application bootstrap configures Mermaid options (auto-load disabled, theme from prefers-color-scheme: dark) via ngx-markdown provider.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A popup springs forth with a hop and a bound,
Connections and groups are now gently unwound,
With CDK overlay and dark-mode delight,
The access details shine forth in the light! ✨

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Company member access group' accurately reflects the core change: adding UI to display company member access groups with a popup interface showing membership connections and groups.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Security Check ✅ Passed PR follows OWASP rules. Safe text interpolation, no XSS/injection vulnerabilities, secure Mermaid config, properly typed data. No security reductions detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch company-member-access-group

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lyubov-voloshko lyubov-voloshko enabled auto-merge May 15, 2026 10:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds UI and model support for displaying a company member’s connection/group access details (via a hover popup), and adjusts Mermaid integration/configuration used by Markdown-rendered content.

Changes:

  • Extend CompanyMember to include per-connection membership/group details (user_membership) and related model types.
  • Update the Company members table “Access” column to show a CDK overlay popup with connection + group information.
  • Adjust Mermaid configuration for ngx-markdown and add Mermaid as a global build script.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/src/styles.scss Adds a blank line (no functional impact).
frontend/src/main.ts Updates ngx-markdown Mermaid options provisioning.
frontend/src/app/models/company.ts Adds membership/group model types and CompanyMember.user_membership.
frontend/src/app/components/company/company.component.ts Imports CDK overlay directives for the new access popup.
frontend/src/app/components/company/company.component.html Replaces access icons with a hover-triggered overlay showing access details.
frontend/src/app/components/company/company.component.css Adds styling for the new access details popup.
frontend/angular.json Adds Mermaid as a global script asset.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

is_2fa_enabled: boolean;
role: CompanyMemberRole;
has_groups: boolean;
user_membership: CompanyMembershipConnection[];
Comment on lines +209 to +223
<mat-icon class="company-member-cell_accessed" fontSet="material-symbols-outlined"
#overlayOrigin="cdkOverlayOrigin"
cdkOverlayOrigin
(mouseenter)="element._popupOpen = true"
(mouseleave)="element._popupOpen = false">check_circle</mat-icon>
<ng-template
cdkConnectedOverlay
[cdkConnectedOverlayOrigin]="overlayOrigin"
[cdkConnectedOverlayOpen]="element._popupOpen"
[cdkConnectedOverlayPositions]="[
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -4 },
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 4 }
]"
[cdkConnectedOverlayHasBackdrop]="false">
<div class="access-popup" (mouseleave)="element._popupOpen = false">
Comment on lines +212 to +223
(mouseenter)="element._popupOpen = true"
(mouseleave)="element._popupOpen = false">check_circle</mat-icon>
<ng-template
cdkConnectedOverlay
[cdkConnectedOverlayOrigin]="overlayOrigin"
[cdkConnectedOverlayOpen]="element._popupOpen"
[cdkConnectedOverlayPositions]="[
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -4 },
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 4 }
]"
[cdkConnectedOverlayHasBackdrop]="false">
<div class="access-popup" (mouseleave)="element._popupOpen = false">
Comment on lines +209 to +214
<mat-icon class="company-member-cell_accessed" fontSet="material-symbols-outlined"
#overlayOrigin="cdkOverlayOrigin"
cdkOverlayOrigin
(mouseenter)="element._popupOpen = true"
(mouseleave)="element._popupOpen = false">check_circle</mat-icon>
<ng-template
Comment thread frontend/angular.json
"includePaths": ["node_modules/@brumeilde/ngx-theme/presets/material"]
},
"scripts": [],
"scripts": ["node_modules/mermaid/dist/mermaid.min.js"],
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/app/components/company/company.component.html`:
- Around line 208-237: The access popup is only triggered by mouse events
(mouseenter/mouseleave) so add keyboard support by making the trigger icon
focusable (add tabindex) and handling focus/blur and keyboard events to toggle
element._popupOpen; specifically, update the mat-icon that uses overlayOrigin
and element._popupOpen to include tabindex and (focus)="element._popupOpen =
true", (blur)="element._popupOpen = false", and a (keydown) handler that opens
on Enter/Space and closes on Escape, and ensure the cdkConnectedOverlay has
appropriate aria attributes (aria-haspopup, aria-expanded bound to
element._popupOpen) so screen readers and keyboard users can open/close the
overlay created by cdkConnectedOverlay consistently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f5e7361a-412b-4167-ba43-4555c06cfe86

📥 Commits

Reviewing files that changed from the base of the PR and between c702b0f and bd8c045.

📒 Files selected for processing (7)
  • frontend/angular.json
  • frontend/src/app/components/company/company.component.css
  • frontend/src/app/components/company/company.component.html
  • frontend/src/app/components/company/company.component.ts
  • frontend/src/app/models/company.ts
  • frontend/src/main.ts
  • frontend/src/styles.scss

Comment on lines +208 to +237
@if (element.has_groups) {
<mat-icon class="company-member-cell_accessed" fontSet="material-symbols-outlined"
#overlayOrigin="cdkOverlayOrigin"
cdkOverlayOrigin
(mouseenter)="element._popupOpen = true"
(mouseleave)="element._popupOpen = false">check_circle</mat-icon>
<ng-template
cdkConnectedOverlay
[cdkConnectedOverlayOrigin]="overlayOrigin"
[cdkConnectedOverlayOpen]="element._popupOpen"
[cdkConnectedOverlayPositions]="[
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -4 },
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 4 }
]"
[cdkConnectedOverlayHasBackdrop]="false">
<div class="access-popup" (mouseleave)="element._popupOpen = false">
@for (conn of element.user_membership; track conn.id) {
<div class="access-popup__connection">
<span class="access-popup__connection-title">{{ conn.title }}</span>
<span class="access-popup__connection-db">{{ conn.database }}</span>
@for (group of conn.groups; track group.id) {
<span class="access-popup__group">{{ group.title }}</span>
}
</div>
}
</div>
</ng-template>
} @else {
<mat-icon class="company-member-cell_not-accessed" fontSet="material-symbols-outlined">cancel</mat-icon>
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make the access popup keyboard-accessible.

The popup is currently mouse-only (mouseenter/mouseleave), so keyboard users can’t open or inspect access details.

Suggested minimal fix
- <mat-icon class="company-member-cell_accessed" fontSet="material-symbols-outlined"
+ <mat-icon class="company-member-cell_accessed" fontSet="material-symbols-outlined"
+     tabindex="0"
+     role="button"
+     aria-label="Show member access details"
      `#overlayOrigin`="cdkOverlayOrigin"
      cdkOverlayOrigin
      (mouseenter)="element._popupOpen = true"
-     (mouseleave)="element._popupOpen = false">check_circle</mat-icon>
+     (mouseleave)="element._popupOpen = false"
+     (focus)="element._popupOpen = true"
+     (blur)="element._popupOpen = false">check_circle</mat-icon>

- <div class="access-popup" (mouseleave)="element._popupOpen = false">
+ <div class="access-popup"
+      (mouseenter)="element._popupOpen = true"
+      (mouseleave)="element._popupOpen = false">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@if (element.has_groups) {
<mat-icon class="company-member-cell_accessed" fontSet="material-symbols-outlined"
#overlayOrigin="cdkOverlayOrigin"
cdkOverlayOrigin
(mouseenter)="element._popupOpen = true"
(mouseleave)="element._popupOpen = false">check_circle</mat-icon>
<ng-template
cdkConnectedOverlay
[cdkConnectedOverlayOrigin]="overlayOrigin"
[cdkConnectedOverlayOpen]="element._popupOpen"
[cdkConnectedOverlayPositions]="[
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -4 },
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 4 }
]"
[cdkConnectedOverlayHasBackdrop]="false">
<div class="access-popup" (mouseleave)="element._popupOpen = false">
@for (conn of element.user_membership; track conn.id) {
<div class="access-popup__connection">
<span class="access-popup__connection-title">{{ conn.title }}</span>
<span class="access-popup__connection-db">{{ conn.database }}</span>
@for (group of conn.groups; track group.id) {
<span class="access-popup__group">{{ group.title }}</span>
}
</div>
}
</div>
</ng-template>
} @else {
<mat-icon class="company-member-cell_not-accessed" fontSet="material-symbols-outlined">cancel</mat-icon>
}
`@if` (element.has_groups) {
<mat-icon class="company-member-cell_accessed" fontSet="material-symbols-outlined"
tabindex="0"
role="button"
aria-label="Show member access details"
`#overlayOrigin`="cdkOverlayOrigin"
cdkOverlayOrigin
(mouseenter)="element._popupOpen = true"
(mouseleave)="element._popupOpen = false"
(focus)="element._popupOpen = true"
(blur)="element._popupOpen = false">check_circle</mat-icon>
<ng-template
cdkConnectedOverlay
[cdkConnectedOverlayOrigin]="overlayOrigin"
[cdkConnectedOverlayOpen]="element._popupOpen"
[cdkConnectedOverlayPositions]="[
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -4 },
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 4 }
]"
[cdkConnectedOverlayHasBackdrop]="false">
<div class="access-popup"
(mouseenter)="element._popupOpen = true"
(mouseleave)="element._popupOpen = false">
`@for` (conn of element.user_membership; track conn.id) {
<div class="access-popup__connection">
<span class="access-popup__connection-title">{{ conn.title }}</span>
<span class="access-popup__connection-db">{{ conn.database }}</span>
`@for` (group of conn.groups; track group.id) {
<span class="access-popup__group">{{ group.title }}</span>
}
</div>
}
</div>
</ng-template>
} `@else` {
<mat-icon class="company-member-cell_not-accessed" fontSet="material-symbols-outlined">cancel</mat-icon>
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/app/components/company/company.component.html` around lines 208
- 237, The access popup is only triggered by mouse events
(mouseenter/mouseleave) so add keyboard support by making the trigger icon
focusable (add tabindex) and handling focus/blur and keyboard events to toggle
element._popupOpen; specifically, update the mat-icon that uses overlayOrigin
and element._popupOpen to include tabindex and (focus)="element._popupOpen =
true", (blur)="element._popupOpen = false", and a (keydown) handler that opens
on Enter/Space and closes on Escape, and ensure the cdkConnectedOverlay has
appropriate aria attributes (aria-haspopup, aria-expanded bound to
element._popupOpen) so screen readers and keyboard users can open/close the
overlay created by cdkConnectedOverlay consistently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lyubov-voloshko lyubov-voloshko merged commit 7b279d7 into main May 15, 2026
13 of 16 checks passed
@lyubov-voloshko lyubov-voloshko deleted the company-member-access-group branch May 15, 2026 10:56
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.

2 participants