Skip to content

refactor(emcn): share resource row and tile chrome - #8240

Open
BillLeoutsakosvl346 wants to merge 4 commits into
stagingfrom
codex/emcn-next-resource-row
Open

BillLeoutsakosvl346 wants to merge 4 commits into
stagingfrom
codex/emcn-next-resource-row

Conversation

@BillLeoutsakosvl346

@BillLeoutsakosvl346 BillLeoutsakosvl346 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Move the repeated resource row and tile chrome into EMCN, with a CVA recipe for its existing icon treatments.
  • Keep SettingsResourceRow as a thin Next Link adapter and preserve the app's existing imports and navigation behavior.
  • Preserve row, tile, trailing-control, disabled, hover, and focus geometry.

Base and design review

Targets current staging at d8e7e923a2. The local design diff check reports 128 review notices for the new EMCN resource definitions, with no consumer violations or coverage failures. No scanner code or review artifacts are in this PR.

Validation

  • One hundred one focused EMCN/app tests, EMCN and app type checks, Biome, and diff whitespace checks passed on the reconciled head.
  • Twelve matched source-derived captures and computed-style comparisons cover light/dark, 16px/20px root text, and default/hover/focus. The recorded before/after values match. Evidence is outside the product checkout.
  • Independent source review checked the CVA recipe, barrel exports, Next navigation, accessibility, and disabled behavior.
  • Greptile and Cubic were requested on the reconciled head. Do not merge automatically.

Visual comparison

The isolated fixture renders the actual base and PR head side by side. It uses product CSS and the stated UI state.

Light · 16px root text · default

Resource row before and after, light mode, 16px root text, default state

Dark · 20px root text · keyboard focus

Resource row before and after, dark mode, 20px root text, focus state

The existing visual captures predate the staging reconciliation. The conflict resolution and current-head source examples are documented in the visual-review comment; no treatment values changed in that reconciliation.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptile review this PR

@vercel

vercel Bot commented Sep 24, 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 12:56am UTC

Request Review

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 24, 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.

@greptile-apps

greptile-apps Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge based on the reviewed changes.

Summary

The PR moves shared resource-row and tile rendering into EMCN while retaining the app’s Next Link adapter.

  • Re-exports the shared components and styling constants for existing consumers.
  • Updates affected test mocks and adds row and navigation tests.
  • The only change since the previous review fixes the test import; no new issue was identified.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[SettingsResourceRow] --> B[EMCN ResourceRow]
  A --> C[Next Link]
  B --> D[EMCN resource tile styling]
Loading

Reviews (4) · Last reviewed commit: "test(resources): use absolute row import"

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

Confidence score: 5/5

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

Re-trigger cubic

@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 11 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 review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 24, 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.

@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

BillLeoutsakosvl346 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Visual review: resource row and tile ownership

Change. The settings resource row and square identity tile move into EMCN. SettingsResourceRow remains a thin app adapter so a row with href still uses Next Link; action rows still use a button, and static/disabled rows keep their geometry. The same tile classes are now exported by EMCN for other resource surfaces.

Representative source excerpts:

Before

const rowClass = cn(
  'flex items-center justify-between gap-2.5',
  !flush && '-mx-2 rounded-lg p-2',
  disabled && 'opacity-50'
)

After

export function SettingsResourceRow(props: SettingsResourceRowProps) {
  if (props.href && !props.disabled) {
    const href = props.href
    return (
      <ResourceRow
        {...props}
        renderLink={(linkProps: ComponentProps<'a'>) => <Link {...linkProps} href={href} />}
      />
    )
  }

  return <ResourceRow {...props} />
}

Images. These are isolated renders of the actual base and head React components, using compiled product CSS and Season Sans. Each image has Before on the left and After on the right; Next Link is represented by a native anchor inside this fixture. Rows shown: linked, long-text with trailing action, disabled, and flush heading. The follow-up test commit and staging merge leave the resource component implementation unchanged.

Theme and root size Before / After
Light, 16px Light 16px resource rows, Before left and After right
Dark, 16px Dark 16px resource rows, Before left and After right
Light, 20px Light 20px resource rows, Before left and After right
Dark, 20px Dark 20px resource rows, Before left and After right

Staging conflict resolution · 63c02c2a9e

The only conflict was the EMCN export list. The merged head keeps staging's RowActions export alongside this PR's ResourceRow and ResourceTile exports:

export { ResourceRow, resourceRowIconVariants } from './resource-row/resource-row'
export { ResourceTile } from './resource-tile/resource-tile'
export { RowActions, rowActionsGroupClass } from './row-actions/row-actions'

This changes no rendered resource row or tile; the images above still cover that migration. Focused tests (101), EMCN/app type checks, and Biome pass. The local design diff check reports the new EMCN definitions for review, with no consumer violations or coverage failures.

Review follow-up · b744f87169: The latest commit changes a test import to the required absolute app path. It changes no product component, CSS, or visual state shown above.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 25, 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.

@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

@greptileai review this PR

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 25, 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.

@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

This branch was previously deployed

1 inactive deployment
Preview — b744f871 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