Wide-glyph damage expansion, screenshot dir in settings, install command on releases

- SafeBackend now tracks wide cells and explicitly overwrites the
  right half when a wide glyph is replaced by a narrow one — the case
  ratatui's diff cannot see (both buffers hold a space there) and the
  likely remaining source of ghost glyphs
- Settings dialog: new 'Skärmbilder' row edits screenshot_dir (saved
  to config.toml, applied immediately)
- Release workflow writes an install one-liner (arch-detecting curl)
  into the release body and updates it on every build
- Integration suite: 50/50

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 00:52:26 +02:00
parent 9d637a9378
commit 87ff0e1b77
5 changed files with 129 additions and 33 deletions

View File

@@ -51,12 +51,30 @@ jobs:
run: |
set -e
TAG="latest"
BODY="Rullande bygge från senaste master. Commit: ${{ github.sha }}. Arkitekturer: linux x64 + arm64 (Pi5)."
BASE="https://gitea.brasse-pc.eu/$REPO/releases/download/$TAG"
BODY=$(cat <<EOF
Rullande bygge från senaste master. Commit: ${{ github.sha }}. Arkitekturer: linux x64 + arm64 (Pi5).
## Installera / uppdatera
\`\`\`bash
mkdir -p ~/.local/bin && curl -fsSL "$BASE/tui-wm-linux-\$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/')" -o ~/.local/bin/tui-wm && chmod +x ~/.local/bin/tui-wm && ~/.local/bin/tui-wm --init
\`\`\`
Kör sedan \`tui-wm\` (se till att \`~/.local/bin\` finns i \$PATH).
\`--init\` skriver standardkonfiguration till ~/.config/tui-wm — hoppa över den vid uppdatering.
EOF
)
rid=$(curl -s -X POST "$API/repos/$REPO/releases" \
-H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\",\"body\":\"$BODY\"}" | jq -r '.id // empty')
[ -z "$rid" ] && rid=$(curl -s "$API/repos/$REPO/releases/tags/$TAG" \
-H "Authorization: token $TOKEN" | jq -r '.id')
-d "$(jq -n --arg tag "$TAG" --arg body "$BODY" '{tag_name:$tag,name:$tag,body:$body}')" | jq -r '.id // empty')
if [ -z "$rid" ]; then
rid=$(curl -s "$API/repos/$REPO/releases/tags/$TAG" \
-H "Authorization: token $TOKEN" | jq -r '.id')
curl -s -X PATCH "$API/repos/$REPO/releases/$rid" \
-H "Authorization: token $TOKEN" -H 'Content-Type: application/json' \
-d "$(jq -n --arg body "$BODY" '{body:$body}')" -o /dev/null
fi
echo "release id: $rid"
for f in tui-wm-linux-x64 tui-wm-linux-arm64 tui-wm-config.tar.gz checksums.txt; do
aid=$(curl -s "$API/repos/$REPO/releases/$rid/assets" \