.section { display: flex; flex-direction: column; } .headerRow { display: flex; align-items: center; width: 100%; border-radius: 6px; transition: background 0.1s; } .header { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: none; background: transparent; color: var(--sidebar-foreground); font-size: 14px; text-align: left; cursor: pointer; } .headerRow:hover, .headerRow:focus-within { background: var(--sidebar-accent); } .headerDisabled { opacity: 0.5; } .headerDisabled .header { cursor: not-allowed; } .headerContent { min-width: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 6px; } .chevron { display: inline-flex; align-items: center; } .folderIcon { display: block; } .chevronOpen { color: var(--sidebar-foreground); } .name { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .badge { font-size: 10px; color: var(--muted-foreground); background: var(--sidebar-accent); padding: 1px 5px; border-radius: 4px; } /* Live git chip in the folder header — icon-only (the chip's `compact` form): a status dot on the branch icon conveys dirty / conflict / in-progress at a glance, while the branch name + ahead/behind live in the hover tooltip. Rendered as a sibling of the header button (buttons can't nest), kept snug after the folder name. The chip is a fixed 28px box, so the pill grows only to carry the spare width to the hover actions on the right. */ .gitPill { display: inline-flex; flex: 1 1 auto; min-width: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; text-align: inherit; cursor: pointer; } /* With a chip present, let the pill — not the folder name — own the spare width, so the icon sits right after the name and the hover actions stay pinned to the right edge. Without a chip the header keeps growing as before. */ .headerRow:has(.gitPill) .header { flex-grow: 0; } /* Trusted sessions use the sidebar's shared row with its own left indent; read-only rows apply the same indent below. */ .sessions { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; } .empty { padding: 4px 8px 4px 26px; font-size: 13px; color: var(--muted-foreground); } .error { padding: 4px 8px 4px 26px; color: var(--error-color); font-size: 13px; } .sessionItemReadOnly { display: flex; align-items: center; gap: 6px; margin-left: 26px; padding: 4px 8px; border-radius: 8px; color: var(--muted-foreground); cursor: default; } .sessionName { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sessionTime { flex: 0 0 auto; font-size: 10px; color: var(--muted-foreground); }