diff --git a/.beans/LAB-4pnt--ship-to-wispplace-at-labelsbyjpme.md b/.beans/LAB-4pnt--ship-to-wispplace-at-labelsbyjpme.md new file mode 100644 index 0000000..dc6bf6a --- /dev/null +++ b/.beans/LAB-4pnt--ship-to-wispplace-at-labelsbyjpme.md @@ -0,0 +1,16 @@ +--- +# LAB-4pnt +title: Ship to Wisp.Place at labels.byjp.me +status: in-progress +type: task +priority: high +created_at: 2026-08-06T06:39:21Z +updated_at: 2026-08-06T06:43:18Z +parent: LAB-29e7 +--- + +Tangled CI: verify on every push and pull request, and deploy the static build to Wisp.Place on main. + +- [x] Check workflow (tests, typecheck, build) for pushes and pull requests +- [x] Deploy workflow publishing `build/` to Wisp +- [ ] Confirm the WISP_APP_PASSWORD secret is set in Tangled repo settings (JP — needs the Tangled UI) diff --git a/.tangled/workflows/check.yaml b/.tangled/workflows/check.yaml new file mode 100644 index 0000000..5707a85 --- /dev/null +++ b/.tangled/workflows/check.yaml @@ -0,0 +1,38 @@ +# Verifies the app on pull requests. +# +# Pushes are deliberately not a trigger. deploy.yaml runs these same three +# commands before it publishes, so main is already covered; and `branch` matches +# globs but has no negation, so there is no way to say "every push except main" +# without duplicating that run in parallel. + +when: + - event: ['pull_request'] + - event: ['manual'] + +engine: 'nixery' + +clone: + skip: false + depth: 1 + +dependencies: + nixpkgs: + - coreutils + - nodejs_24 + +steps: + # `ci` rather than `install`, so the lockfile is authoritative and a drifting + # transitive dependency fails here rather than quietly changing what ships. + # This also runs the `prepare` script, which is what generates .svelte-kit for + # the two steps below. + - name: Install dependencies + command: npm ci + + - name: Unit tests + command: npm test + + - name: Typecheck + command: npm run check + + - name: Build + command: npm run build diff --git a/.tangled/workflows/deploy.yaml b/.tangled/workflows/deploy.yaml new file mode 100644 index 0000000..06089b7 --- /dev/null +++ b/.tangled/workflows/deploy.yaml @@ -0,0 +1,99 @@ +# Builds the app and publishes it to Wisp, which serves it at labels.byjp.me. +# +# One file rather than a build workflow feeding a deploy one: Tangled runs +# workflow *files* in parallel with no way to pass artifacts between them, and +# the upload needs the build output. Steps within a file are serial, which also +# makes the tests a real gate on shipping rather than something running +# alongside it. + +when: + - event: ['push'] + branch: ['main'] + - event: ['manual'] + +engine: 'nixery' + +clone: + skip: false + depth: 1 + +dependencies: + nixpkgs: + - coreutils + - nodejs_24 + # For retrieving wisp-cli. + - curl + # Not for anything built here — it is what wisp-cli needs to run at all. + # See the upload step. + - glibc + +environment: + # adapter-static writes here; see vite.config.ts. + SITE_PATH: ./build + # Named for the domain pointed at it, matching the other sites on this handle. + # The domain mapping itself lives in Wisp, not in this repo. + SITE_NAME: labels.byjp.me + WISP_HANDLE: byjp.me + +steps: + # `ci` rather than `install`, so the lockfile is authoritative. NODE_ENV is + # left unset on purpose: at `production` npm would skip devDependencies, and + # svelte, vite and the adapter all live there — the build needs them. + - name: Install dependencies + command: npm ci + + - name: Unit tests + command: npm test + + - name: Typecheck + command: npm run check + + - name: Build + command: npm run build + + - name: Download wisp + command: | + curl https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries/wisp-cli-x86_64-linux -o wisp-cli + chmod +x wisp-cli + + - name: Upload site + command: | + set -euo pipefail + + # wisp-cli is an ordinary dynamically-linked ELF and asks for + # /lib64/ld-linux-x86-64.so.2, a path no nix image has — which is why + # running it otherwise fails with "cannot execute: required file not + # found". That message is about the loader, not about the binary, which + # downloads and chmod's perfectly well. + # + # The loader has to be put where the binary looks for it rather than + # invoked with the binary as an argument. wisp-cli is built with + # `bun build --compile`, and such a binary finds its own embedded payload + # through /proc/self/exe: run it as `ld-linux ./wisp-cli` and that path + # names ld-linux instead, so it finds no payload and quietly falls back to + # behaving like the bun CLI — which surfaces as bun's own + # `File not found "byjp.me"`. + # + # Everything the binary asks for — libc, libm, libpthread, libdl — is in + # that same glibc, which the loader searches by default. + for candidate in /nix/store/*-glibc-*/lib/ld-linux-x86-64.so.2; do + loader="$candidate" + break + done + [ -n "${loader:-}" ] && [ -x "$loader" ] || { + echo "no glibc loader in the image store; is glibc still a dependency?" >&2 + exit 1 + } + mkdir -p /lib64 + ln -sfn "$loader" /lib64/ld-linux-x86-64.so.2 + + # `deploy` explicitly, rather than relying on it still being the default + # for a bare handle, and --yes because there is no terminal here to answer + # a confirmation prompt on. WISP_APP_PASSWORD is an atproto app password, + # set as a Tangled repo secret — not here, where it would be public. + ./wisp-cli deploy \ + "$WISP_HANDLE" \ + --path "$SITE_PATH" \ + --site "$SITE_NAME" \ + --password "$WISP_APP_PASSWORD" \ + --yes diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index bf51687..06d1619 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -354,6 +354,12 @@ {/if}
++ Choose 100% scale when printing. “Fit to page” shrinks + the sheet slightly and the labels will not line up. +