Rearrange landscape puzzle layout

Landscape leaves now lay the puzzle out in two columns: the whole grid
keeps one column (square, sized to the page) with the heading, area
totals, hint/undo and notes beside it, and the leaf navigation folds
into a single row. The game leaf also keeps its actions in a compact
bottom bar, so the board and controls are visible without scrolling.

- Leaf gains an optional wideBody used on landscape pages.
- Board gains maxWidth, defaulting to the previous 350.
- Split the puzzle body into area, board and note builders so both
  layouts share the same controls.
- Add a landscape widget regression test and document the layout.

This snapshot also carries the pending 2.0.2 notebook work already in
the tree: read-ahead restore, bundled PCM WAV narration assets, the
audio consistency comment, version 2.0.2+11, and the related unit,
integration and script updates.
This commit is contained in:
Hadrian Burkhardt
2026-10-31 06:21:36 +01:00
parent 302ad6d38e
commit a863b0ca93
22 changed files with 971 additions and 374 deletions
+10 -9
View File
@@ -1,4 +1,4 @@
# Lumen — The Last Light (Flutter 2.0)
# Lumen — The Last Light (Flutter 2.0.2)
An illustrated island notebook about grandmother Mara, her grandchild, and restoring a lighthouse. The active app is now written in **Dart and Flutter**, with a thin Android Kotlin entry point. All puzzle generation, deductions, story navigation, progress, audio controls and advertising behavior live in `lib/`.
@@ -7,9 +7,10 @@ Android is the tested target. iOS project scaffolding and test AdMob configurati
## Play
- Six opening notebook leaves: a dedication, illustrated cottage entry, match puzzle, memory, folded note and inspectable lantern.
- Margin swipes and corner arrows turn leaves. Grid gestures never turn pages. Navigation stays fixed; overflow scrolling supports smaller screens and larger text.
- Horizontal swipes across the writing or blank paper, plus corner arrows, turn leaves. Grid and control gestures never turn pages; vertical drags still scroll. Navigation stays fixed; overflow scrolling supports smaller screens and larger text.
- Landscape pages rearrange themselves: a puzzle keeps its whole grid in one column, with the heading, area totals, hint and undo beside it, and the leaf navigation folds into a single row. The board stays fully visible without scrolling, even with larger text.
- A saved ribbon bookmark, opened note, inspected repair, viewed pages and current reading place.
- Twelve 7×7 picture puzzles across three chapters, with overlapping-area deductions on entries 3–12. Later chapters retain their earlier briefing/puzzle/reveal structure until the roadmap expands them.
- Twelve 7×7 picture puzzles across three chapters, with overlapping-area deductions on entries 3–12. Later chapters retain their briefing/puzzle/reveal structure, now with swipes between those pages too. Reading ahead keeps unfinished boards and completion awards separate.
- Deterministic daily grids and generated Easy, Medium and Hard 5×5 practice. The grades measure deduction-chain depth, not expert-level difficulty. Every board has a unique solution and needs no guessing.
- Undo, one free explained hint per puzzle, then optional rewarded hints. Later hints require the AdMob reward callback. An unavailable ad never blocks the board.
- Local daily streaks, independent difficulty levels and exactly-once puzzle completion awards.
@@ -19,9 +20,9 @@ Progress starts fresh in Flutter, as requested. Old Java `lumen.xml` saves are *
## Artwork and readings
All app-created text uses the bundled Dancing Script handwriting font, including grid clues and menus. Original watercolour harbour, cloth cover, cottage, lantern and single-page art remain bundled for offline use. Native text sits directly on the page’s blank writing area. Art prompts and provenance are in [assets/artwork](assets/artwork/README.md); the font’s OFL license ships in the app’s open-source licenses.
All app-created text uses the bundled Dancing Script handwriting font, including grid clues and menus. Lit cells are shaded with pencil strokes, and dark cells use a drawn cross; neither depends on a symbol-font fallback. Original watercolour harbour, cloth cover, cottage, lantern and single-page art remain bundled for offline use. Native text sits directly on the page’s blank writing area. Art prompts and provenance are in [assets/artwork](assets/artwork/README.md); the font’s OFL license ships in the app’s open-source licenses.
Five fixed, pre-rendered synthetic British-English readings ship as lossless FLAC assets, with PCM16 WAV masters for review. `just_audio` plays bundled files; there is no Android reader, runtime synthesis or audio download. Controls support play, pause, resume at the same position, stop, replay, speed and passage highlighting. Leaving a page or backgrounding the app stops playback. See [narration provenance](assets/narration/README.md).
Five fixed, pre-rendered synthetic British-English readings play from bundled PCM16 WAV files, identical to the reviewed masters. Lossless FLAC exports are retained in the source project but excluded from the APK. WAV avoids a Huawei API 26 failure where FLAC playback advances its clock without creating an audio track. `just_audio` plays bundled files; there is no Android reader, runtime synthesis or audio download. Controls support play, pause, resume at the same position, stop, replay, speed and passage highlighting. Leaving a page or backgrounding the app stops playback. See [narration provenance](assets/narration/README.md).
## Build and run
@@ -44,7 +45,7 @@ flutter build apk --debug --flavor qa
flutter build apk --release --flavor prod --target-platform android-arm64
```
The normal application ID remains `com.lumen.daily`; version 2.0.0 uses build number 9. The review APK is `artifacts/lumen-flutter-2.0-arm64.apk`. Build outputs, screenshots, local SDK paths, IDE state and private signing keys are ignored by Git. `pubspec.lock` is tracked for reproducible package resolution.
The normal application ID remains `com.lumen.daily`; version 2.0.2 uses build number 11. The review APK is `artifacts/lumen-flutter-2.0.2-arm64.apk`. Build outputs, screenshots, local SDK paths, IDE state and private signing keys are ignored by Git. `pubspec.lock` is tracked for reproducible package resolution.
The development release build currently uses the Android debug signing key so it can update the installed prototype. **Configure your private upload key before publishing.** No production signing material is included.
@@ -64,9 +65,9 @@ flutter drive --driver test_driver/integration_test.dart \
--dart-define=QA_TEST=true -d YOUR_ANDROID_DEVICE
```
The nine unit/widget tests cover 40 Java reference boards (including signed 64-bit seeds), 300 graded generated boards, solver counts against 300 exhaustive small systems, all twelve campaign solutions, streaks, fresh progress, read-ahead, completion awards, gesture isolation, landscape and larger text. Reference parity protects the port’s rules; it is not used to migrate saves.
The twelve unit/widget tests cover 40 Java reference boards (including signed 64-bit seeds), 300 graded generated boards, solver counts against 300 exhaustive small systems, all twelve campaign solutions, streaks, fresh progress, read-ahead, completion awards, campaign read-ahead restoration, gesture isolation, swipes over text and blank paper, cancelled drags, vertical scrolling, landscape and larger text; it also checks the landscape two-column puzzle leaf. Reference parity protects the port’s rules; it is not used to migrate saves.
The physical-device integration test uses a disposable in-memory game plus an isolated QA disk round-trip. It plays all five real FLAC files, checks pause/resume, explores the six leaves, verifies bookmarks/discoveries, solves match and lantern puzzles and checks exactly-once awards. Screenshots are saved in `artifacts/flutter-check/`. The release smoke script exercises the actual play/pause/resume UI and restores the last page after process restart, without injecting puzzle fixtures. The release build includes a targeted R8 keep rule for the database constructor used reflectively by AdMob’s WorkManager dependency. Advertising is disabled for the automated story tests; real UMP startup is checked separately in the normal build. Reward delivery, cancellation and ad no-fill still need manual release testing with your final AdMob configuration.
The physical-device integration test uses a disposable in-memory game plus an isolated QA disk round-trip. It plays all five real WAV files, checks pause/resume, explores the six leaves, verifies bookmarks/discoveries, solves match and lantern puzzles and checks exactly-once awards. Screenshots are saved in `artifacts/flutter-check/`. The release smoke script requires an active, unmuted 24 kHz media track in the tablet’s audio mixer as well as exercising the actual play/pause/resume UI and restores the last page after process restart, without injecting puzzle fixtures. The release build includes a targeted R8 keep rule for the database constructor used reflectively by AdMob’s WorkManager dependency. Advertising is disabled for the automated story tests; real UMP startup is checked separately in the normal build. Reward delivery, cancellation and ad no-fill still need manual release testing with your final AdMob configuration.
## Source map
@@ -80,7 +81,7 @@ The physical-device integration test uses a disposable in-memory game plus an is
| `lib/services/` | Local storage, bundled playback and consent-gated AdMob |
| `assets/campaign.json` | Authored twelve-picture campaign |
| `assets/narration/scripts.json` | Canonical spoken diary text |
| `assets/audio/` | Runtime FLAC files and passage timing manifest |
| `assets/audio/` | Runtime WAV files, archival FLAC exports and passage timing manifest |
| `legacy/` | Archived Java version 1.7, excluded from Flutter builds |
## Before publishing