Skip to content

feat(org-lens): give easycla its own sidebar section - #3436

Open
ahmedomosanya wants to merge 10 commits into
mainfrom
feat/issue-3358-easycla-management-section
Open

ahmedomosanya wants to merge 10 commits into
mainfrom
feat/issue-3358-easycla-management-section

Conversation

@ahmedomosanya

Copy link
Copy Markdown
Contributor

Moves EasyCLA out of Organization Engagement into its own EasyCLA Management section, directly above Organization Profile, still behind org-lens-cla-m3-enabled. The entry now also stays highlighted on an agreement's detail page. That is an opt-in setting on sidebar items and only EasyCLA uses it, so every other entry keeps exact-match highlighting.

Closes #3358

EasyCLA is an administrative surface, not an engagement page. With
org-lens-cla-m3-enabled on it is now the only entry of an expanded
EasyCLA Management section directly above Organization Profile, and
Organization Engagement is back to its six engagement pages. With
the flag off neither renders.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
Sidebar links only highlight on an exact path match, so the EasyCLA
entry went dark on /org/{organization}/easycla/{claGroupId}. Items
can now opt in with activeOnSubpaths, matched by whole path segment
with query params still ignored. The sidebar resolves the options
while decorating the tree, so section children honour it. Only
EasyCLA opts in; every other entry keeps exact matching.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
Move the exact and subpath link-active options from module scope to
private statics on SidebarComponent, since lfx-one does not declare
module-level constants. Drop the explanatory comments added earlier
on this branch, and restore the original wording of comments that
stay accurate. No behaviour change.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 16:16
@ahmedomosanya ahmedomosanya added ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology. EasyCLA Used for the EasyCLA migration to Self Serve enhancement New feature or request org-lens A label/tag for a Org Lens bug, task, story, or feature request. WIP labels Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 472b398d-4b2c-4231-8ebf-397cf8168f3f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation satisfies the issue’s placement, gating, and detail-route highlighting requirements with focused tests.

0 open findings

What changed in this PR

Moves EasyCLA into a feature-gated Organization Lens section and preserves active highlighting on detail routes.

Changes:

  • Adds the “EasyCLA Management” sidebar section.
  • Supports opt-in subpath route highlighting.
  • Updates unit tests for placement, gating, and active matching.
File Description
packages/​shared/​src/​interfaces/​components.interface.ts Adds subpath matching configuration.
sidebar-nav.service.ts Creates and positions the EasyCLA section.
sidebar-nav.service.spec.ts Tests section placement and feature gating.
sidebar.component.ts Builds per-item active-match options.
sidebar.component.spec.ts Tests exact and subpath matching.
sidebar.component.html Applies configured active-match options.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ahmedomosanya
ahmedomosanya marked this pull request as ready for review October 9, 2026 16:22
@ahmedomosanya
ahmedomosanya requested a review from a team as a code owner October 9, 2026 16:22
@ahmedomosanya ahmedomosanya removed the WIP label Oct 9, 2026
@cursor

cursor Bot commented Oct 9, 2026

Copy link
Copy Markdown

Current version of PR was reviewed by /review-bugbot with additional instructions on Oct 9, 16:54 GMT+1. It flagged 0 findings.

Bugbot on commit 2640505 is skipped.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable new issue was found.

Summary

Gives EasyCLA its own expanded section above Organization Profile, still behind org-lens-cla-m3-enabled.

  • Keeps EasyCLA highlighted on agreement detail pages and legacy signing-return pages.
  • Leaves other sidebar entries on exact-path matching.
  • Adds tests for aliases, detail pages, sibling paths, and section placement.

Reviews (5) · Last reviewed commit: "fix(review): address PR #3436 review fee..." · Reviewed by Greptile

The link-active spec reached the decorated tree through an
"as unknown as" cast and a hand-written copy of its shape. Read the
protected computed with bracket access and type it from the
component instead, so the spec breaks if the decorated shape drifts.
No behaviour change.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

🚀 Deployment Status

Your branch has been deployed to: https://ui-pr-3436.dev.v2.cluster.linuxfound.info

Deployment Details:

  • Environment: Development
  • Namespace: ui-pr-3436
  • ArgoCD App: ui-pr-3436

The deployment will be automatically removed when this PR is closed.

The My Engagement label doc said it was matched by label "for the
same reason" as the Organization Engagement label above it. That
field is gone now that EasyCLA has its own section, so the reference
pointed at nothing. Keep only the part that still holds.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 16:44
@cursor

cursor Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Navigation and highlight behavior only; EasyCLA remains flag-gated and other sidebar items keep exact-path matching by default.

