Fix UI token gate violations

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-07-09 20:49:40 +00:00
1 parent 5146483fe1
commit a7915c9bcf
5 files changed
+8 -3

No files matched your search

+1 -1
View File
@@ -70,7 +70,7 @@ describe("EntityRow", () => {
);
// The name keeps a usable floor instead of collapsing to zero...
expect(markup).toContain("min-w-(--sz-7rem)");
expect(markup).toContain("min-w-(--sz-6rem)");
// ...and the meta cluster is the item that yields (shrinks), not the title.
expect(markup).toContain("min-w-0 shrink");
expect(markup).not.toContain('class="flex items-center gap-2 shrink-0"');
+1 -1
View File
@@ -77,7 +77,7 @@ export function EntityRow({
className={cn(
// `titlePriority` gives the name a floor so it ellipsizes instead of
// collapsing to zero; otherwise the title may shrink to nothing.
titlePriority ? "min-w-(--sz-7rem)" : "min-w-0",
titlePriority ? "min-w-(--sz-6rem)" : "min-w-0",
!meta && "flex-1",
titleClassName,
)}
+1
View File
@@ -165,6 +165,7 @@ function SidebarAgentItem({
iconNode={<AgentIcon icon={agent.icon} className="shrink-0 h-4 w-4" />}
active={isActive}
liveCount={runCount}
labelClassName={builtInStatus ? "min-w-(--sz-4_5rem) flex-initial" : undefined}
className={cn(
"min-w-0 flex-1",
// Reserve room for the hover ⋯ menu; starred rows widen it for the
+3 -1
View File
@@ -44,6 +44,7 @@ interface SidebarNavItemProps {
iconNode?: ReactNode;
end?: boolean;
className?: string;
labelClassName?: string;
badge?: number;
badgeTone?: "default" | "danger";
/**
@@ -75,6 +76,7 @@ export function SidebarNavItem({
iconNode,
end,
className,
labelClassName,
badge,
badgeTone = "default",
badgeLabel,
@@ -156,7 +158,7 @@ export function SidebarNavItem({
/>
)}
</span>
<span className={rail ? SIDEBAR_RAIL_HIDDEN_LABEL : "flex-1 truncate"}>{label}</span>
<span className={rail ? SIDEBAR_RAIL_HIDDEN_LABEL : cn("min-w-0 flex-1 truncate", labelClassName)}>{label}</span>
{!rail && trailing}
{!rail && textBadge && (
<Badge variant="ghost"
+2
View File
@@ -1565,6 +1565,7 @@ span.paperclip-mention-chip[data-mention-kind="external-object"] {
--sz-80vh: 80vh; /* Extracted from ui/src/components/DocumentAnnotationPanel.tsx (max-h-[80vh]). */
--sz-360px: 360px; /* Extracted from ui/src/components/DocumentAnnotationPanel.tsx (w-[360px]). */
--sz-85vh: 85vh; /* Extracted from ui/src/components/DocumentDiffModal.tsx (max-h-[85vh]). */
--sz-6rem: 6rem; /* Extracted from ui/src/components/EntityRow.tsx (min-w-[6rem]). */
--sz-1px: 1px; /* Extracted from ui/src/components/EntityRow.tsx (top-[1px]). */
--sz-100px: 100px; /* Extracted from ui/src/components/ExecutionParticipantPicker.tsx (max-w-[100px]). */
--sz-calc-3: min(840px,calc(100dvh - 2rem)); /* Extracted from ui/src/components/FileViewerSheet.tsx (h-[min(840px,calc(100dvh-2rem))]). */
@@ -1618,6 +1619,7 @@ span.paperclip-mention-chip[data-mention-kind="external-object"] {
--sz-calc-23: min(32rem,calc(100vw - 2rem)); /* Extracted from ui/src/components/SearchableSelect.tsx (max-w-[min(32rem,calc(100vw-2rem))]). */
--sz-277px: 277px; /* Extracted from ui/src/components/SidebarAccountMenu.test.tsx (w-[277px]). */
--sz-calc-24: calc(100vw - 1rem); /* Extracted from ui/src/components/SidebarAccountMenu.tsx (max-w-[calc(100vw-1rem)]). */
--sz-4_5rem: 4.5rem; /* Extracted from ui/src/components/SidebarAgents.tsx (min-w-[4.5rem]). */
--sz-36px: 36px; /* Extracted from ui/src/components/WorkspaceFileBrowser.tsx (min-h-[36px]). */
--sz-32px: 32px; /* Extracted from ui/src/components/WorkspaceFileBrowser.tsx (min-h-[32px]). */
--sz-30px: 30px; /* Extracted from ui/src/components/WorkspaceFileBrowser.tsx (min-h-[30px]). */