Skip to content

refactor(ui): centralize document file-type icons in EMCN - #7984

Merged
waleedlatif1 merged 1 commit into
stagingfrom
codex/control-fix-document-icons
Sep 18, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
codex/control-fix-document-icons

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

The document/file-type icon family is defined in the app instead of EMCN. Move all 14 existing SVG components into @sim/emcn/icons and update direct consumers, including the existing landing previews. Keep getDocumentIcon in the app with its MIME-type/extension selection order and upload-validation dependencies unchanged.

Preserve the complete icon functions: drawings, view boxes, strokes, PDF lettering, SVG prop forwarding and caller-provided sizes/colors. This is an independent PR against staging and does not depend on #7983.

The diff contains only the icon relocation, exports and import updates. The existing document-icon test changes imports only; no new tests, linter tooling, configuration or dependencies are included.

Type of Change

  • Other: behavior-preserving UI consolidation

Testing

  • 336 EMCN tests and 43 existing app tests passed (document selection, mention icons, attached files and file downloads).
  • EMCN/app type checks, repository lint, API validation, SVG path precision and git diff --check passed.
  • External source comparison verified all 14 original icon functions, unchanged selection logic and import-only consumer changes. All 42 rendered SVG comparisons matched exactly, including caller overrides.
  • Final category check: 14 central icons, zero remaining findings, zero copied drawings and zero stale imports. Copy detection inspected 295 app/package source files containing SVG, including landing consumers. The 13 artwork findings and three PDF-lettering typography findings are resolved by relocating their unchanged definitions into EMCN.
  • Final committed-diff audit: zero violations, 15 intentional central-artwork notifications for the 14 icon definitions and export barrel. The audit source hash matches the final checkout.

Validation uses source and rendered markup comparison; no browser screenshot comparison was performed. Unrelated audit findings and coverage gaps remain outside this file-type icon category.

@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 relocation preserves icon rendering and leaves no stale imports or broken exports.

Summary

This PR centralizes the existing document file-type icon components in EMCN while retaining document-selection logic in the application.

  • Moves 14 unchanged SVG icon implementations into packages/emcn/src/icons.
  • Exposes the icons through the supported @sim/emcn/icons entry point.
  • Updates application and landing-page consumers to use the centralized exports.
  • Keeps getDocumentIcon, its selection order, and upload-validation integration unchanged.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Consumers[Application and landing consumers] --> Icons["@sim/emcn/icons"]
  Selector["getDocumentIcon in apps/sim"] --> Icons
  Validation[Upload validation constants] --> Selector
  Icons --> Components[14 centralized SVG components]
Loading

Reviews (1) · Last reviewed commit: "refactor(emcn): centralize document file..."

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
docs Ready Ready Preview Sep 18, 2026 9:59pm UTC

Request Review

@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 24 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 f070a34 into staging Sep 18, 2026
36 checks passed
@waleedlatif1
waleedlatif1 deleted the codex/control-fix-document-icons branch September 18, 2026 21:58

This branch was successfully deployed

1 active deployment
Preview eabef416 Deployed Sep 18, 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.

2 participants