Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(channels): stop DM expand from shrinking the Channels section (#8316)

gbirman89b6023baade
diff --git a/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsx b/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsx
index fe66a49962..63090e3e81 100644
--- a/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsx
+++ b/apps/web/src/features/channels-view/components/rail/ChannelsRailSection.tsx
@@ -97,9 +97,9 @@ function SectionScrollArea(props: {
/**
* How an open section claims height in its flex column.
*
- * - `half`: natural height, capped at half the column and shrinkable. Two
- * `half` siblings split the column; a third sibling is starved to zero
- * once both hit the cap, so keep `half` sections in a column of their own.
+ * - `half`: natural height, capped at half the column after reserving the
+ * section gap. Keep two `half` sections in a column of their own so neither
+ * shrinks when the other expands.
* - `fill`: grows into whatever the column has left.
* - `content`: natural height, never shrunk below it, capped at a third of
* the column so a long list still leaves room for its siblings.
@@ -125,7 +125,7 @@ function CollapsibleSectionRoot(props: {
props.open && sizing() === 'fill' && 'flex-1',
props.open &&
sizing() === 'half' &&
- 'shrink max-h-[calc(50%_-_0.375rem)]',
+ 'shrink max-h-[calc((100%-var(--sidebar-section-gap))/2)]',
props.open && sizing() === 'content' && 'shrink-0 max-h-1/3',
props.class
)}