Uh oh!
There was an error while loading. Please reload this page.
improvement(emcn): consolidate chip chrome, enforce ChipModalField, paint real chrome in loading fallbacks - #4935
Conversation
…aint real chrome in loading fallbacks - Move chip chrome single-source to chip/chip-chrome.ts (surface, typography, and new content tokens); delete chip-input/chip-field-chrome.ts - Rework Chip variants: implicit default replaces ghost, filled reserved for chip fields/triggers and removed from Chip's public API; add ChipChevron - Migrate every labeled modal body field to ChipModalField across knowledge, settings, tables, files, deploy, sidebar, and ee modals - Replace skeleton loading.tsx files with ResourceChromeFallback that paints the page's real header, actions, search/filter/sort chips, and column headers - Rename resource-options-bar to resource-options; simplify resource.tsx and resource-header - Delete legacy Breadcrumb, Callout, and FormField components - Add shared connector-config-fields (knowledge) and ee InfoNote; add useTagUsageQuery; make useInlineRename save async with isSaving - Update AGENTS.md/CLAUDE.md and emcn/styling rules (with .cursor/.agents mirrors)
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Resource shell is now a compound API ( Loading UX shifts from skeleton tables to Rename flows align Reviewed by Cursor Bugbot for commit 0cf5314. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0cf5314. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Reconciles staging's props-driven ChipModalFooter/ChipConfirmModal refactor (#4905) with this branch's chip-chrome consolidation: - chip-modal internals render Cancel/dismiss as bare default chips ('filled' is no longer a public Chip variant); footer action variant unions narrowed to 'primary' | 'destructive' - consumers take staging's footer/header/ChipConfirmModal structure plus this branch's ChipModalField bodies and chrome - staging features kept intact: stable column ids (#4898), async CSV imports (#4927), mothership v0.2 file-viewer refactor (#4923), toast redesign (#4909), suggested skills (#4912) - integration-skills-section 'Added' chip changed to the bare default variant to satisfy the new Chip API
emir-karabeg
commented
Jun 10, 2026
@greptile run |
Greptile SummaryLarge-scale design-system consolidation across 113 files: chip chrome is centralized into
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["chip/chip-chrome.ts\n(single source)"] --> B[chipGeometryClass\nchipContentGap\nchipContentIconClass\nchipContentLabelClass\ncellIconNodeClass\nchipFilledSurfaceTokens]
B --> C["chip/chip.tsx\n(chipVariants CVA)"]
B --> D["resource/resource.tsx\n(CellContent, ResourceTable)"]
B --> E["resource-header.tsx\n(BreadcrumbSegment)"]
C --> F["ChipDropdown / ChipSelect\nChipDatePicker / ChipSwitch\n(variant='filled' + TRIGGER_BORDER_CLASS)"]
C --> G["Chip / ChipLink\n(variant: default | primary\n| destructive | border-shadow)"]
H["Resource (compound root)"] --> I["Resource.Header\n(icon/title/breadcrumbs\n+ ResourceAction chips)"]
H --> J["Resource.Options\n(search/sort/filter)"]
H --> K["Resource.Table\n(columns/rows/editing)"]
L["loading.tsx (each route)"] --> M["ResourceChromeFallback\n(real chrome, no-op handlers)"]
M --> H
N["useInlineRename (async)"] --> O["submitRename\n→ await onSave\n→ isSaving flag\n→ error recovery"]
O --> K
Reviews (2): Last reviewed commit: "fix(rename): type onSave as void | Promi..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…s the field; recover edits on failure - useInlineRename: catch onSave rejection — log, restore the original name, keep the edit session open, and re-arm doneRef (mirrors useItemRename) - switch rename call sites (files, tables, table header, knowledge base, document) from mutate() to mutateAsync() so isSaving spans the request - table-grid column rename stays fire-and-forget by design (optimistic local update + undo entry)
emir-karabeg
commented
Jun 10, 2026
@greptile run |
…t call sites pass the build table-grid's optimistic column rename is a block-bodied callback returning void, which is only assignable when the declared return type is literally void — 'undefined | Promise<unknown>' rejected it and failed the Next.js type check in CI.

Summary
chip/chip-chrome.ts— replacingchip-input/chip-field-chrome.ts. Adds the chip-content tokens (chipGeometryClass,chipContentGap,chipContentIconClass,chipContentLabelClass,cellIconNodeClass) so non-chip surfaces (e.g. resource table cells) compose the same chrome instead of duplicating class strings; all re-exported from the@/components/emcnbarrelChipvariants:ghostbecomes the implicitdefault(omitvariantto get it), andfilledis reserved for chip fields/triggers — removed fromChip's public variant union, with allvariant='filled'consumers migrated. Add sharedChipChevronChipModalField" — migrate hand-rolled field rows across knowledge, settings, tables, files, deploy, sidebar, auth, and ee modals so fields land at the canonicalpx-4gutter matching header/footerloading.tsxfiles withResourceChromeFallback, which paints the page's REAL resource chrome (header icon/title or breadcrumbs, exact action chips, search/filter/sort, column headers) with an empty body — navigation never flashes a blank frame or a mismatched skeletonresource-options-bar→resource-options; simplifyresource.tsxandresource-headerBreadcrumb,Callout, andFormField(emcn + the mcp-local copy) now that nothing uses themconnector-config-fieldsfor the knowledge connector modals and an eeInfoNote; adduseTagUsageQuery(+tagUsagekey and invalidations); makeuseInlineRenamesave async with anisSavingflag, aligned to the sidebar rename pattern.cursor/.agentsmirrors) to document the new chrome source,DropdownMenuas the canonical menu, and theChipModalFieldruleType of Change
Testing
Tested manually.
tsc --noEmitclean,bun run lintclean,bun run check:api-validation:strictpassesChecklist
Merge with staging
Merged
origin/staging(68 conflicted files) reconciling this branch with the props-drivenChipModalFooter/ChipConfirmModalrefactor (#4905): staging's modal structure + this branch'sChipModalFieldbodies and chip chrome. Staging features verified intact (stable column ids #4898, async CSV imports #4927, mothership v0.2 #4923, toast redesign #4909, suggested skills #4912).Reviewer note (deliberate visual change):
ChipModalFooter/ChipConfirmModalinternals now render Cancel/dismiss/secondary chips as the bare default variant instead offilled, per this branch's rule thatfilledis reserved for chip fields/triggers and removed fromChip's public API. Footer action variant unions narrowed to'primary' | 'destructive'. Same treatment for the "Added" chip inintegration-skills-section.tsx.