diff --git a/SESSION_HANDOFF.md b/SESSION_HANDOFF.md index d3fb503..a1d9563 100644 --- a/SESSION_HANDOFF.md +++ b/SESSION_HANDOFF.md @@ -72,8 +72,8 @@ Also shipped (pre-Phase 8 but post-v0.22.0, already in CHANGELOG): hook confirmed `ClipboardManager.setPrimaryClip()` succeeds on Android 14. Hook reverted. Production path requires Interaction::Pressed + non-null `share_url`. Note: `adb shell input tap` doesn't deliver touch events on headless AVD (documented). -- **`cargo apk build --lib` noisy stderr** — post-sign panic doesn't affect the - APK but pollutes CI output. Document `--lib` as canonical or upstream a fix. +- [x] **`cargo apk build --lib` noisy stderr** — upstream cargo-apk bug; `--lib` + is the canonical command (CLAUDE.md §15.1, docs/ANDROID.md). No in-repo fix possible. ### 5. Feature completeness - [x] **Theme importer UI.** Done (`613bbf8`): "Scan for new themes" button in diff --git a/docs/ANDROID.md b/docs/ANDROID.md index 97e46d5..55ff451 100644 --- a/docs/ANDROID.md +++ b/docs/ANDROID.md @@ -143,16 +143,18 @@ After the APK is signed cargo-apk panics with: thread 'main' panicked: Bin is not compatible with Cdylib ``` -This happens AFTER the APK is on disk and signed. cargo-apk is -trying to also wrap the desktop `[[bin]]` target. The APK is still -valid. Work around with `--lib`: +This happens AFTER the APK is on disk and signed. cargo-apk tries to +also wrap the desktop `[[bin]]` target alongside the `[lib]`. The APK +is valid — the panic is cosmetic. **Always use `--lib`**, which is the +canonical build command (see `CLAUDE.md §15.1`): ```bash -cargo apk build -p solitaire_app --target x86_64-linux-android --lib +cargo apk build -p solitaire_app --lib ``` -(Permanent fix to come — likely a `[[bin]] required-features = ["desktop"]` -gate so cargo-apk skips the bin target on Android.) +Root cause: upstream cargo-apk bug — it does not skip `[[bin]]` targets +when building for Android. No in-repo fix is possible; `--lib` is the +accepted workaround. --- diff --git a/solitaire_engine/src/assets/mod.rs b/solitaire_engine/src/assets/mod.rs index e016757..dad1634 100644 --- a/solitaire_engine/src/assets/mod.rs +++ b/solitaire_engine/src/assets/mod.rs @@ -1,10 +1,8 @@ //! Asset-loading infrastructure for runtime SVG rasterisation and the //! per-platform user-themes directory. //! -//! See `CARD_PLAN.md` for the full multi-phase implementation plan. -//! This module is the entry point for Phases 1 (SVG → `Image`) and 5 -//! (user-themes directory). Phase 3 will extend it further with custom -//! `AssetSource` implementations for `embedded://` and `themes://`. +//! Provides the SVG → `Image` loader and the `embedded://` / `themes://` +//! custom `AssetSource` implementations used by the theme system. pub mod card_face_svg; pub mod icon_svg; diff --git a/solitaire_engine/src/assets/svg_loader.rs b/solitaire_engine/src/assets/svg_loader.rs index 65fb1ce..c876cfd 100644 --- a/solitaire_engine/src/assets/svg_loader.rs +++ b/solitaire_engine/src/assets/svg_loader.rs @@ -1,6 +1,6 @@ //! Bevy `AssetLoader` that rasterises an SVG into `bevy::image::Image`. //! -//! The card-theme system (see `CARD_PLAN.md`) ships SVG sources both as +//! The card-theme system ships SVG sources both as //! the embedded default theme and as user-supplied themes. Bevy 0.18 has //! no built-in SVG support, so this loader bridges `usvg` (parser) + //! `resvg` (renderer) + `tiny-skia` (CPU pixmap) to produce textures diff --git a/solitaire_engine/src/theme/importer.rs b/solitaire_engine/src/theme/importer.rs index bb27ad7..8fdc7cb 100644 --- a/solitaire_engine/src/theme/importer.rs +++ b/solitaire_engine/src/theme/importer.rs @@ -1,6 +1,6 @@ //! Theme zip-archive importer. //! -//! Phase 7 of the card-theme system (see `CARD_PLAN.md`). Players ship +//! Players ship //! and install third-party themes as a single `.zip` containing a //! `theme.ron` manifest at the archive root plus the 52 face SVGs and //! one back SVG referenced by that manifest. [`import_theme`] is the diff --git a/solitaire_engine/src/theme/plugin.rs b/solitaire_engine/src/theme/plugin.rs index 51b82e5..fcd6f20 100644 --- a/solitaire_engine/src/theme/plugin.rs +++ b/solitaire_engine/src/theme/plugin.rs @@ -3,10 +3,8 @@ //! with the currently-loaded theme so existing card-rendering systems //! pick up the new artwork on the next state-changed tick. //! -//! Phase 4 of `CARD_PLAN.md`. The plugin's `set_theme` helper is the -//! public API that the future picker UI (Phase 6) calls; for now it's -//! exposed for tests and for any embedder that wants to load an -//! alternative theme manually. +//! The plugin's `set_theme` helper is the public API used by the +//! Settings appearance picker and exposed for tests. use std::collections::HashMap; diff --git a/solitaire_engine/src/ui_modal.rs b/solitaire_engine/src/ui_modal.rs index 5a3da0c..eb3dad9 100644 --- a/solitaire_engine/src/ui_modal.rs +++ b/solitaire_engine/src/ui_modal.rs @@ -372,6 +372,7 @@ pub fn spawn_modal_button( Button, Node { padding: UiRect::axes(VAL_SPACE_4, VAL_SPACE_3), + min_height: Val::Px(48.0), justify_content: JustifyContent::Center, align_items: AlignItems::Center, column_gap: VAL_SPACE_2,