Skip to content

Remove enableNewSecurityPage feature flag - #2604

Merged
jvorcak merged 3 commits into
masterfrom
UX-1450-remove-new-security-page-feature-flag
Sep 11, 2026
Merged

jvorcak merged 3 commits into
masterfrom
UX-1450-remove-new-security-page-feature-flag

Conversation

@jvorcak

@jvorcak jvorcak commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • The new security page is now the only implementation; enableNewSecurityPage is removed from FEATURE_FLAGS and all isFeatureFlagEnabled('enableNewSecurityPage') branches.
  • Collapsed the old/new dispatcher components (AclsTab, RolesTab, UsersTab, PermissionsListTab, RoleDetailPage, UserDetailsPage, SecurityLayout, SecurityTabsNav, AclDetailPage, plus links in overview.tsx and add-user-step.tsx) down to the new implementation, deleting the now-dead legacy components.
  • Deleted the legacy-only route pages (acl-create-page.tsx + its test, acl-update-page.tsx, role-update-page.tsx) and simplified their route files to unconditional redirects.
  • Deleted 11 E2E spec files (and the now-unused acl-page.ts/role-page.ts page objects) that existed solely to force the old UI via test.use({ featureFlags: { enableNewSecurityPage: false } }). Accepting this as a known E2E coverage gap rather than porting them to the new UI.

Test plan

  • bun run type:check
  • bun run lint
  • bun run test:unit (828 tests passing)
  • bun run test:integration (1246 tests passing)

The new security page is now the only implementation. Collapses the
old/new dispatcher components down to the new ones, deletes the
resulting dead legacy code and routes, and removes the E2E specs that
existed solely to force the old UI via the flag.
@github-actions

github-actions Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Clean — no registry drift, off-token colours, or ad-hoc classes

App: frontend · Scope: diff vs origin/master · Files: 22

Count
⚠️ Outdated registry components 0
🛠 Locally-modified components 0
❓ Unknown to registry 0
🎨 Off-token palette colours 0
🔢 Ad-hoc utility classes 0

Generated by lookout audit-changes.

Re-ports the ACL/permissions/user-management/deep-link E2E specs that
were dropped when enableNewSecurityPage was removed, targeting the new
UI directly instead of forcing the legacy one via the flag.
@jvorcak
jvorcak merged commit 40ceeba into master Sep 11, 2026
20 checks passed
@jvorcak
jvorcak deleted the UX-1450-remove-new-security-page-feature-flag branch September 11, 2026 13:35
SpicyPete added a commit that referenced this pull request Sep 11, 2026
…gistry components, plus a smoke spec (#2649)

* frontend: the security ACLs tab on Registry components, plus a smoke spec

#2604 replaced the users, roles and permissions tabs with new designs and
left the ACLs tab on the old one, so it kept the last Chakra import in
`pages/security`. There is no `acls-tab-new`, and the route is live at
`/security/acls`, so this is a parity swap rather than throwaway work:
Chakra's `SearchField` becomes the shared `SearchInput` and its
`DataTable` becomes the Registry one. Whether ACLs also gets the new
security design is a separate product call.

Both sortable columns get a `DataTableColumnHeader` — the Registry sorts
only through that component, where Chakra painted an affordance on every
header — and the table passes `enableHiding: false`, since there is no
column-visibility toolbar to undo a hide with. Pagination keeps legacy
parity at 50 a page with the pager only past that; the two `size:` props
are dropped because the Registry never reads them.

The row-actions menu moves into its own component that owns its queries.
That leaves the columns array closing over nothing but a stable state
setter, so it is built once: `DataTableColumnHeader` is a dropdown
trigger, and a re-created header tears an open sort menu down.

Also drops the dead `rs.mock('@redpanda-data/ui')` from
`roles-tab.test.tsx` — 156 lines stubbing a package that file's tree no
longer touches, since `roles-tab.tsx` is now a re-export of the
Chakra-free `roles-tab-new`. Both suites are unchanged at 993/1427, so
those tests now exercise the real components.

The new Playwright spec covers what the swap risked: the filter renders,
both headers expose a sort trigger, and the trigger opens a menu.
Verified against a live container, and it fails if the
`DataTableColumnHeader` is swapped back for a plain string header.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* frontend: security — cover the ACLs row-actions menu

The Playwright spec covers the table chrome, but a fresh cluster has no
ACLs, so it never clicks a row menu — which is the part of this swap that
moved most, into its own component. Five tests over the real components:
the rows and their hosts render, a Group principal is badged, the menu
opens with all three delete options, and the user-delete options are
enabled only for a principal that actually has a SASL account.

That last pair is the `canDeleteUser` logic the extraction restructured,
and the menu opening at all confirms the trigger still works after the
empty `onClick` came off its render slot.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* frontend: security — clear the ACLs review findings

Six from a review of the swap, two of them mine and shipping-visible:

- the 300px width was on `className`, which lands on the `<input>`, not
  `containerClassName`, which sizes the positioned wrapper. `InputEnd` is
  absolute against that wrapper, so the "Clear search" X rendered at the
  far right of the page as soon as anyone typed. Every other call site
  uses `containerClassName`.
- `AclRowActions` owned its own queries, and `useListUsersQuery` wraps
  `useInfiniteQueryWithAllPages`, which auto-fetches every page from an
  effect — so each row ran its own `fetchNextPage()` loop. The queries
  move back to the parent and reach the row through context, which is
  also what the stable-columns goal actually needed:
  `useInvalidateUsersCache` returns a new function every render, so a
  `useMemo` dep list could never have been stable. `columns` is now a
  module constant, closing over nothing.

Four behaviour findings, all pre-existing in the Chakra original and
folded in because the extraction put them in reach:

- `canDeleteUser` matched only on name, so a Group principal sharing a
  name with a SASL user offered — and performed — a delete of that
  unrelated account. Now requires `principalType === 'User'`.
- in "Delete (User and ACLs)" a failed ACL delete fell through to the
  account delete, orphaning the ACLs it had just failed to remove, and
  its `onFailure` was overwritten by the second leg's. It now returns.
- the Principal sort key was the `User:`-prefixed `principal` while the
  cell renders `principalName`, so the newly-reachable sort ordered the
  column differently from what is on screen. Now an `accessorFn`.
- no `getRowId`, so rows were index-keyed: a refetch that reordered the
  list retargeted an open action menu at a different principal.

Also drops the dead `deleteButton` class, whose SCSS is nested under
`.stringList .reorderableList` and includes an `opacity: 0` that would
hide the button if anyone ever unscoped it.

Two more tests: a Group row never offers the user deletes even when a
user shares its name, and the Principal sort matches the rendered name.
Both fail if their fix is reverted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* frontend: security — trim the ACLs comments, drop the duplicated row type

Comments to the constraint; the reasoning is in the PR. The context and
table-options notes and both spec preambles were carrying paragraphs.

Two code cleanups: `SimpleAcl` — whose own comment already says it is
"used by ACLs tab and Permissions List tab" — is now exported and
consumed, instead of the page hand-copying four of its five fields where
the two could drift apart. And the ten-line `DeleteACLsRequest` literal
buried mid-object is now a named `allAclsFor(principal, host)`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

3 participants