From 918721fdc1a0d57f6fb060d364b021c2575ff539 Mon Sep 17 00:00:00 2001 From: 4nrry Date: Thu, 18 Jun 2026 13:00:46 -0300 Subject: [PATCH 1/4] feat(ui): add Sincronizar tudo button to GroupView --- apps/desktop/src/App.tsx | 39 +++++++++++++++++++++++++++++++--- apps/desktop/src/styles.css | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index 3107e1c..b267234 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -380,6 +380,27 @@ function RepoGroupView(props: { }); } + const [syncingAll, setSyncingAll] = createSignal(false); + + const handleSyncAll = async () => { + setSyncingAll(true); + try { + const repos = snapshot()?.repos ?? []; + const tracked = repos.filter(r => isTrackedRepo(r.repo.path)).map(r => r.repo.path); + + const promises = tracked.map(path => + syncChanges(path).catch(e => { + console.error("Failed to sync", path, e); + }) + ); + await Promise.all(promises); + + await refetch(); + } finally { + setSyncingAll(false); + } + }; + let timer: ReturnType | undefined; onMount(() => { timer = setInterval(() => { @@ -392,9 +413,21 @@ function RepoGroupView(props: { return (
-
-

{props.group.display_name}

- {props.group.path} +
+
+

{props.group.display_name}

+ {props.group.path} +
+
Date: Thu, 18 Jun 2026 13:03:55 -0300 Subject: [PATCH 2/4] fix(ui): use theme tokens for Sincronizar tudo button --- apps/desktop/src/styles.css | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/apps/desktop/src/styles.css b/apps/desktop/src/styles.css index 5bafdeb..ff40217 100644 --- a/apps/desktop/src/styles.css +++ b/apps/desktop/src/styles.css @@ -1107,24 +1107,25 @@ body, } .btn--sync-all { - background: #e11d48; - color: white; + background: var(--color-component-selected-bg); + color: var(--color-component-selected-fg); border-radius: var(--radius-m); padding: 6px 12px; display: flex; align-items: center; gap: 8px; font-weight: 600; - border: 1px solid rgba(225, 29, 72, 0.3); + border: 1px solid var(--color-component-selected-bg); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); transition: all 0.3s; cursor: pointer; } .btn--sync-all:hover:not(:disabled) { - background: rgba(225, 29, 72, 0.9); + background: var(--color-component-selected-bg); + filter: brightness(1.2); transform: scale(1.01); - box-shadow: 0 4px 12px rgba(225, 29, 72, 0.2); + box-shadow: 0 4px 12px var(--color-component-selected-bg); } .btn--sync-all:active:not(:disabled) { @@ -1132,10 +1133,11 @@ body, } .btn--sync-all:disabled { - background: rgba(225, 29, 72, 0.2); - color: rgba(225, 29, 72, 0.6); + background: var(--color-component-selected-bg); + color: var(--color-component-selected-fg); + opacity: 0.5; cursor: not-allowed; - border-color: rgba(225, 29, 72, 0.1); + border-color: var(--color-component-selected-bg); animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; } From 6a83c622d12277e3e8bfaa0d3f86abb3f40fc9e1 Mon Sep 17 00:00:00 2001 From: 4nrry Date: Thu, 18 Jun 2026 13:08:55 -0300 Subject: [PATCH 3/4] feat(ui): display errors caught during Group sync all --- apps/desktop/src/App.tsx | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index b267234..a542077 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -381,18 +381,23 @@ function RepoGroupView(props: { } const [syncingAll, setSyncingAll] = createSignal(false); + const [syncErrors, setSyncErrors] = createSignal([]); const handleSyncAll = async () => { setSyncingAll(true); + setSyncErrors([]); try { const repos = snapshot()?.repos ?? []; const tracked = repos.filter(r => isTrackedRepo(r.repo.path)).map(r => r.repo.path); - const promises = tracked.map(path => - syncChanges(path).catch(e => { - console.error("Failed to sync", path, e); - }) - ); + const promises = tracked.map(async path => { + try { + await syncChanges(path); + } catch (e) { + const name = path.split('/').pop() || path; + setSyncErrors(errs => [...errs, `Failed to sync ${name}: ${String(e)}`]); + } + }); await Promise.all(promises); await refetch(); @@ -440,6 +445,15 @@ function RepoGroupView(props: { > {(group) => ( <> + 0}> + +
Date: Thu, 18 Jun 2026 13:18:05 -0300 Subject: [PATCH 4/4] feat(ui): add copy prompt button for sync errors --- apps/desktop/src/App.tsx | 45 +++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index a542077..873eb38 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -381,7 +381,7 @@ function RepoGroupView(props: { } const [syncingAll, setSyncingAll] = createSignal(false); - const [syncErrors, setSyncErrors] = createSignal([]); + const [syncErrors, setSyncErrors] = createSignal<{repoName: string, path: string, errorMsg: string}[]>([]); const handleSyncAll = async () => { setSyncingAll(true); @@ -395,7 +395,7 @@ function RepoGroupView(props: { await syncChanges(path); } catch (e) { const name = path.split('/').pop() || path; - setSyncErrors(errs => [...errs, `Failed to sync ${name}: ${String(e)}`]); + setSyncErrors(errs => [...errs, { repoName: name, path, errorMsg: String(e) }]); } }); await Promise.all(promises); @@ -446,12 +446,10 @@ function RepoGroupView(props: { {(group) => ( <> 0}> -