Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Add rebuild cache functionality to issue and patch listing
Merged did:key:z6MkkfM3...sVz5 opened 10 months ago

In case of an outdated cobs cache we display a banner on top of the patch or issue listing, to allow users to rebuild the cobs cache of a repo similar to running rad patch cache After rebuilding we fetch the issues or patches from the start.

Small caveat with patches: The banner can only be shown after a user fetched all patches from the backend, so we are sure we tried to fetch all of them.

Also remove unnecessary filter map

did:key:z6MkkfM3...sVz5 opened with revision 870c4009 on base 30f586a0 +352 -14 10 months ago

In case of an outdated cobs cache we display a banner on top of the patch or issue listing, to allow users to rebuild the cobs cache of a repo similar to running rad patch cache After rebuilding we fetch the issues or patches from the start.

Small caveat with patches: The banner can only be shown after a user fetched all patches from the backend, so we are sure we tried to fetch all of them.

Also remove unnecessary filter map

did:key:z6Mki4CG...o5Zr commented on revision 1 10 months ago

Woodpecker pipeline #884 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
did:key:z6Mki4CG...o5Zr commented on revision 1 10 months ago

Woodpecker pipeline #884 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
did:key:z6Mki4CG...o5Zr commented on revision 1 10 months ago

Woodpecker pipeline #884 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
did:key:z6Mki4CG...o5Zr commented on revision 1 10 months ago

Woodpecker pipeline #884 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
did:key:z6Mki4CG...o5Zr commented on revision 1 10 months ago

Woodpecker pipeline #884 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
did:key:z6Mki4CG...o5Zr commented on revision 1 10 months ago

Woodpecker pipeline #884 completed with status: success. ✅

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
rudolfs pushed revision 2 149ef354 on base 299adcac +352 -14 10 months ago

Rebase

did:key:z6Mki4CG...o5Zr commented on revision 2 10 months ago

Woodpecker pipeline #900 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
did:key:z6Mki4CG...o5Zr commented on revision 2 10 months ago

Woodpecker pipeline #900 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
did:key:z6Mki4CG...o5Zr commented on revision 2 10 months ago

Woodpecker pipeline #900 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
did:key:z6Mki4CG...o5Zr commented on revision 2 10 months ago

Woodpecker pipeline #900 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
did:key:z6Mki4CG...o5Zr commented on revision 2 10 months ago

Woodpecker pipeline #900 current status: created. ⏳

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
did:key:z6Mki4CG...o5Zr commented on revision 2 10 months ago

Woodpecker pipeline #900 completed with status: success. ✅

  • Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
rudolfs reviewed · 1 comment 10 months ago

How about a couple tweaks like this?

diff --git a/src/views/repo/Issues.svelte b/src/views/repo/Issues.svelte
index 25e0f88..984e9cb 100644
--- a/src/views/repo/Issues.svelte
+++ b/src/views/repo/Issues.svelte
@@ -152,21 +152,29 @@
           stylePadding="0.25rem 0.5rem"
           styleGap="1rem"
           variant="outline">
-          <div class="txt-overflow txt-small">
-            We detected a problem with your COB cache, as a result not all your
-            issues are displayed.
+          <div class="txt-overflow txt-small global-flex">
+            <Icon name="warning" />
+            <span class="txt-overflow">
+              There’s a problem with your COB cache, so some issues may not be
+              displayed. You can rebuild the cache to resolve this.
+            </span>
+          </div>
+          <div style:margin-left="auto">
+            <Button
+              variant="ghost"
+              onclick={rebuildIssueCache}
+              disabled={cacheState !== undefined}>
+              {#if cacheState?.event === "started" || cacheState?.event === "progress"}
+                Rebuilding
+                <Spinner />
+              {:else if cacheState?.event === "finished"}
+                Done
+                <Icon name="checkmark" />
+              {:else}
+                Rebuild cache
+              {/if}
+            </Button>
           </div>
-          <Button variant="ghost" onclick={rebuildIssueCache}>
-            {#if cacheState?.event === "started" || cacheState?.event === "progress"}
-              Rebuilding cache
-              <Spinner />
-            {:else if cacheState?.event === "finished"}
-              Cache successfully rebuilt
-              <Icon name="checkmark" />
-            {:else}
-              Rebuild chache
-            {/if}
-          </Button>
         </Border>
       </div>
     {/if}
diff --git a/src/views/repo/Patches.svelte b/src/views/repo/Patches.svelte
index ca9545e..1849259 100644
--- a/src/views/repo/Patches.svelte
+++ b/src/views/repo/Patches.svelte
@@ -216,21 +216,29 @@
           stylePadding="0.25rem 0.5rem"
           styleGap="1rem"
           variant="outline">
-          <div class="txt-overflow txt-small">
-            We detected a problem with your COB cache, as a result not all your
-            patches are displayed.
+          <div class="txt-overflow txt-small global-flex">
+            <Icon name="warning" />
+            <span class="txt-overflow">
+              There’s a problem with your COB cache, so some patches may not be
+              displayed. You can rebuild the cache to resolve this.
+            </span>
+          </div>
+          <div style:margin-left="auto">
+            <Button
+              variant="ghost"
+              onclick={rebuildPatchCache}
+              disabled={cacheState !== undefined}>
+              {#if cacheState?.event === "started" || cacheState?.event === "progress"}
+                Rebuilding
+                <Spinner />
+              {:else if cacheState?.event === "finished"}
+                Done
+                <Icon name="checkmark" />
+              {:else}
+                Rebuild cache
+              {/if}
+            </Button>
           </div>
-          <Button variant="ghost" onclick={rebuildPatchCache}>
-            {#if cacheState?.event === "started" || cacheState?.event === "progress"}
-              Rebuilding cache
-              <Spinner />
-            {:else if cacheState?.event === "finished"}
-              Cache successfully rebuilt
-              <Icon name="checkmark" />
-            {:else}
-              Rebuild chache
-            {/if}
-          </Button>
         </Border>
       </div>
     {/if}

did:key:z6MkkfM3...sVz5 pushed revision 3 e1566bdd on base 299adcac +368 -14 10 months ago

Rebase and apply tweaks by rudolfs

rudolfs accepted 10 months ago
rudolfs pushed revision 4 935e58de on base a6ea607c +368 -14 10 months ago

Rebase

rudolfs merged revision 935e58de at 499a0983 10 months ago