Overview
Moves EasyCLA out of Organization Engagement into a dedicated EasyCLA Management section (still gated by org-lens-cla-m3-enabled), placed between Organization Engagement and Organization Profile.

Sidebar items can now opt into smarter active styling: activeOnSubpaths uses subset path matching so EasyCLA stays highlighted on detail URLs and query strings; activeAliases keeps the same item highlighted on the legacy /org/easycla mount after signing returns. The sidebar component derives per-item routerLinkActiveOptions, and alias-only items get highlight state from aliasHighlightedKeys instead of conflicting routerLinkActive classes.

SidebarMenuItem gains the new optional fields; org-lens nav and component specs cover placement, opt-in scope, and alias/subpath behavior.

Reviewed by Cursor Bugbot for commit b54fb52. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation satisfies the acceptance criteria with focused coverage for feature gating, ordering, organization-scoped routes, and detail-page highlighting.

0 open findings

🧠 Review effort: Balanced

The spec title claimed EasyCLA stays highlighted on its detail pages,
but the test only checks which items opt into subpath matching. The
highlighting itself is covered by the sidebar component spec. Retitle
it to match its assertion.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
IsActiveMatchOptions, Provider and SidebarMenuItem are used only as
type annotations in the sidebar component and its spec. Move them to
import type lines after the value imports, the layout other Org Lens
components already use. No behaviour change.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 17:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Legacy EasyCLA agreement return URLs lose active highlighting after organization adoption.

0 open findings

Previously missed (1)

In code that hasn't changed since last review

Medium severity EasyCLA entry loses active state for legacy signing returns

apps/​lfx-one/​src/​app/​shared/​services/​sidebar-nav.service.ts:789

activeOnSubpaths only works when the current URL starts with this generated routerLink. A supported legacy signing return remains at /org/easycla/:claGroupId?org=…; after OrgClaReturnService.adopt() selects that organization, this link recomputes to /org/{segment}/easycla, so the EasyCLA entry loses its active state on that agreement detail page. Please either canonicalize legacy returns to the addressed path after adoption or support the legacy EasyCLA path as an active alias while that route remains mounted.

🧠 Review effort: Balanced

Place each import type line directly under the value import from the
same module, so the angular and shared groups stay contiguous instead
of trailing after the third-party and relative imports. No behaviour
change.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
The My Engagement label is still found by label because the sidebar
tree is built inline. That reason used to live on the Organization
Engagement field this branch removed; state it on the field that still
relies on it.

Refs #3358

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 17:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation satisfies the issue’s placement, feature-gating, highlighting, and test requirements without identified regressions.

0 open findings

🧠 Review effort: Balanced

A corporate-signing return on the leftover /org/easycla mount stays at
/org/easycla/:claGroupId after it adopts the organization, while the
sidebar EasyCLA link recomputes to /org/{segment}/easycla. Subpath
matching on that link alone left the item unhighlighted on that page.

- components.interface.ts: add opt-in activeAliases to SidebarMenuItem
- sidebar.component: highlight items with aliases from a navigation-driven
  computed that checks the item's link and each alias with the item's own
  match options; routerLinkActive keeps every other item
- sidebar-nav.service: alias the EasyCLA item to ORG_EASYCLA_PATH while
  that mount remains
- specs: active on the legacy detail URL, inactive on /org/easycla-other,
  other items still exact-match, and only EasyCLA carries an alias

Signed-off-by: ahmedomosanya <aopeyemi@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings October 9, 2026 17:40
@ahmedomosanya

Copy link
Copy Markdown
Contributor Author

Addressed in b54fb52 — Copilot's medium finding on sidebar-nav.service.ts (EasyCLA loses its active state on a legacy /org/easycla/:claGroupId signing return): the EasyCLA item now carries an opt-in activeAliases: [ORG_EASYCLA_PATH], so it stays highlighted under the leftover mount but not on a prefix sibling such as /org/easycla-other, and every other item keeps exact matching. Legacy returns are not redirected.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation satisfies the issue requirements with focused tests and no unresolved correctness or security concerns.

0 open findings

🧠 Review effort: Balanced

This branch has not been deployed

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

Labels

ai-assisted A task or activity that was supported by AI, such as CoPilot, ChatGPT, or other AI technology. deploy-preview EasyCLA Used for the EasyCLA migration to Self Serve enhancement New feature or request org-lens A label/tag for a Org Lens bug, task, story, or feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TASK: Give EasyCLA its own "EasyCLA Management" section in the Org Lens sidebar

2 participants