Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.88"
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo generate-lockfile
- run: cargo check --features async,serde
- run: cargo check -p superlighttui --features async,serde
- run: cargo clippy -p superlighttui --all-features -- -D warnings

test:
name: Test
Expand Down Expand Up @@ -109,15 +111,24 @@ jobs:
- run: cargo check -p superlighttui --no-default-features

check-wasm:
name: Check (WASM)
name: Check (WASM backend)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- run: cargo check -p slt-wasm --target wasm32-unknown-unknown
- uses: taiki-e/install-action@wasm-pack
- uses: browser-actions/setup-chrome@v1
- uses: nanasess/setup-chromedriver@v2
- run: cargo check -p slt-wasm --all-features --target wasm32-unknown-unknown
- run: cargo clippy -p slt-wasm --all-features --target wasm32-unknown-unknown -- -D warnings
- run: cargo test -p slt-wasm --all-features
- run: chrome --version || google-chrome --version
- run: chromedriver --version
- run: CHROMEDRIVER="$(command -v chromedriver)" wasm-pack test --headless --chrome crates/slt-wasm

feature-check:
name: Feature Combinations
Expand Down
188 changes: 167 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,211 @@ env:
CARGO_TERM_COLOR: always

jobs:
ci-stable:
name: CI Gate (stable)
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
components: rustfmt
- run: cargo fmt -- --check

