Skip to content

Commit e7b71ff

Browse files
Merge branch 'main' into fix/prune-pinned-runtimes
2 parents 95e8dea + 8ecb607 commit e7b71ff

6 files changed

Lines changed: 16 additions & 51 deletions

File tree

‎apps/web/src/components/GitActionsControl.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,7 @@ export default function GitActionsControl({
19381938
)}
19391939
<button
19401940
type="button"
1941-
className="flex min-w-0 flex-1 items-center justify-between gap-3 text-left"
1941+
className="flex min-w-0 flex-1 items-center justify-between gap-3 text-left enabled:cursor-pointer"
19421942
disabled={!canOperateThread || workingTreeRoot === null}
19431943
aria-label={`Open ${file.path} in editor`}
19441944
onClick={() => openChangedFileInEditor(file.path)}

‎apps/web/src/components/chat/ChangedFilesTree.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export const ChangedFilesTree = memo(function ChangedFilesTree(props: {
182182
type="button"
183183
data-scroll-anchor-ignore
184184
aria-expanded={isExpanded}
185-
className="group flex h-7 w-full items-center gap-2 rounded-md py-1.5 pr-2 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"
185+
className="group flex h-7 w-full cursor-pointer items-center gap-2 rounded-md py-1.5 pr-2 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"
186186
style={{ paddingLeft: `${leftPadding}px` }}
187187
onClick={() => toggleDirectory(node.path)}
188188
>
@@ -213,7 +213,7 @@ export const ChangedFilesTree = memo(function ChangedFilesTree(props: {
213213
<button
214214
key={`file:${node.path}`}
215215
type="button"
216-
className="group flex h-7 w-full items-center gap-2 rounded-md py-1.5 pr-2 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"
216+
className="group flex h-7 w-full cursor-pointer items-center gap-2 rounded-md py-1.5 pr-2 text-left transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"
217217
style={{ paddingLeft: `${leftPadding}px` }}
218218
onClick={() => onOpenTurnDiff(runId, node.path)}
219219
onContextMenu={

‎apps/web/src/components/usage/UsageLimitsPooled.tsx‎

Lines changed: 8 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929

3030
import { ensureLocalApi } from "../../localApi";
3131
import { usePrimarySettings } from "../../hooks/useSettings";
32-
import { observeResize } from "../../lib/observeResize";
3332
import { cn } from "../../lib/utils";
3433
import { formatUpcomingTimestamp } from "../../timestampFormat";
3534
import { ProviderInstanceIcon } from "../chat/ProviderInstanceIcon";
@@ -286,7 +285,6 @@ function PoolSegment({
286285
readonly color: string;
287286
readonly now: number;
288287
readonly index: number;
289-
readonly labeled: boolean;
290288
readonly showAccountName: boolean;
291289
}) {
292290
return account.redeem ? (
@@ -332,14 +330,12 @@ function SegmentTriggers({
332330
color,
333331
now,
334332
index,
335-
labeled,
336333
showAccountName,
337334
}: SegmentPayload & {
338335
readonly refillPercent: number;
339336
readonly color: string;
340337
readonly now: number;
341338
readonly index: number;
342-
readonly labeled: boolean;
343339
readonly showAccountName: boolean;
344340
}) {
345341
const popover = use(SegmentPopoverContext) ?? undefined;
@@ -359,10 +355,7 @@ function SegmentTriggers({
359355
type="button"
360356
style={{ gridColumn: index, gridRow: 1 }}
361357
aria-label={`${account.displayName ?? (account.email ? accountInitials(account.email) : account.driver)}: ${remaining}% left${resetsIn ? `, ${resetsIn}` : ""}${timeLeft === null ? "" : `, ${timeLeft}% of the window left`}${credits ? `, ${credits} reset ${credits === 1 ? "credit" : "credits"} banked` : ""}`}
362-
className={cn(
363-
"relative min-w-0 cursor-pointer rounded-md bg-muted text-start outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[popup-open]:ring-1 data-[popup-open]:ring-inset data-[popup-open]:ring-border",
364-
labeled ? "h-8" : "h-5",
365-
)}
358+
className="relative h-5 min-w-0 cursor-pointer rounded-md bg-muted text-start outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[popup-open]:ring-1 data-[popup-open]:ring-inset data-[popup-open]:ring-border @2xl/pool:h-8"
366359
/>
367360
}
368361
>
@@ -392,19 +385,11 @@ function SegmentTriggers({
392385
) : null}
393386
<span
394387
aria-hidden
395-
className={cn(
396-
"absolute inset-0 flex items-center justify-center overflow-hidden rounded-md text-3xs leading-none font-semibold text-foreground/80 tabular-nums",
397-
labeled && "hidden",
398-
)}
388+
className="absolute inset-0 flex items-center justify-center overflow-hidden rounded-md text-3xs leading-none font-semibold text-foreground/80 tabular-nums @2xl/pool:hidden"
399389
>
400390
{index}
401391
</span>
402-
<div
403-
className={cn(
404-
"relative h-full min-w-0 items-center gap-1.5 overflow-hidden rounded-md px-2 text-xs",
405-
labeled ? "flex" : "hidden",
406-
)}
407-
>
392+
<div className="relative hidden h-full min-w-0 items-center gap-1.5 overflow-hidden rounded-md px-2 text-xs @2xl/pool:flex">
408393
{showAccountName ? (
409394
<AccountName
410395
account={account}
@@ -432,7 +417,7 @@ function SegmentTriggers({
432417
) : null}
433418
</div>
434419
</PopoverTrigger>
435-
{labeled ? null : <LegendRow payload={payload} color={color} now={now} index={index} />}
420+
<LegendRow payload={payload} color={color} now={now} index={index} />
436421
</>
437422
);
438423
}
@@ -459,7 +444,7 @@ function LegendRow({
459444
payload={payload}
460445
style={{ gridColumn: "1 / -1", gridRow: index + 1 }}
461446
render={<Button variant="ghost" size="compact" />}
462-
className="min-w-0"
447+
className="min-w-0 @2xl/pool:hidden"
463448
>
464449
<span className="relative inline-flex size-4 shrink-0 items-center justify-center rounded-sm text-3xs leading-none font-semibold text-foreground/80 tabular-nums">
465450
<span
@@ -494,8 +479,6 @@ function LegendRow({
494479
);
495480
}
496481

497-
const LABELED_SEGMENT_MIN_WIDTH = 224;
498-
499482
function PoolBar({
500483
pool,
501484
color,
@@ -506,32 +489,11 @@ function PoolBar({
506489
readonly now: number;
507490
}) {
508491
const restores = new Map(pool.resets.map((reset) => [reset.member.account.key, reset]));
509-
const columns = pool.columns.length;
510-
const [dimensions, setDimensions] = useState({ width: 0, gap: 0 });
511-
const probeRef = useRef<HTMLDivElement>(null);
512-
const gridRef = useRef<HTMLDivElement>(null);
513-
useLayoutEffect(() => {
514-
const probe = probeRef.current;
515-
const grid = gridRef.current;
516-
if (!probe || !grid) return;
517-
return observeResize(probe, ([entry]) => {
518-
if (!entry) return;
519-
setDimensions({
520-
width: entry.contentRect.width,
521-
gap: Number.parseFloat(getComputedStyle(grid).columnGap) || 0,
522-
});
523-
});
524-
}, []);
525-
const labeled =
526-
(dimensions.width - dimensions.gap * (columns - 1)) / columns >= LABELED_SEGMENT_MIN_WIDTH;
527492
return (
528-
<div className="min-w-0">
529-
{/* A height-independent probe keeps legend changes from triggering resize feedback. */}
530-
<div ref={probeRef} />
493+
<div className="@container/pool min-w-0">
531494
<div
532-
ref={gridRef}
533495
className="grid gap-x-1 gap-y-1"
534-
style={{ gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` }}
496+
style={{ gridTemplateColumns: `repeat(${pool.columns.length}, minmax(0, 1fr))` }}
535497
>
536498
{pool.columns.map((member, position) =>
537499
member.window ? (
@@ -544,8 +506,7 @@ function PoolBar({
544506
color={color}
545507
now={now}
546508
index={position + 1}
547-
labeled={labeled}
548-
showAccountName={columns > 1}
509+
showAccountName={pool.columns.length > 1}
549510
/>
550511
) : null,
551512
)}

‎apps/web/src/index.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ code {
20462046
}
20472047

20482048
.chat-markdown pre::-webkit-scrollbar {
2049-
height: 7px;
2049+
height: var(--app-scrollbar-width);
20502050
}
20512051

20522052
.chat-markdown pre::-webkit-scrollbar-thumb {

‎pnpm-lock.yaml‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ minimumReleaseAgeExclude:
220220
221221

222222
overrides:
223+
# Keep on the patched version. A fresh resolution would take a newer release and
224+
# fail on the unused patch. Move this with patches/expo-modules-core@*.patch.
225+
expo-modules-core: 58.0.22
223226
# Keep jsdom's optional peer consistent so Vite+ has one test-runner instance.
224227
"@exodus/bytes>@noble/hashes": "1.8.0"
225228
# Earlier React Navigation declarations create a circular type alias in TypeScript 7.

0 commit comments

Comments
 (0)