v0.20.1 β col_gap deprecation + perf-alloc isolation + doc patch#245
Merged
Conversation
β¦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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context::col_gap/Context::row_gapcollide withContainerBuilder::col_gap/row_gap(Tailwindgap-x/gap-yaxis convention, opposite semantics). Migrate toui.container().gap(n).col(f)/.row(f)β same output, no collision. 25 demo + integration files migrated in the same commit.tests/v020_perf_alloc.rsparallel-runner contamination. Every#[test]now grabs the file-wide mutex viaenter_perf_test();measure_allocsswitches totry_lock. The--test-threads=1workaround in.github/workflows/ci.ymlis removed in the same commit β no environment carve-outs remain.# Exampleblocks added to the status family (badge,badge_colored,key_hint,stat,stat_colored,stat_trend,empty_state,empty_state_action) plusvsplit_pane.SKILL.mdgets Rule 6 (return-type pattern:&mut SelfvsResponse) and a function-vs-impl Widgetdecision guide.slt/slt-migrationskill packs synced from v0.19.2 β v0.20.Buffer::recompute_line_hashes/row_clean/row_hashcfg-gated oncrossterm | testto cleardead_codeunder--no-default-features.cargo update -p rand0.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 atdocs/EXAMPLES.md.Test plan
Pre-CI Core + Extended Gate, default parallel runner, no workarounds:
cargo fmt --checkcargo check --all-featurescargo check -p superlighttui --no-default-features(dead_code regression cleared)cargo clippy --all-features -- -D warningscargo test --all-featuresβ 141 passed; 0 failed (was 2 failed pre-fix)cargo check --examples --all-featurestyposcargo check -p slt-wasm --target wasm32-unknown-unknowncargo hack check -p superlighttui --each-feature --no-dev-depscargo auditβ 0 warnings after rand 0.9.4cargo deny checkNo public runtime behavior changes β deprecated paths still call into the same
push_containercode, so existing apps keep building with a deprecation warning until the planned v0.21+ removal.π€ Generated with Claude Code