첫 소스 추가 시 재시작 없이 온보딩→그리드 전환
ContentArea의 소스 목록 리소스가 마운트 시 1회만 조회해, 소스가 0개인 세션에서 첫 폴더를 추가해도 온보딩 화면이 그대로 남았다. sidebarVersion을 리소스 소스로 키잉해 소스 추가/제거 시 재조회하도록 수정 (Sidebar와 동일 패턴). library-changed → refreshSidebar로 즉시 전환. 검증: 온보딩 상태에서 소스 추가+스캔 → 리로드 없이 ~1초 후 그리드 표시. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
|||||||
refreshSidebar,
|
refreshSidebar,
|
||||||
setGridRowHeight,
|
setGridRowHeight,
|
||||||
setView,
|
setView,
|
||||||
|
sidebarVersion,
|
||||||
snapshot,
|
snapshot,
|
||||||
updateScanProgress,
|
updateScanProgress,
|
||||||
view,
|
view,
|
||||||
@@ -31,8 +32,12 @@ export const ContentArea: Component = () => {
|
|||||||
};
|
};
|
||||||
onCleanup(() => clearTimeout(debounce));
|
onCleanup(() => clearTimeout(debounce));
|
||||||
|
|
||||||
// 소스가 하나도 없으면 온보딩 표시
|
// 소스가 하나도 없으면 온보딩 표시. 소스 추가/제거(sidebarVersion) 시 재조회해
|
||||||
const [sources] = createResource(listSources);
|
// 첫 소스를 추가하면 재시작 없이 즉시 그리드로 전환된다.
|
||||||
|
const [sources] = createResource(
|
||||||
|
() => sidebarVersion(),
|
||||||
|
() => listSources(),
|
||||||
|
);
|
||||||
const isEmpty = () => sources() && sources()!.length === 0;
|
const isEmpty = () => sources() && sources()!.length === 0;
|
||||||
|
|
||||||
const addLocal = async () => {
|
const addLocal = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user