Add Tasks regression coverage for deferred Ink teardown#7118
Add Tasks regression coverage for deferred Ink teardown#7118dmerand wants to merge 1 commit intofix/progress-bar-clearing-react19from
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
901f2b3 to
35c8ba6
Compare
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/ui/components/SingleTask.d.ts@@ -4,8 +4,9 @@ interface SingleTaskProps<T> {
title: TokenizedString;
task: (updateStatus: (status: TokenizedString) => void) => Promise<T>;
onComplete?: (result: T) => void;
+ onError?: (error: Error) => void;
onAbort?: () => void;
noColor?: boolean;
}
-declare const SingleTask: <T>({ task, title, onComplete, onAbort, noColor }: SingleTaskProps<T>) => React.JSX.Element | null;
+declare const SingleTask: <T>({ task, title, onComplete, onError, onAbort, noColor }: SingleTaskProps<T>) => React.JSX.Element | null;
export { SingleTask };
\ No newline at end of file
|
Coverage report
Test suite run success3993 tests passing in 1527 suites. Report generated by 🧪jest coverage report action from 35c8ba6 |
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |

WHY are these changes introduced?
Part of https://github.com/shop/issues-develop/issues/22483.
#7062 adds deferred Ink teardown for this task-rendering path.
This follow-up keeps the change narrow and makes that behavior easier to trust by adding focused regression coverage around
Tasks, where React can otherwise lose the race to flush the final success or failure state before the tree is unmounted.WHAT is this pull request doing?
Tasksregression coverage for success and failure teardown behavioruse-async-and-unmount.tsby centralizing deferred teardown in a helperHow to test your changes?
TasksUI tests and confirm the final frame is cleared after success and failure.Measuring impact
How do we know this change was effective? Please choose one:
Checklist