Skip to content

refactor(ui): centralize compact icon button sizing in EMCN - #7991

Open
BillLeoutsakosvl346 wants to merge 16 commits into
stagingfrom
codex/control-fix-icon-button-sizing
Open

BillLeoutsakosvl346 wants to merge 16 commits into
stagingfrom
codex/control-fix-icon-button-sizing

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review map

This is the last staging-facing parent of the icon-action and EMCN control stack. The merged work is grouped below so reviewers can follow one treatment at a time:

Area Source PR What changes
Shared Button action geometry #7991, #8149, #8087 iconSize, responsive sizes, inline/bare sizes, round shape and muted focus ring replace repeated exact classes. Message actions intentionally use the shared 24px quiet treatment.
Canvas and browser toolbars #8066, #8068 Feature-owned wrappers keep the existing canvas and 30px browser action chrome.
Workflow field disclosures #8038 Shared open/close row treatment keeps its existing divider, icon and keyboard behavior.
EMCN control consolidation #7998 One ChipSelect menu-selection API replaces the duplicate dropdown; segmented controls and ordinary auth/credential fields use their shared EMCN owners. Removed options were migrated at consumers.
Staging reconciliation This refresh Kept the newer composer, source-card, resource-row, tab-strip, collaborator-caret, and auth code from staging. Its conversation-mode picker now uses ChipSelect with the same bare round trigger, content-width menu and tooltip visibility signal. The new staging Button secondary variant and RowActions export are retained. Direct knowledge imports retain the lean route graphs.

The consolidation has these intentional visible changes: multiple-selection menus use checkbox rows; segmented groups have zero gap; former large badges use medium sizing; table bulk actions use the adaptive dark fill; migrated ordinary fields use chip corners and surfaces; logs Clear All Filters becomes 30px instead of 32px; and knowledge-tag removal becomes a 20px accessible action instead of a 16px target. In this final refresh, 18 repeated zero-padding workflow icon actions became Button size='bare' with the same final classes. Exact staging mic, pager, table-row, sidebar, public-auth, MCP and workflow-panel treatments were restored after visual review. The landing hero block title remains 17px, as on staging. Landing and docs styling is outside this product-system migration.

Representative code changes

Icon geometry (same rendered classes):

// Before
<Button size='sm' iconPadding='sm' className='size-7 shrink-0'>…</Button>
// After
<Button size='sm' iconPadding='sm' iconSize='regular' className='shrink-0'>…</Button>

Workflow row actions (same rendered classes):

// Before
<Button variant='ghost-destructive' className='h-auto p-0'>…</Button>
// After
<Button variant='ghost-destructive' size='bare'>…</Button>

Staging conversation-mode picker (retains its existing tooltip/menu behavior):

// Before: duplicate selection component
<ChipDropdown variant='ghost' shape='round' matchTriggerWidth={false}
  onOpenChange={setOpen} value={value} options={options} />
// After: shared selection component
<ChipSelect variant='ghost' dropdownWidth='content' modal={false}
  onOpenChange={setOpen} value={value} options={options} />

Other control owners: CanvasControlButton replaces repeated canvas action classes; BrowserToolbarButton keeps the 30px browser treatment; ChipButtonGroup owns segmented controls. Source PRs above contain their focused implementation diffs.

Validation and visual review

  • Current-head CI lint and app build pass. EMCN, app and workflow-renderer type checks pass locally. Focused app tests: 152/152 before the final review fixes, then 5/5 for changed behavior; workflow-renderer: 145/145; focused EMCN controls: 39/39. The full local EMCN suite had one nested-modal Escape failure (415/416) that also reproduces on the pre-integration consolidation head; CI test shards pass.
  • The current-head diff checker completed with no extraction failure. It reports central design-system changes and 18 component-chrome signals: the exact 30px browser action, chat attachment focus treatment, existing Slack layout, restored 28px panel tabs, and preview clipping. These are visible for review rather than hidden by a linter allowance. The comparable full scan has 1,138 raw styling findings on the staging product baseline and 454 on this exact head (684 fewer). The last 10 raw findings returned when the original panel-tab geometry was restored; they are the explicit, appearance-preserving Button treatment.
  • Matched before/after images and code-level mappings cover five representative treatments in light/dark and 16px/20px root text, including open menus. All 48 recorded geometry/color samples match. Earlier focused galleries for canvas, browser, workflow disclosure, and table controls are linked from that guide. Fixtures are labeled where authenticated product states were unavailable.
  • Greptile and Cubic report 5/5 on current head 47a18f4940; all review threads are answered and resolved. Every required check passes, including the PostgreSQL integration job on rerun after an unchanged test timed out on its first attempt. The PR is mergeable against staging.

No audit reports, fixture code, or screenshots are included in this product branch. This PR is for review only; it will not be merged automatically.

@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 25, 2026 3:08am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Refactors auth and UI component sizing to use chip size props.

The PR appears safe to merge; no outstanding correctness, security, or repository-rule failures were identified.

