feat: Phase 1 — extract the client (web SPA + desktop) to dtoro/oikos-web
Some checks failed
ci / build-test (push) Has been cancelled
ci / docker-build (push) Has been cancelled

Problem: the hexagonal refactor churns the backend tree for nine more
phases; the UI delivery stack (web/ SPA, cmd/desktop Wails wrapper,
compose/web image) must move to its own repo first so doc/layout
rewrites land once on a backend-only tree.

Change:
- New repo git.hubris.network/dtoro/oikos-web (v0.33.0): web/, desktop/
  (updateURL repointed to oikos-web releases), compose/, own CI (web +
  desktop jobs), own deploy script (CI-green gate, TOCTOU guard,
  version-tagged images, prune-to-3), own webhook receiver on :9798 +
  launchd unit, own compose project publishing the same 8091:80.
- Cutover executed on mac-mini in order: oikos stack's web service
  stopped+removed, oikos-web project brought up on 8091; outer Caddy
  untouched (targets the published port) — serving + Authentik flow +
  /wails 404 quirk verified post-cutover.
- Stripped from oikos: web/, cmd/desktop/, compose/web/, desktop CI
  workflow, ci.yml web job, Makefile ui/desktop/desktop-package/install
  targets, the compose web service, oikos-web from deploy.sh's fallback
  prune list; wails + go-keyring dropped from go.mod, vendor synced.
- README / CONTRIBUTING / AGENTS.md / .agents dev+operations docs now
  point at the new repo; mbse + mascot design docs carry a path note.

Risk: production SPA serving depends on the new pipeline now; rollback
is versioned-image re-up of the old web service from a pre-split
checkout (port 8091). Desktop builds installed before the split still
check dtoro/oikos releases — one manual reinstall, noted in the
oikos-web release notes.

Verification: go vet, make test (race), make generate-check, golangci
(no new findings; baseline down 400→365); post-cutover curls —
localhost:8091 200, /wails/runtime.js 404, outer Caddy 302 Authentik.
This commit is contained in:
2026-08-15 22:27:52 +02:00
parent e074f04bdf
commit d4d99a7473
18854 changed files with 2615729 additions and 173735 deletions

View File

@@ -0,0 +1,41 @@
<script lang="ts">
import { boxWith, mergeProps } from "svelte-toolbelt";
import type { ComboboxInputProps } from "../types.js";
import { useId } from "../../../internal/use-id.js";
import { FloatingLayer } from "../../utilities/floating-layer/index.js";
import { SelectInputState } from "../../select/select.svelte.js";
let {
id = useId(),
ref = $bindable(null),
child,
defaultValue,
clearOnDeselect = false,
...restProps
}: ComboboxInputProps = $props();
const inputState = SelectInputState.create({
id: boxWith(() => id),
ref: boxWith(
() => ref,
(v) => (ref = v)
),
clearOnDeselect: boxWith(() => clearOnDeselect),
});
if (defaultValue) {
inputState.root.opts.inputValue.current = defaultValue;
}
const mergedProps = $derived(
mergeProps(restProps, inputState.props, { value: inputState.root.opts.inputValue.current })
);
</script>
<FloatingLayer.Anchor {id} ref={inputState.opts.ref}>
{#if child}
{@render child({ props: mergedProps })}
{:else}
<input {...mergedProps} />
{/if}
</FloatingLayer.Anchor>

View File

@@ -0,0 +1,4 @@
import type { ComboboxInputProps } from "../types.js";
declare const ComboboxInput: import("svelte").Component<ComboboxInputProps, {}, "ref">;
type ComboboxInput = ReturnType<typeof ComboboxInput>;
export default ComboboxInput;

View File

@@ -0,0 +1,33 @@
<script lang="ts">
import { boxWith, mergeProps } from "svelte-toolbelt";
import type { ComboboxTriggerProps } from "../types.js";
import { useId } from "../../../internal/use-id.js";
import { SelectComboTriggerState } from "../../select/select.svelte.js";
let {
id = useId(),
ref = $bindable(null),
child,
children,
type = "button",
...restProps
}: ComboboxTriggerProps = $props();
const triggerState = SelectComboTriggerState.create({
id: boxWith(() => id),
ref: boxWith(
() => ref,
(v) => (ref = v)
),
});
const mergedProps = $derived(mergeProps(restProps, triggerState.props, { type }));
</script>
{#if child}
{@render child({ props: mergedProps })}
{:else}
<button {...mergedProps}>
{@render children?.()}
</button>
{/if}

View File

@@ -0,0 +1,4 @@
import type { ComboboxTriggerProps } from "../types.js";
declare const ComboboxTrigger: import("svelte").Component<ComboboxTriggerProps, {}, "ref">;
type ComboboxTrigger = ReturnType<typeof ComboboxTrigger>;
export default ComboboxTrigger;

View File

@@ -0,0 +1,86 @@
<script lang="ts">
import { type WritableBox, boxWith } from "svelte-toolbelt";
import type { ComboboxRootProps } from "../types.js";
import { noop } from "../../../internal/noop.js";
import FloatingLayer from "../../utilities/floating-layer/components/floating-layer.svelte";
import { SelectRootState } from "../../select/select.svelte.js";
import ListboxHiddenInput from "../../select/components/select-hidden-input.svelte";
import { watch } from "runed";
let {
value = $bindable(),
onValueChange = noop,
name = "",
disabled = false,
type,
open = $bindable(false),
onOpenChange = noop,
onOpenChangeComplete = noop,
loop = false,
scrollAlignment = "nearest",
required = false,
items = [],
allowDeselect = true,
inputValue = "",
children,
}: ComboboxRootProps = $props();
if (value === undefined) {
const defaultValue = type === "single" ? "" : [];
value = defaultValue;
}
watch.pre(
() => value,
() => {
if (value !== undefined) return;
value = type === "single" ? "" : [];
}
);
const rootState = SelectRootState.create({
type,
value: boxWith(
() => value!,
(v) => {
value = v;
// @ts-expect-error - we know
onValueChange(v);
}
) as WritableBox<string> | WritableBox<string[]>,
disabled: boxWith(() => disabled),
required: boxWith(() => required),
open: boxWith(
() => open,
(v) => {
open = v;
onOpenChange(v);
}
),
loop: boxWith(() => loop),
scrollAlignment: boxWith(() => scrollAlignment),
name: boxWith(() => name),
isCombobox: true,
items: boxWith(() => items),
allowDeselect: boxWith(() => allowDeselect),
inputValue: boxWith(
() => inputValue,
(v) => (inputValue = v)
),
onOpenChangeComplete: boxWith(() => onOpenChangeComplete),
});
</script>
<FloatingLayer>
{@render children?.()}
</FloatingLayer>
{#if Array.isArray(rootState.opts.value.current)}
{#if rootState.opts.value.current.length}
{#each rootState.opts.value.current as item (item)}
<ListboxHiddenInput value={item} />
{/each}
{/if}
{:else}
<ListboxHiddenInput bind:value={rootState.opts.value.current as string} />
{/if}

View File

@@ -0,0 +1,3 @@
declare const Combobox: import("svelte").Component<import("../types.js").ComboboxRootPropsWithoutHTML, {}, "value" | "open">;
type Combobox = ReturnType<typeof Combobox>;
export default Combobox;