Skip to content

Commit cc11262

Browse files
committed
Keep scripted branch times on the status bar
Some scene_09 cold branches rendered an in-chat [TIME] marker but did not set scene timeLabel, so the phone status bar fell back to the viewer's real clock. Add the missing labels and a data guard that keeps visible scripted timestamps paired with status-bar metadata. Constraint: PlayingView derives the status-bar clock only from scene timeLabel. Rejected: Teach StatusBar to inspect rendered messages | data-level consistency is simpler and keeps scene metadata explicit. Confidence: high Scope-risk: narrow Directive: Any scene that renders a [TIME] system message should declare timeLabel unless the UI contract changes. Tested: python3 -m py_compile scripts/check_repository.py; python3 scripts/check_repository.py; npm run verify; npm audit --omit=dev; git diff --check Not-tested: Manual playthrough of each scene_09 cold branch in a browser.
1 parent 8084339 commit cc11262

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

data/scenes.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,6 +2469,7 @@
24692469
{
24702470
"id": "scene_09_cold_a",
24712471
"chapter": 4,
2472+
"timeLabel": "周五 下午 16:40",
24722473
"messages": [
24732474
{
24742475
"id": "t1",
@@ -2492,6 +2493,7 @@
24922493
{
24932494
"id": "scene_09_cold_b",
24942495
"chapter": 4,
2496+
"timeLabel": "周五 下午 16:40",
24952497
"messages": [
24962498
{
24972499
"id": "t1",
@@ -2515,6 +2517,7 @@
25152517
{
25162518
"id": "scene_09_cold_c",
25172519
"chapter": 4,
2520+
"timeLabel": "周五 下午 16:40",
25182521
"messages": [
25192522
{
25202523
"id": "t1",
@@ -2538,6 +2541,7 @@
25382541
{
25392542
"id": "scene_09_cold_d",
25402543
"chapter": 4,
2544+
"timeLabel": "周五 下午 16:40",
25412545
"messages": [
25422546
{
25432547
"id": "t1",

scripts/check_repository.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@
182182
missing_scene_links: list[str] = []
183183
implicit_silent_choices: list[str] = []
184184
bad_public_image_types: list[str] = []
185+
scenes_with_time_messages_missing_labels: list[str] = []
185186

186187

187188
def public_image_type(path: Path) -> str:
@@ -223,6 +224,9 @@ def public_image_type(path: Path) -> str:
223224
missing_scene_links.append(f'{girl_id}.firstScene -> {first_scene}')
224225

225226
for scene in scenes:
227+
if any(str(message.get('content', '')).startswith('[TIME]') for message in scene.get('messages', [])) and not scene.get('timeLabel'):
228+
scenes_with_time_messages_missing_labels.append(scene['id'])
229+
226230
auto_next = scene.get('autoNext')
227231
if auto_next and auto_next not in scene_ids:
228232
missing_scene_links.append(f"{scene['id']}.autoNext -> {auto_next}")
@@ -255,6 +259,10 @@ def public_image_type(path: Path) -> str:
255259
preview = ', '.join(implicit_silent_choices[:10])
256260
raise SystemExit(f'Choices that render no player bubble must declare replyText=\"\" ({len(implicit_silent_choices)}): {preview}')
257261

262+
if scenes_with_time_messages_missing_labels:
263+
preview = ', '.join(scenes_with_time_messages_missing_labels[:10])
264+
raise SystemExit(f'Scenes with [TIME] messages must set timeLabel for the status bar ({len(scenes_with_time_messages_missing_labels)}): {preview}')
265+
258266
print('Repository structure check: PASS')
259267
print(
260268
json.dumps(

0 commit comments

Comments
 (0)