Skip to content

Commit d1f9a80

Browse files
authored
Merge branch 'main' into fix/macos-snapshot-resolution
2 parents ec9a1ee + aff9318 commit d1f9a80

68 files changed

Lines changed: 1587 additions & 886 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ jobs:
5252
- name: Check
5353
run: vp check
5454

55+
- name: Check className overrides on components/ui do not grow
56+
run: vp run lint:restyle-ceiling
57+
5558
- name: Typecheck
5659
run: vpr typecheck
5760

‎AGENTS.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Full glossary with file links: `docs/internals/glossary.md`
158158
## Taste
159159

160160
- Complexity belongs at the adapter boundary. Orchestration stays pure, UI stays dumb.
161+
- `apps/web/src/components/ui` exports own their look. Pick a `variant` or `size`; do not restyle one with `className`. If none fits, add a variant to the component, not classes at the call site. Layout classes (width, flex, margin, position) belong on the parent. `shadcn/no-restyle` reports violations and CI caps their count.
161162
- Inferred types over annotations. `any` is the enemy.
162163
- Comments describe how a thing is used, and move when the code moves. To be used mostly to describe functions, not to annotate every line of behavior.
163164
- Our users drive agents all day and notice a dropped frame, a lying spinner, and a stale label. No continuously repainting animations; they peg the GPU on high-refresh displays.

‎apps/mobile/src/lib/composerAttachmentUploadQueue.test.ts‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,31 @@ describe("composer attachment upload queue", () => {
105105
queue.dispose();
106106
});
107107

108+
it("retries a failed attachment when the worker restores requests after reconnect", async () => {
109+
let states: Readonly<Record<string, ComposerAttachmentUploadState>> = {};
110+
const upload = vi.fn().mockRejectedValueOnce(new Error("Disconnected")).mockResolvedValue(true);
111+
const queue = createComposerAttachmentUploadQueue({
112+
upload,
113+
onChange: (next) => {
114+
states = next;
115+
},
116+
});
117+
const local = request("failed-upload");
118+
const key = composerAttachmentUploadKey(environmentId, local.attachment.id);
119+
queue.sync([local]);
120+
await queue.settled();
121+
expect(states[key]?.status).toBe("failed");
122+
queue.sync([local]);
123+
await queue.settled();
124+
expect(upload).toHaveBeenCalledTimes(1);
125+
queue.sync([]);
126+
queue.sync([local]);
127+
await queue.settled();
128+
expect(upload).toHaveBeenCalledTimes(2);
129+
expect(states[key]?.status).toBe("ready");
130+
queue.dispose();
131+
});
132+
108133
it("ignores a late completion after removal or environment switch", async () => {
109134
const gate = Promise.withResolvers<boolean>();
110135
const started = Promise.withResolvers<void>();

‎apps/server/src/provider/Layers/OpenCodeAdapter.test.ts‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7155,27 +7155,27 @@ it.layer(OpenCodeAdapterTestLayer)("OpenCodeAdapterLive", (it) => {
71557155
const values = Map.prototype.values;
71567156
yield* Effect.acquireRelease(
71577157
Effect.sync(() =>
7158-
vi
7159-
.spyOn(Map.prototype, "values")
7160-
.mockImplementation(function (this: Map<unknown, unknown>) {
7161-
const iterator = values.call(this);
7162-
const next = iterator.next.bind(iterator);
7163-
iterator.next = () => {
7164-
const result = next();
7165-
const value: unknown = result.value;
7166-
if (
7167-
typeof value === "object" &&
7168-
value !== null &&
7169-
"id" in value &&
7170-
typeof value.id === "string" &&
7171-
value.id.startsWith("history-part-")
7172-
) {
7173-
visitedHistoryParts += 1;
7174-
}
7175-
return result;
7176-
};
7177-
return iterator;
7178-
}),
7158+
vi.spyOn(Map.prototype, "values").mockImplementation(function (
7159+
this: Map<unknown, unknown>,
7160+
) {
7161+
const iterator = values.call(this);
7162+
const next = iterator.next.bind(iterator);
7163+
iterator.next = () => {
7164+
const result = next();
7165+
const value: unknown = result.value;
7166+
if (
7167+
typeof value === "object" &&
7168+
value !== null &&
7169+
"id" in value &&
7170+
typeof value.id === "string" &&
7171+
value.id.startsWith("history-part-")
7172+
) {
7173+
visitedHistoryParts += 1;
7174+
}
7175+
return result;
7176+
};
7177+
return iterator;
7178+
}),
71797179
),
71807180
(spy) => Effect.sync(() => spy.mockRestore()),
71817181
);

‎apps/web/src/browser/HostedBrowserWebview.tsx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,26 @@ export function HostedBrowserWebview(props: {
156156
}
157157
}, recovery.delayMs);
158158
};
159+
// A click inside the guest only reaches this document as a webview focus
160+
// event, so open menus and popovers never see the outside press that
161+
// would dismiss them. Replay it as a pointerdown on the webview itself.
162+
const dismissHostPopups = () => {
163+
webview.dispatchEvent(
164+
new PointerEvent("pointerdown", { bubbles: true, pointerType: "mouse" }),
165+
);
166+
};
159167
webview.addEventListener("did-attach", register);
160168
webview.addEventListener("dom-ready", register);
161169
webview.addEventListener("render-process-gone", recoverGuest);
170+
webview.addEventListener("focus", dismissHostPopups);
162171
register();
163172
return () => {
164173
disposed = true;
165174
if (recoveryTimeout !== null) clearTimeout(recoveryTimeout);
166175
webview.removeEventListener("did-attach", register);
167176
webview.removeEventListener("dom-ready", register);
168177
webview.removeEventListener("render-process-gone", recoverGuest);
178+
webview.removeEventListener("focus", dismissHostPopups);
169179
};
170180
}, [clientSettingsHydrated, config, initialSrc, runtimeTabId, webviewGeneration]);
171181

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) {
244244
side="left"
245245
collapsible="offcanvas"
246246
data-app-sidebar=""
247-
className="border-r border-sidebar-border bg-sidebar text-sidebar-foreground"
247+
className="border-r border-sidebar-border"
248248
resizable={{
249249
maxWidth: sidebarMaximumWidth,
250250
minWidth: THREAD_SIDEBAR_MIN_WIDTH,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ export function BranchToolbarBranchSelector({
861861
<div className="flex min-h-0 flex-1 flex-col overflow-hidden">
862862
<ComboboxEmpty>No refs found.</ComboboxEmpty>
863863
<div className="relative min-h-0 w-full max-h-56 flex-1 overflow-hidden">
864-
<ComboboxListVirtualized className="size-full min-w-0 p-0">
864+
<ComboboxListVirtualized>
865865
<LegendList<string>
866866
ref={branchListRef}
867867
data={filteredBranchPickerItems}
@@ -905,7 +905,7 @@ export function BranchToolbarBranchSelector({
905905
className="flex cursor-pointer items-center justify-between gap-3 border-t border-border/60 px-3 py-2 text-xs"
906906
>
907907
<span className="flex min-w-0 items-center gap-1.5 font-medium text-muted-foreground">
908-
<RefreshIcon aria-hidden="true" className="size-3 shrink-0 opacity-70" />
908+
<RefreshIcon aria-hidden="true" size="xs" className="shrink-0" />
909909
<span className="truncate">Start from origin</span>
910910
</span>
911911
<Switch

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function ConfirmDialogHost() {
7575
if (!open) completeConfirmDialogClose();
7676
}}
7777
>
78-
<AlertDialogPopup className="max-w-lg">
78+
<AlertDialogPopup>
7979
<AlertDialogHeader>
8080
<AlertDialogTitle className="wrap-anywhere">{copy.title}</AlertDialogTitle>
8181
{copy.description ? (

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ export default function DiffPanel({
856856
/>
857857
}
858858
>
859-
<RefreshIcon className="size-3.5" refreshing={isRefreshingDiff} />
859+
<RefreshIcon size="sm" refreshing={isRefreshingDiff} />
860860
</TooltipTrigger>
861861
<TooltipPopup side="top">
862862
{isRefreshingDiff ? "Refreshing diff…" : "Refresh diff"}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
851851
aria-live="polite"
852852
className="flex items-center gap-2 rounded-md border border-input bg-muted/40 px-3 py-2 text-xs text-muted-foreground dark:border-transparent dark:bg-white/[0.035]"
853853
>
854-
<Spinner className="size-3.5" aria-hidden />
854+
<Spinner size="sm" aria-hidden />
855855
Publishing repository to {publishProviderLabel}...
856856
</div>
857857
) : null}
@@ -938,7 +938,7 @@ function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
938938
<Button disabled={!canSubmitPublishRepository} onClick={submitPublishRepository}>
939939
{publishRepositoryAction.isPending ? (
940940
<>
941-
<Spinner className="size-3.5" aria-hidden />
941+
<Spinner size="sm" aria-hidden />
942942
Publishing...
943943
</>
944944
) : (

0 commit comments

Comments
 (0)