Describe the bug
This completely breaks my page. It used to work in 2.59.1. I found this happen in 2 routes, could be more. In the first route (this reproduction), I can work around the issue. However, in the second route it happens randomly after several consecutive form submissions and I haven't been able to reproduce it yet.
Increasing the requested limit from 1 to 2 seems to fix it but I don't consider this a proper workaround.
Reproduction
const items = [
{ id: 1, status: 'foo', name: 'item 1' },
{ id: 2, status: 'bar', name: 'item 2' },
{ id: 3, status: 'foo', name: 'item 3' },
{ id: 4, status: 'bar', name: 'item 4' },
];
export const getStatusList = query(() => {
return [
{ id: 1, name: 'foo', count: 2 },
{ id: 2, name: 'bar', count: 2 },
];
});
export const getItemList = query(z.string(), (status) => {
return items.filter((i) => i.status === status);
});
export const cmd_refresh = command(async () => {
console.log('refreshing');
await requested(getStatusList, 1).refreshAll();
await requested(getItemList, 1).refreshAll();
});
<script lang="ts">
import { page } from '$app/state';
import { cmd_refresh, getItemList, getStatusList } from './test.remote';
const selectedStatus = $derived(page.url.searchParams.get('status') ?? 'foo');
const statusList = $derived(await getStatusList());
const itemList = $derived(await getItemList(selectedStatus));
</script>
Reproduction steps:
<ol>
<li>Click "bar"</li>
<li>Click "foo" twice</li>
</ol>
<h2>Status select</h2>
<ol>
{#each statusList as status (status.id)}
<li>
<a
href="/?status={status.name}"
onclick={() => {
if (selectedStatus === status.name) {
//this is fine
//getStatusList().refresh();
//getItemList(selectedStatus).refresh();
//this is not
cmd_refresh().updates(getStatusList, getItemList);
}
}}
>
{status.name}
</a>
</li>
{/each}
</ol>
<h2>Item list</h2>
<ul>
{#each itemList as item (item.id)}
<li>{item.name}</li>
{/each}
</ul>
https://stackblitz.com/edit/sveltejs-kit-template-default-h5wvuaby?file=src%2Froutes%2F%2Bpage.svelte,src%2Froutes%2Ftest.remote.ts
Logs
System Info
Severity
serious, but I can work around it
Additional Information
No response
Describe the bug
This completely breaks my page. It used to work in 2.59.1. I found this happen in 2 routes, could be more. In the first route (this reproduction), I can work around the issue. However, in the second route it happens randomly after several consecutive form submissions and I haven't been able to reproduce it yet.
Increasing the
requestedlimit from 1 to 2 seems to fix it but I don't consider this a proper workaround.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-h5wvuaby?file=src%2Froutes%2F%2Bpage.svelte,src%2Froutes%2Ftest.remote.ts
Logs
System Info
Severity
serious, but I can work around it
Additional Information
No response