The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 18:00 UTC
fix(web): keep workspace options when expanding lineage (#16635)
maria committed
Oct 6, 2026 at 22:32 UTC
847c53df0126a225fb1a64d4bda9acfffa2b68ed
1 file changed
+21
-4
apps/web/src/components/chat/ThreadDetailsCard.tsx
+21
-4
@@ -53,6 +53,7 @@ export function ThreadDetailsCard({
53
const [measurements, setMeasurements] = useState({
54
key: measurementKey,
55
heights: { full: 0, compact: 0 },
56
+ fullContentHeight: 0,
57
});
58
const contentHeights =
59
measurements.key === measurementKey ? measurements.heights : { full: 0, compact: 0 };
@@ -64,8 +65,8 @@ export function ThreadDetailsCard({
65
? preferredPlacement.x + preferredPlacement.width
66
: undefined;
67
const cardBottom =
67
- preferredPlacement && contentHeights.full > 0
68
- ? preferredPlacement.y + Math.min(contentHeights.full, preferredPlacement.height)
68
+ preferredPlacement && measurements.key === measurementKey && measurements.fullContentHeight > 0
69
+ ? preferredPlacement.y + Math.min(measurements.fullContentHeight, preferredPlacement.height)
70
: undefined;
71
useLayoutEffect(() => {
72
reportDetailsCard?.(
@@ -88,11 +89,27 @@ export function ThreadDetailsCard({
89
const measure = () => {
90
const frame = element.closest<HTMLElement>("[data-thread-details-card]");
91
const next = element.offsetHeight + (frame ? frame.offsetHeight - frame.clientHeight : 0);
92
+ // Lineage scrolls as it expands. Counting it toward density would hide
93
+ // the section and workspace controls when the user asks to see more rows.
94
+ const lineage = element.querySelector<HTMLElement>("[data-thread-relationships-panel]");
95
+ const fittingHeight = next - (lineage?.offsetHeight ?? 0);
96
setMeasurements((current) => {
97
const heights = current.key === measurementKey ? current.heights : { full: 0, compact: 0 };
93
- return current.key === measurementKey && heights[density] === next
98
+ const fullContentHeight =
99
+ density === "full"
100
+ ? next
101
+ : current.key === measurementKey
102
+ ? current.fullContentHeight
103
+ : 0;
104
+ return current.key === measurementKey &&
105
+ heights[density] === fittingHeight &&
106
+ current.fullContentHeight === fullContentHeight
107
? current
95
- : { key: measurementKey, heights: { ...heights, [density]: next } };
108
+ : {
109
+ key: measurementKey,
110
+ heights: { ...heights, [density]: fittingHeight },
111
+ fullContentHeight,
112
+ };
113
});
114
};
115
measure();