check-stable:
name: Check (stable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-features
# See ci.yml — perf-alloc tests use a global counter, so CI's higher
# parallelism contaminates measurements. Single-threaded keeps the
# budget asserts honest.
- run: cargo test --all-features -- --test-threads=1

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features -- -D warnings
- run: cargo fmt -- --check

ci-msrv:
name: CI Gate (MSRV 1.88)
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-features

examples:
name: Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --examples --all-features

msrv:
name: Check (MSRV 1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.88"
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo generate-lockfile
- run: cargo check --features async,serde
- run: cargo check -p superlighttui --features async,serde
- run: cargo clippy -p superlighttui --all-features -- -D warnings

typos:
name: Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master

check-no-default:
name: Check (no-default-features)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check -p superlighttui --no-default-features

wasm-backend:
name: Check (WASM backend)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@wasm-pack
- uses: browser-actions/setup-chrome@v1
- uses: nanasess/setup-chromedriver@v2
- run: cargo check -p slt-wasm --all-features --target wasm32-unknown-unknown
- run: cargo clippy -p slt-wasm --all-features --target wasm32-unknown-unknown -- -D warnings
- run: cargo test -p slt-wasm --all-features
- run: chrome --version || google-chrome --version
- run: chromedriver --version
- run: CHROMEDRIVER="$(command -v chromedriver)" wasm-pack test --headless --chrome crates/slt-wasm

feature-check:
name: Feature Combinations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- name: Check each feature independently
run: cargo hack check -p superlighttui --each-feature --no-dev-deps

audit:
name: Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/audit@v1

deny:
name: Deny Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check

verify-version:
name: Verify Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check tag matches Cargo.toml
- name: Check tag matches package versions
run: |
set -euo pipefail
TAG="${GITHUB_REF#refs/tags/v}"
CARGO_VER=$(grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
if [ "$TAG" != "$CARGO_VER" ]; then
echo "::error::Tag v$TAG does not match Cargo.toml version $CARGO_VER"
ROOT_VER=$(awk -F'"' '/^version =/ { print $2; exit }' Cargo.toml)
WASM_VER=$(awk -F'"' '/^version =/ { print $2; exit }' crates/slt-wasm/Cargo.toml)
WASM_DEP=$(sed -n 's/.*superlighttui = { version = "\([^"]*\)".*/\1/p' crates/slt-wasm/Cargo.toml)

if [ "$TAG" != "$ROOT_VER" ]; then
echo "::error::Tag v$TAG does not match Cargo.toml version $ROOT_VER"
exit 1
fi
echo "Version verified: $CARGO_VER"
if [ "$TAG" != "$WASM_VER" ]; then
echo "::error::Tag v$TAG does not match slt-wasm version $WASM_VER"
exit 1
fi
if [ "$TAG" != "$WASM_DEP" ]; then
echo "::error::Tag v$TAG does not match slt-wasm dependency $WASM_DEP"
exit 1
fi
echo "Version verified: $TAG"

publish-superlighttui:
name: Publish superlighttui
needs:
- fmt
- check-stable
- clippy
- test
- examples
- msrv
- typos
- check-no-default
- wasm-backend
- feature-check
- audit
- deny
- verify-version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo publish -p superlighttui
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

publish:
name: Publish to crates.io
needs: [ci-stable, ci-msrv, verify-version]
publish-slt-wasm:
name: Publish slt-wasm
needs: [publish-superlighttui]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo publish --allow-dirty
- name: Wait for superlighttui on crates.io
run: |
set -euo pipefail
VERSION="${GITHUB_REF#refs/tags/v}"
for attempt in {1..30}; do
if cargo search superlighttui --limit 1 | grep -q "superlighttui = \"$VERSION\""; then
echo "superlighttui $VERSION is visible in the crates.io index"
exit 0
fi
echo "Waiting for superlighttui $VERSION in crates.io index (attempt $attempt/30)"
sleep 10
done
echo "::error::superlighttui $VERSION did not appear in crates.io index"
exit 1
- run: cargo publish -p slt-wasm
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

github-release:
name: GitHub Release
needs: [ci-stable, ci-msrv, verify-version]
needs: [publish-slt-wasm]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
# Changelog

## [0.22.2] - 2026-06-28

Patch release preparation focused on terminal safety, browser backend lifecycle,
state cleanup, API consistency, release gates, and documentation parity.

### Changed

- **Color API f64 replacements** (#286) — added `*_f64` public replacements for
color math, theme overlays, text gradient stops, and `AppState::fps_f64`.
Existing `f32` methods remain as deprecated compatibility aliases.
- **Release workflow hardening** (#292) — tag releases now run the full blocking
gate before publishing, including examples, no-default-features, WASM,
feature-combination, typos, audit, and deny checks.
- **Ordered crate publishing** (#292) — `release.yml` publishes
`superlighttui` first, waits for the crates.io index to expose the tag
version, then publishes `slt-wasm` against that exact dependency version.
- **Workspace gate coverage** (#293) — `slt-wasm` is now part of the default
workspace members, CI runs WASM clippy/tests, and a `wasm-pack` browser smoke
verifies DOM mount/flush/dispose behavior.
- **WASM feature wiring** (#293) — `slt-wasm` now exposes a default `bidi`
feature that forwards to `superlighttui/bidi`, keeping browser text behavior
aligned with the native default build.

### Fixed

- **Explicit color depth is authoritative** (#284) — terminal foreground and
background SGR are emitted by SLT directly, so `NO_COLOR` affects only
`ColorDepth::detect()` and no longer overrides explicit `TrueColor` output.
- **Hermetic terminal tests** (#285) — terminal capability probes are TTY-guarded
and suspend/resume tests use in-process writers instead of touching real
stdout.
- **WASM runtime lifecycle** (#287) — browser event listeners and animation
frames are owned by `WasmAppHandle`, with `dispose()`/`Drop` cleanup.
- **Async task cleanup** (#288, #297) — background task registries and async
validators now abort superseded or dropped tasks, and async run loops exit
when the input channel disconnects.
- **Terminal graphics gating** (#289, #301) — Kitty, Sixel, and iTerm probing and
emission now respect TTY and tmux/screen guards unless explicitly forced.
- **Terminal teardown safety** (#290, #296) — panic, normal exit, and Unix
suspend/resume share the same cleanup path, including focus and Kitty keyboard
state.
- **Escape sanitization** (#291, #300) — terminal titles and static scrollback
output sanitize control bytes before emitting OSC/static text.
- **Overflow hardening** (#295) — rect edges and timer scheduling use saturating
or elapsed-time arithmetic instead of overflowing additions.
- **Dynamic state cleanup APIs** (#302) — keyed state, inactive screen focus
state, and inactive modes can now be removed or retained by callers.
- **Variable-height list cache cleanup** (#303) — `ListState::set_items` truncates
stale item heights when the item list shrinks.
- **WASM parity fixes** (#298) — DOM mouse/wheel modifiers map into SLT
modifiers, and underline plus strikethrough CSS is emitted together.
- **MSRV clippy cleanliness** (#299) — modernized format arguments that were
reported by `cargo +1.88 clippy --all-features -- -D warnings`.
- **Release version coordination** (#292) — bumped both published crates to
`0.22.2` and updated the `slt-wasm -> superlighttui` dependency requirement.

### Docs

- **README install snippet** (#294) — updated the copy-paste dependency version
from `0.21` to `0.22.2`.
- **Examples guide parity** (#294) — `docs/EXAMPLES.md` now lists only explicit
`[[example]]` targets as `cargo run --example ...` commands and routes
source-only demos through their tour binaries.

## [0.22.1] - 2026-06-22

Patch release closing two community issues (#278, #279). Additive only — no
Expand Down
Loading
Loading