Files
twenty/packages
Sonarly Claude Code 34ef01b9ed fix: restore chip count display for relation-to-many fields in unfocused table cells
https://sonarly.com/issue/15886?type=bug

Table performance optimization replaced dynamic focus state with static unfocused provider, causing the ExpandableList "+N" overflow count to never display in non-hovered cells. Overflowing relation chips are hidden with no visual indicator.

Fix: The table performance optimization in commit 159bb9d70a replaced the dynamic `FieldFocusContextProvider` (with `useState`) with `FieldFocusStaticUnfocusedProvider` (hardcoded `isFocused: false`). This broke `RelationFromManyFieldDisplay`, `MorphRelationOneToManyFieldDisplay`, and `MultiSelectFieldDisplay` which all passed `isChipCountDisplayed={isFocused}` to `ExpandableList`.

When `isChipCountDisplayed` is explicitly `false`, `ExpandableList` both:
1. Hides the "+N" overflow count badge (line 95: `canDisplayChipCount = false`)
2. Disables its internal mouse hover fallback (lines 130-138: `onMouseEnter`/`onMouseLeave` set to `undefined`)

The fix removes the `isChipCountDisplayed` prop from all affected `ExpandableList` usages. When the prop is `undefined`, `ExpandableList` falls back to its internal hover detection via `onMouseEnter`/`onMouseLeave`, which correctly shows the "+N" count on hover. This is the same pattern already used by `LinksDisplay`, `FilesDisplay`, and `ArrayDisplay`.

Additionally, `MultiSelectFieldDisplay` had a dead branch (`isFocused ? <ExpandableList> : <MultiSelectDisplay>`) where the `ExpandableList` path was never reached. The fix always renders `ExpandableList`, consistent with the other display components.

Removed unused imports: `useFieldFocus`, `styled` from `@linaria/react`, `themeCssVariables`, `StyledContainer` styled component, and `MultiSelectDisplay`.
2026-03-18 10:37:18 +00:00
..
2026-03-17 11:43:17 +01:00
2026-03-18 09:54:54 +00:00