Summary

This PR centralizes compact action geometry and related control treatments in EMCN, migrates consumers to the shared APIs, consolidates selection and segmented controls, and preserves feature-owned toolbar treatments.

  • Adds shared Button icon sizing, shape, inline, and bare-action geometry.
  • Consolidates menu selection around ChipSelect and removes the duplicate ChipDropdown.
  • Introduces or adopts shared wrappers for canvas, browser-toolbar, row-action, modal, and workflow-field controls.
  • Restores workflow panel tabs to their staging Button treatment while retaining pre-hydration persisted-tab styling.
  • Updates tests and repository guidance for the consolidated component APIs.

Reviews (10) · Last reviewed commit: "fix(workflow): preserve panel tab geomet..."

Comment thread packages/emcn/src/components/button/button.test.tsx Outdated

@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 12 files

Confidence score: 5/5

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

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai @cubic-dev-ai Please review the current head; the previous scored reviews cover earlier commits.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@greptileai @cubic-dev-ai Please review the current head; the previous scored reviews cover earlier commits.

@BillLeoutsakosvl346 I’ve started reviewing the changes since the last completed review. I’ll post the results here when it’s done.

@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.

0 issues found across 3 files (changes from recent commits).

Confidence score: 5/5

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

Re-trigger cubic

Comment thread packages/emcn/src/components/button/button.test.tsx Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai @cubic-dev-ai Please review the latest commit. The import-order directive now uses TSDoc while retaining the documented import order and passing Biome.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@greptileai @cubic-dev-ai Please review the latest commit. The import-order directive now uses TSDoc while retaining the documented import order and passing Biome.

@BillLeoutsakosvl346 I’ve started reviewing the changes since the last completed review. I’ll post the results here when it’s done.

@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.

0 issues found across 1 file (changes from recent commits).

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai Please run a full review of this PR against its base branch on the current head, rather than an incremental review of only the latest commit. The latest incremental review reported no issues; this is the final review of the complete change.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai Please run a full review of this PR against its base branch on the current head, rather than an incremental review of only the latest commit. The latest incremental review reported no issues; this is the final review of the complete change.

@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 14 files

Confidence score: 5/5

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

Re-trigger cubic

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

Before / after visual comparison

Representative icon-button sizing combinations after replacing local size classes with shared sizes.

Within each numbered tile: first control = before; second control = after.

Rendered component fixtures with application CSS and local data, rather than authenticated product-page screenshots. These are representative visual examples, not end-to-end behavior coverage.

The fixture uses a generic X icon to isolate button sizing; these are not screenshots of the actual caller icons. This comparison covers the sizing migration, not every message-action interaction.

Current PR head checked at posting: 0be585b6b3.

Before and after: buttons light

Additional theme/state comparisons

Before and after: buttons dark

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile

@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the codex/control-fix-icon-button-sizing branch from 0be585b to 13f85d8 Compare September 22, 2026 19:28
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

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

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the current head against staging, including the merged consolidation stack and conflict resolutions.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR. Please review the current head against staging, including the merged consolidation stack and conflict resolutions.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR. Please review the current head against staging, including the merged consolidation stack and conflict resolutions.

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

Comment thread apps/sim/app/_styles/globals.css Outdated

@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.

1 issue found across 286 files

Confidence score: 3/5

  • In apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-readonly-styles.ts, pointer-only blocking leaves the “Configure PII Types” modal reachable by keyboard in the read-only preview; make the preview subtree inert or disable the trigger.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-readonly-styles.ts">

<violation number="1" location="apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-readonly-styles.ts:19">
P2: This blocks pointer input only; keyboard activation remains possible. The enabled “Configure PII Types” trigger can still open its configuration modal with Tab and Enter, so make the preview subtree inert or disable the trigger as well.</violation>
</file>

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.
Tip: instead of fixing issues one by one fix them all with cubic

Re-trigger cubic

Comment thread apps/sim/components/auth/public-auth-header.module.css Outdated
Comment thread apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx Outdated
Comment thread apps/sim/components/workflow/workflow-preview-action.tsx Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the new head ef993ec against staging, including the resolved comments and component-local panel styling.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR. Please review the new head ef993ec against staging, including the visual parity and preview accessibility fixes.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR. Please review the new head ef993ec against staging, including the visual parity and preview accessibility fixes.

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

@BillLeoutsakosvl346

BillLeoutsakosvl346 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Superseded by the current-head visual and code review guide, which adds the workflow panel tabs and final measured comparisons.

Comment thread apps/sim/app/_styles/globals.css

@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.

All reported issues were addressed across 284 files

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Fix all with cubic | Re-trigger cubic

