Skip to content

Commit 3816aa8

Browse files
test: settle empty file roots and tooltip updates
1 parent 473c7e4 commit 3816aa8

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

apps/web/components/task/file-browser-tree-loader.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ function applyCompletedTree({
154154
retry: () => void;
155155
}): boolean {
156156
if (!completed) return false;
157-
// An executor workspace can briefly expose an empty root while its
158-
// repository is materializing. Keep the result provisional for a bounded
159-
// period so the Files panel does not cache an empty tree prematurely.
160-
if (!completed.root || (completed.root.children?.length ?? 0) === 0) {
157+
// An executor workspace can briefly expose an existing root with no
158+
// children while its repository is materializing. A null root is a valid
159+
// empty workspace result and must settle immediately.
160+
if (completed.root && (completed.root.children?.length ?? 0) === 0) {
161161
const retryScheduled = scheduleEmptyTreeRetry({
162162
isCurrentLoad,
163163
owner,

apps/web/e2e/tests/pr/pr-status-badge.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,9 @@ test.describe("PR status badge", () => {
679679
await icon.hover();
680680

681681
const multiSummary = visibleTaskPRSummary(testPage);
682+
// The second association updates the icon while the disclosure is closed.
683+
// Wait for the tooltip itself to reopen before querying its refreshed rows.
684+
await expect(multiSummary).toBeVisible({ timeout: 15_000 });
682685
const entries = multiSummary.getByTestId("pr-task-status-entry");
683686
await expect(entries).toHaveCount(2);
684687
await expect(entries.nth(0).getByTestId("pr-task-status-number")).toHaveText("PR #2966");

0 commit comments

Comments
 (0)