From 3b20bf6d4f744e63faa8b798ca911a93338dc4f3 Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:49:40 -0500 Subject: [PATCH] fix(app): changes view --- packages/app/src/context/local.tsx | 5 +++-- packages/app/src/pages/index.tsx | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/app/src/context/local.tsx b/packages/app/src/context/local.tsx index 804bb067..b512ef47 100644 --- a/packages/app/src/context/local.tsx +++ b/packages/app/src/context/local.tsx @@ -124,11 +124,12 @@ function init() { return store.node[store.active] }) const opened = createMemo(() => store.opened.map((x) => store.node[x])) - const changes = createMemo(() => new Set(sync.data.changes.map((f) => f.path))) + const changeset = createMemo(() => new Set(sync.data.changes.map((f) => f.path))) + const changes = createMemo(() => Array.from(changeset()).sort((a, b) => a.localeCompare(b))) const status = (path: string) => sync.data.changes.find((f) => f.path === path) const changed = (path: string) => { - const set = changes() + const set = changeset() if (set.has(path)) return true for (const p of set) { if (p.startsWith(path ? path + "/" : "")) return true diff --git a/packages/app/src/pages/index.tsx b/packages/app/src/pages/index.tsx index 8cb560d8..6890522e 100644 --- a/packages/app/src/pages/index.tsx +++ b/packages/app/src/pages/index.tsx @@ -259,9 +259,12 @@ export default function Page() { -
+ No changes yet
} + > - +