MCPcopy Create free account
hub / github.com/freecodexyz/free-code / goBackToList

Function goBackToList

src/components/tasks/BackgroundTasksDialog.tsx:354–365  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352 // the stale-state trap: if you opened with 1 task (auto-skipped to detail),
353 // then a second task started, 'back' should show the list — not close.
354 const goBackToList = () => {
355 if (skippedListOnMount.current && allSelectableItems.length <= 1) {
356 onDone('Background tasks dialog dismissed', {
357 display: 'system'
358 });
359 } else {
360 skippedListOnMount.current = false;
361 setViewState({
362 mode: 'list'
363 });
364 }
365 };
366
367 // If an item is selected, show the appropriate view
368 if (viewState.mode !== 'list' && typedTasks) {

Callers

nothing calls this directly

Calls 1

onDoneFunction · 0.50

Tested by

no test coverage detected