Comment thread apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx Outdated
@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the current head 342c17a, including the direct knowledge imports that keep route graphs within the CI boundary.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR. Please review the current head 342c17a after the knowledge route import fix.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR. Please review the current head 342c17a after the knowledge route import fix.

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

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile Please review the current head 47a18f4 against staging. The workflow panel tabs now use their exact staging Button treatment; shared theme tokens remain intentionally central in globals.css.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR. Please review the current head 47a18f4; the panel-tab geometry issue is fixed and answered in its thread.

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR. Please review the current head 47a18f4; the panel-tab geometry issue is fixed and answered in its thread.

@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 284 files

Confidence score: 5/5

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

Note: This PR contains a large number of files. cubic selects up to 200 of the highest-priority eligible files for this review, so some files may not have been reviewed.
You've manually re-run cubic several times on this PR. Each manual re-review checks the full PR again and counts toward your usage quota. To preserve your usage limits, we recommend letting cubic automatically review new commits.

Re-trigger cubic

@BillLeoutsakosvl346

BillLeoutsakosvl346 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Visual and code review guide · current head 47a18f4940

This PR is the staging-facing parent of the icon-action/control stack. The five comparisons below render actual staging EMCN components on the left and actual PR components on the right, with the application stylesheet and local option data. They are isolated fixtures because an authenticated workspace and transient menus are not reliable to reproduce in CI. The EMCN component and CSS source is exact; the panel-tab row applies the feature wrapper’s exact classes, and the option data is illustrative. The 48 measured control samples have the same computed width, height, corner radius, padding, foreground and background before/after across light/dark and 16px/20px root text.

Light · 16px Dark · 16px
Staging and PR controls in light mode at 16px root text Staging and PR controls in dark mode at 16px root text
Enlarged 20px root text and open status-menu states
Light · 20px Dark · 20px
Staging and PR controls in light mode at 20px root text Staging and PR controls in dark mode at 20px root text
Status menu · before Status menu · after
Staging status menu open in light mode PR status menu open in light mode
Staging status menu open in dark mode PR status menu open in dark mode

What moved to shared APIs

Icon geometry. The caller keeps its icon and behavior; EMCN owns the exact 28px target. The same pattern covers table options and other repeated icon actions.

// Before
<Button size='sm' iconPadding='sm' className='size-7 shrink-0'>
  <X className='size-[12px]' />
</Button>
// After
<Button size='sm' iconPadding='sm' iconSize='regular' className='shrink-0'>
  <X className='size-[12px]' />
</Button>

Workflow row actions. The repeated zero-padding treatment is now size='bare'. The same source icon, click handler and destructive color remain.

// Before
<Button variant='ghost-destructive' className='h-auto p-0'>…</Button>
// After
<Button variant='ghost-destructive' size='bare'>…</Button>

Workflow panel tabs. The shared three-tab wrapper retains staging's Button size, radius, text size, border and state colors. The attempted Chip migration was removed after visual review.

// Before: repeated at Chat, Toolbar and Editor
<Button variant={active ? 'active' : 'ghost'}
  className='h-[28px] rounded-md border py-[5px] text-[12.5px] …'>
  {label}
</Button>
// After: same Button and classes, shared in PanelTabButton
<PanelTabButton tab='toolbar' active={active} onClick={onClick}>
  Toolbar
</PanelTabButton>

Selection menus. The duplicate ChipDropdown is gone. ChipSelect owns the trigger/menu geometry and keyboard selection. The staging conversation-mode picker retains its round, bare trigger, content-width menu and open-state tooltip behavior.

// Before
<ChipDropdown variant='ghost' shape='round' matchTriggerWidth={false}
  options={options} value={value} onChange={setValue} />
// After
<ChipSelect variant='ghost' dropdownWidth='content' modal={false}
  options={options} value={value} onChange={setValue} />

Component-specific chrome. Canvas actions use CanvasControlButton; browser Back/Forward use BrowserToolbarButton; workflow field disclosures share a feature-owned row. Their focused before/after image reviews are here: canvas actions, browser toolbar, workflow disclosures, and table option actions. The old table-filter image in #8149 predates the later consolidation; the current status-filter comparison above reflects the final PR.

Review changes after the stack met staging

  • Preserved Waleed’s newer chat composer, source cards, resource rows, tab strip and collaborator styling while resolving conflicts. The new staging Button variant and RowActions export stay intact.
  • Restored the exact staging inactive mic hover/color, admin pager, table “New row”, sidebar avatar/favicon, logs Download label, MCP Advanced toggle and public-auth description contrast after Cubic identified differences.
  • The PII selector in read-only preview is now truly disabled, including keyboard activation, while its preview value remains visible. Tag removal controls now name the tag for screen readers. The attempted panel tab text override was removed with the Chip migration.
  • The local same-package EMCN imports avoid a barrel dependency cycle; the 75 guarded tool-registry entry graphs now pass.

The source PRs contain the individual consumer diffs. This guide shows the repeated treatments and their visible states so reviewers can spend their time on the remaining behavior and intentional choices. Reports, image fixtures and measurements are external to the product branch.

This branch was previously deployed

1 inactive deployment
Preview — 47a18f49 Deployed Sep 25, 2026 by vercel[bot]
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.

1 participant