Skip to content

v0.20.1 β€” col_gap deprecation + perf-alloc isolation + doc patch#245

Merged
subinium merged 1 commit into
mainfrom
release/v0.20.1
Apr 29, 2026
Merged

v0.20.1 β€” col_gap deprecation + perf-alloc isolation + doc patch#245
subinium merged 1 commit into
mainfrom
release/v0.20.1

Conversation

@subinium

Copy link
Copy Markdown
Owner

Summary

  • Deprecation: Context::col_gap / Context::row_gap collide with ContainerBuilder::col_gap / row_gap (Tailwind gap-x / gap-y axis convention, opposite semantics). Migrate to ui.container().gap(n).col(f) / .row(f) β€” same output, no collision. 25 demo + integration files migrated in the same commit.
  • Root-cause fix: tests/v020_perf_alloc.rs parallel-runner contamination. Every #[test] now grabs the file-wide mutex via enter_perf_test(); measure_allocs switches to try_lock. The --test-threads=1 workaround in .github/workflows/ci.yml is removed in the same commit β€” no environment carve-outs remain.
  • Doc audit (v0.20.0 patch-safe): # Example blocks added to the status family (badge, badge_colored, key_hint, stat, stat_colored, stat_trend, empty_state, empty_state_action) plus vsplit_pane. SKILL.md gets Rule 6 (return-type pattern: &mut Self vs Response) and a function-vs-impl Widget decision guide. slt / slt-migration skill packs synced from v0.19.2 β†’ v0.20.
  • Cleanup: Buffer::recompute_line_hashes / row_clean / row_hash cfg-gated on crossterm | test to clear dead_code under --no-default-features. cargo update -p rand 0.9.2 β†’ 0.9.4 clears RUSTSEC-2026-0097 (unsound transitive dep via proptest dev-dep). README's version-specific "v0.20 Demo Catalog" replaced with a timeless launcher section pointing at docs/EXAMPLES.md.

Test plan

Pre-CI Core + Extended Gate, default parallel runner, no workarounds:

  • cargo fmt --check
  • cargo check --all-features
  • cargo check -p superlighttui --no-default-features (dead_code regression cleared)
  • cargo clippy --all-features -- -D warnings
  • cargo test --all-features β€” 141 passed; 0 failed (was 2 failed pre-fix)
  • cargo check --examples --all-features
  • typos
  • cargo check -p slt-wasm --target wasm32-unknown-unknown
  • cargo hack check -p superlighttui --each-feature --no-dev-deps
  • cargo audit β€” 0 warnings after rand 0.9.4
  • cargo deny check

No public runtime behavior changes β€” deprecated paths still call into the same push_container code, so existing apps keep building with a deprecation warning until the planned v0.21+ removal.

πŸ€– Generated with Claude Code

…oc gaps + skill v0.20 sync

Documentation + deprecation + flaky-harness root-cause fix patch. Lands the
audit items the v0.20.0 CHANGELOG flagged as "patch-safe doc-only gaps", an
API discoverability fix for the `col_gap` / `row_gap` name collision, a
skill-pack refresh covering the v0.20 surface, and a source-level fix for
the parallel-test contamination that previously needed a `--test-threads=1`
CI workaround.

Highlights:

* Deprecate `Context::col_gap` / `Context::row_gap`. The two-arg form
  collides with `ContainerBuilder::col_gap` / `row_gap`, which set the
  row-finalize / column-finalize main-axis gap (Tailwind `gap-x` / `gap-y`
  axis convention) and so mean the opposite thing. Migrate to
  `ui.container().gap(n).col(f)` / `.row(f)` β€” same output, no collision.
* 25 demo + integration files (22 examples + 3 tests) migrated off the
  deprecated form so AI training data and downstream copy-paste land on
  the unambiguous shape from the start.
* `tests/v020_perf_alloc.rs` cross-test contamination root-caused. The
  pre-fix `measure_lock` mutex protected only the measurement critical
  section, so non-measuring sibling tests still ran in parallel and
  leaked alloc into the global counter. Fix: every `#[test]` now grabs
  the file-wide mutex via `enter_perf_test()` on its first line, and
  `measure_allocs` switches to `try_lock`. The `--test-threads=1`
  workaround in `.github/workflows/ci.yml` is removed in the same commit.
* `Buffer::recompute_line_hashes` / `row_clean` / `row_hash` gated on
  `#[cfg(any(feature = "crossterm", test))]` so they no longer trip
  `dead_code` under `--no-default-features`. The methods exist solely
  for the `flush_buffer_diff` fast-path, which already lives behind
  `feature = "crossterm"`.
* Status-family rustdoc fill (`badge`, `badge_colored`, `key_hint`,
  `stat`, `stat_colored`, `stat_trend`, `empty_state`,
  `empty_state_action`) plus `vsplit_pane` example block. Closes the
  v0.20.0 patch-safe doc audit.
* SKILL.md additions: Rule 6 (return-type pattern: `&mut Self` vs
  `Response`) and Custom widget pattern decision guide (function form
  vs `impl Widget`).
* `slt` / `slt-migration` skill packs synced from v0.19.2 β†’ v0.20 with
  removed-API table, hook-ordering decision table, Korean triggers.
* README cleanup: dropped version-specific "v0.20 Demo Catalog" in
  favor of pointing at `docs/EXAMPLES.md`, generalized the launcher
  snippet so the top-level README stays timeless across minor releases.
* `cargo update -p rand` 0.9.2 β†’ 0.9.4 to clear RUSTSEC-2026-0097
  (unsound transitive dep via the proptest dev-dep).

No public runtime behavior changes β€” deprecated paths still call into the
same `push_container` code, so existing apps keep building with a
deprecation warning until v0.21+. The full Pre-CI Core + Extended Gate
runs clean with the default parallel test runner; no environment-specific
workarounds remain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@subinium subinium merged commit afcd197 into main Apr 29, 2026
16 checks passed
@subinium subinium deleted the release/v0.20.1 branch April 29, 2026 00:06
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.

1 participant