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:
+82
-3
@@ -186,10 +186,89 @@ translations, independent story saves, live undo after translation, chapter
|
||||
progression, stale async language loads, and invalid content.
|
||||
`test/library_widget_test.dart` exercises the actual selectors, German at 1.5×
|
||||
text in both orientations, and Arabic direction/font behavior with a fixed
|
||||
puzzle layout. `integration_test/library_test.dart` runs the library flow on
|
||||
the tablet with an in-memory game and ads disabled (`QA_TEST=true`, preferably
|
||||
the isolated `check` flavor). Screenshots are written under
|
||||
puzzle layout. `integration_test/library_test.dart` starts on the bookshelf and then runs the
|
||||
library flow on the tablet with an in-memory game and ads disabled (`QA_TEST=true`,
|
||||
preferably the isolated `check` flavor). Screenshots are written under
|
||||
`artifacts/flutter-check/library-*.png` by the existing integration driver.
|
||||
`flutter test tool/shelf_screenshots_test.dart` renders the shelf at phone and
|
||||
tablet metrics into `artifacts/library/shelf-*.png` without a device.
|
||||
|
||||
For every device installation, follow the root `AGENTS.md`: build and verify the
|
||||
intended APK first, then fresh-install its package with no restored app data.
|
||||
|
||||
## Cast readings and scene atmosphere
|
||||
|
||||
A page can remain one transport-controlled WAV while containing several voices.
|
||||
The Midnight Invitation diary uses `narration/cast.json` for stable role-to-voice
|
||||
assignments and optional `segments` in `narration/scripts.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"speaker": "Iris",
|
||||
"text": "“I always do.”\n\n",
|
||||
"pauseMs": 900,
|
||||
"direction": "Understated, almost to herself."
|
||||
}
|
||||
```
|
||||
|
||||
Concatenating segment text **without a separator** must reproduce the page text
|
||||
exactly, including whitespace and punctuation. Each segment names a cast member;
|
||||
optional `speed`, `sentencePause`, `pauseMs`, `perspective` and `afterEffect`
|
||||
control the offline performance. `direction` is a production note for a human
|
||||
or a future expressive speech engine; Kokoro does not interpret emotion prompts.
|
||||
The current renderer supports `near` / `behind-door` perspective and three soft
|
||||
procedural effects (`door-knock`, `chair-shift`, `paper`) placed in the pauses.
|
||||
These effects are part of the reading, so pause/replay/speed changes keep them in
|
||||
sync. The atmosphere switch controls the separate background layer.
|
||||
|
||||
Render selected pages with repeatable `--page <stable-page-id>` arguments to
|
||||
`scripts/render_narration.py --story-root <package> ...`. Other tracks are
|
||||
preserved. Per-segment cue speakers drive highlighting and the live speaker label;
|
||||
the role remains displayed through its pause. Generated drama tracks use
|
||||
`cueJoin: ""`; legacy paragraph tracks retain their double-newline convention.
|
||||
Master WAV, runtime WAV and FLAC archive checks remain mandatory.
|
||||
|
||||
For a translation, keep role/page IDs stable and author new text segments, voices
|
||||
and timings for that language. Use a speech engine with suitable target-language
|
||||
voices and publish the resulting manifest through that locale's `tracksAsset`.
|
||||
English cue offsets or spoken tracks must not be reused over translated text.
|
||||
|
||||
A catalogue entry may also specify an independent `atmosphereAsset`:
|
||||
|
||||
```json
|
||||
{
|
||||
"scenes": {
|
||||
"kitchen": {"asset": "assets/stories/example/audio/kitchen.wav"}
|
||||
},
|
||||
"pages": {
|
||||
"example.candle.entry": "kitchen",
|
||||
"example.candle.puzzle": "kitchen"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Use actual page IDs and bundled WAV paths. This manifest is shared across locales
|
||||
and must contain nonverbal sound only. Unmapped pages are quiet. Adjacent pages
|
||||
using the same asset retain the loop; another scene fades between loops. Leaving
|
||||
the story, muting, or backgrounding stops it. Background volume lowers under the
|
||||
reading; existing Sound & atmosphere controls apply to every story. The original
|
||||
Mara chapter mapping remains supported.
|
||||
|
||||
`test/drama_test.dart` covers language isolation, invalid bindings, live cast
|
||||
labels, ducking, loop continuity and leaving the book. The dedicated device test
|
||||
is `integration_test/drama_test.dart`. Pilot review mixes can be exported with
|
||||
`python3 scripts/render_drama_previews.py`; they are local artifacts, not bundled
|
||||
in the app.
|
||||
|
||||
## Story-specific notebook paper
|
||||
|
||||
Set optional `paperAsset` on a catalogue entry to a bundled page-background image.
|
||||
It applies to reading, contents and puzzle pages through `PaperSkin`; absent
|
||||
values preserve the original notebook. A locale overlay may override `paperAsset`.
|
||||
Keep the reading rectangle clear (approximately x=8–91%, y=12–91% of a portrait
|
||||
1024×1536 page), and keep any decorations in the margins. Verify portrait,
|
||||
landscape, larger text and a switch back to another book.
|
||||
|
||||
The selected puzzle region uses both a filled/checkmarked button and a continuous
|
||||
outline. Keep its overlay transparent and pointer-transparent: an opaque shadow
|
||||
or fill above the grid can conceal marks even when hit testing still works.
|
||||
|
||||
Reference in New Issue
Block a user