Open Lumen on a responsive bookshelf and land pending story work

- Start the app on a shelf of every installed book instead of the last
  book's home. Cards show the cover, translated metadata, available
  languages, restored patterns and either "Continue reading" or a way in.
- Keep each book's saved route: the shelf is never written to
  flutter_screen, so choosing a book resumes its own leaf.
- Lay the shelf out responsively: dense single-column cards on phones,
  a two-column grid from 720 logical pixels, a centred 860 px column on
  tablets and a chevron that exists in the bundled handwriting font.
- Keep Settings reachable from the shelf and let the home page's story
  library button open the shelf instead of a dialog.
- Add tool/shelf_screenshots_test.dart, which renders the shelf at phone
  and tablet metrics, checks that every card and Settings stay reachable
  without overflow, and writes artifacts/library/shelf-*.png.
- Commit the pending Midnight Invitation package (campaign, notebook,
  narration and artwork), cast drama and ambience tooling, region
  selection, phone/tablet integration coverage and related docs.

flutter analyze is clean and all 74 widget/domain tests pass.
This commit is contained in:
Hadrian Burkhardt
2026-11-05 14:29:50 +01:00
parent d45cd0698a
commit 0718e3f252
149 changed files with 16875 additions and 393 deletions
+37 -1
View File
@@ -25,11 +25,47 @@ class DelayedTranslationBundle extends FixtureBundle {
void main() {
TestWidgetsFlutterBinding.ensureInitialized();
test(
'each book has three persistent reading ad breaks with a shared legacy cap',
() async {
final library = await StoryLibrary.load();
final store = Progress.memory();
for (final story in library.stories) {
final book = await library.open(story.id);
final game = Game(book, store, library: library);
final total =
book.pages.length +
(book.continueAt == null
? 0
: (book.levels.length - book.continueAt!) * 3);
var placements = 0;
for (var position = 0; position <= total; position++) {
if (game.claimBookAd(position, total)) placements++;
expect(game.claimBookAd(position, total), false);
}
expect(placements, 3, reason: story.id);
final restarted = Game(book, Progress.memory(store.snapshot));
for (var position = total; position >= 0; position--) {
expect(restarted.claimBookAd(position, total), false);
}
}
final book = await library.open('mara-island');
final migrated = Game(book, Progress.memory({'storyAd_7': true}));
expect(migrated.claimBookAd(1, 3), true);
expect(migrated.claimBookAd(2, 3), true);
expect(migrated.claimBookAd(3, 3), false);
},
);
test(
'bundled library loads every language and keeps original Mara saves',
() async {
final library = await StoryLibrary.load();
expect(library.stories.map((s) => s.id), ['mara-island', 'paper-boat']);
expect(library.stories.map((s) => s.id), [
'mara-island',
'paper-boat',
'midnight-invitation',
]);
for (final story in library.stories) {
for (final language in story.languages.keys) {
final book = await library.open(story.id, language: language);