Skip to content

refactor(ui): centralize bulk-action buttons in EMCN - #7982

Merged
waleedlatif1 merged 3 commits into
stagingfrom
codex/control-fix-bulk-action-styles
Sep 18, 2026
Merged

waleedlatif1 merged 3 commits into
stagingfrom
codex/control-fix-bulk-action-styles

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Resource, knowledge-document and table-cell selection bars supplied the same bulk-action appearance through application class strings. Add EMCN's BulkActionButton, built on the existing Button, and migrate all six authored button locations across the three implementations. EMCN now owns the 28px geometry, radius, zero padding and brand hover treatment; the application styling helper is removed.

The default surface='adaptive' preserves the resource/knowledge light and dark chip backgrounds. surface='uniform' preserves the table buttons' existing surface-5 background in both themes. The component requires an accessible label and forwards native button props and refs. Icons, labels, handlers, disabled conditions, tooltips, the Move menu trigger, native form behavior, selection/permission logic and animations are preserved.

Validation:

  • Exact before/after class comparison at all six locations and normalized consumer AST comparison confirm unchanged styling and surrounding behavior code. DOM compatibility tests cover the default and both explicit surfaces; focused tests cover refs, events, focus, disabled actions, default/non-submitting form behavior and actual tooltip/menu-trigger composition. The surface checks run once each, with disabled behavior covered separately. No screenshot comparison was performed.
  • 330 EMCN tests (including 9 focused component tests), 71 related app tests, EMCN/app type checks, repository lint, API validation and diff whitespace checks pass.
  • The external category check now requires actual EMCN ownership: six application-owned locations become six central consumers, with zero remaining category findings, copied patterns, unresolved candidates or consumer appearance overrides. Its 13 regression tests and type checks pass. Existing limits remain explicit, including two oversized generated sources and unresolved class inputs elsewhere.
  • The final committed PR-diff audit completes with zero violations and zero introduced findings in the three earlier simplification categories. It reports ten intentional central-definition changes for the new recipe: default surface, dimensions, padding, radius and existing background/hover colors. These migrate established styling into EMCN; the class-equivalence checks cover all six consumers.
  • Generic audit counts change because six Button consumers now use BulkActionButton. The dedicated category check validates their central ownership, labels, surface choices and appearance overrides; the generic scanner still cannot fully resolve the new component's dynamic props/class forwarding. No global conformance claim is made.

The cumulative PR contains only three consumer updates, the EMCN component, its export and its component tests. All linter code, checker tests, configuration and audit artifacts remain outside the PR.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge because the centralized component preserves the existing action-button contracts and no actionable regressions remain.

Summary

This PR centralizes the shared selection-bar action-button presentation in EMCN without changing consumer behavior.

  • Adds an accessible, ref-forwarding BulkActionButton with adaptive and uniform surface variants.
  • Migrates resource, knowledge-document, and table-cell action bars to the shared component.
  • Preserves existing handlers, disabled states, tooltips, menu-trigger composition, geometry, and theme-specific surfaces.
  • Adds focused tests for styling equivalence, native button behavior, refs, events, accessibility, and trigger composition.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  R[Resource action bar] --> B[EMCN BulkActionButton]
  K[Knowledge action bar] --> B
  T[Table action bar] --> U[BulkActionButton<br/>surface=uniform]
  B --> A[Adaptive chip surface]
  U --> S[Uniform surface-5]
  A --> C[EMCN Button<br/>ghost / md]
  S --> C
Loading

Reviews (2) · Last reviewed commit: "refactor(emcn): own bulk-action button a..."

@BillLeoutsakosvl346
BillLeoutsakosvl346 marked this pull request as draft September 18, 2026 20:23
@BillLeoutsakosvl346 BillLeoutsakosvl346 changed the title refactor(ui): share resource bulk-action button styles refactor(ui): centralize bulk-action buttons in EMCN Sep 18, 2026
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Sep 18, 2026 9:09pm UTC

Request Review

@BillLeoutsakosvl346
BillLeoutsakosvl346 marked this pull request as ready for review September 18, 2026 21:03
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai please review this PR at the latest commit, 86af6a9. The bulk-action button implementation now lives in EMCN.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR at the latest commit, 86af6a9. The bulk-action button implementation now lives in EMCN.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR at the latest commit, 86af6a9. The bulk-action button implementation now lives in EMCN.

@BillLeoutsakosvl346 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 44869df into staging Sep 18, 2026
33 of 34 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/control-fix-bulk-action-styles branch September 18, 2026 21:17
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