Skip to content

Fix root layout locale initialization warning#11

Merged
unnamedlab merged 4 commits into
mainfrom
copilot/create-orders-pipeline-and-import-data
Apr 29, 2026
Merged

Fix root layout locale initialization warning#11
unnamedlab merged 4 commits into
mainfrom
copilot/create-orders-pipeline-and-import-data

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 29, 2026

The root +layout.svelte was triggering a Svelte build warning because locale initialization captured a reactive value outside a closure. This updates the layout bootstrap path to keep locale setup reactive without changing the auth/locale restore flow.

  • Root layout bootstrap

    • Replaces direct initialization from a captured prop with a derived locale consumed inside a reactive effect.
    • Keeps restoreLocale(...) and auth.restore() in the mount path, but reads from the same derived source.
  • Related cleanup

    • Renames the top-bar create-menu boolean derived value to reflect that it is a predicate, not a collection.
    • Makes dataset search null-safe when description is absent.
let { children, data } = $props();
const initialLocale = $derived(data.initialLocale);

$effect(() => {
  initializeLocale(initialLocale);
});

onMount(() => {
  restoreLocale(initialLocale);
  auth.restore();
});

Copilot AI and others added 4 commits April 29, 2026 10:22
Agent-Logs-Url: https://github.com/unnamedlab/OpenFoundry/sessions/91406a4c-cf7c-4516-9ed4-61a84b4c8eb0

Co-authored-by: unnamedlab <272794385+unnamedlab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/unnamedlab/OpenFoundry/sessions/64b5de12-e1be-4a31-a59f-0b523bd5d133

Co-authored-by: unnamedlab <272794385+unnamedlab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/unnamedlab/OpenFoundry/sessions/64b5de12-e1be-4a31-a59f-0b523bd5d133

Co-authored-by: unnamedlab <272794385+unnamedlab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/unnamedlab/OpenFoundry/sessions/64b5de12-e1be-4a31-a59f-0b523bd5d133

Co-authored-by: unnamedlab <272794385+unnamedlab@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants