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
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
Woodpecker pipeline #884 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
Woodpecker pipeline #884 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
Woodpecker pipeline #884 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
Woodpecker pipeline #884 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
Woodpecker pipeline #884 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
Woodpecker pipeline #884 completed with status: success. ✅
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/471
Rebase
Woodpecker pipeline #900 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
Woodpecker pipeline #900 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
Woodpecker pipeline #900 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
Woodpecker pipeline #900 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
Woodpecker pipeline #900 current status: created. ⏳
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
Woodpecker pipeline #900 completed with status: success. ✅
- Details: https://woodpecker.radworks.garden/repos/6/pipeline/487
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}
Rebase and apply tweaks by rudolfs
Rebase