import sqlite3,json
p='/tmp/triage-24930/data2/environments/moonbase-terminal/userdata/statev2.sqlite'
c=sqlite3.connect(p)
for mid,raw in c.execute("select message_id,payload_json from orchestration_v2_projection_messages where thread_id='remote-command-center' and role='assistant'").fetchall():
 d=json.loads(raw)
 d['text']='## Acceptance criteria\n\n'+ '\n\n'.join(f'### Section {i}\n\n- Conversation text stays readable while scrolling through the complete history.\n- Header title, subtitle, navigation controls, and status bar remain legible.\n- Content remains reachable with the keyboard open or closed.' for i in range(1,16))
 c.execute('update orchestration_v2_projection_messages set payload_json=? where message_id=?',(json.dumps(d),mid))
c.commit()
for mid,raw in c.execute("select turn_item_id,payload_json from orchestration_v2_projection_turn_items where thread_id='remote-command-center' and type='assistant_message'").fetchall():
 d=json.loads(raw)
 d['text']=json.loads(c.execute("select payload_json from orchestration_v2_projection_messages where message_id='remote-command-center-answer'").fetchone()[0])['text']
 c.execute('update orchestration_v2_projection_turn_items set payload_json=? where turn_item_id=?',(json.dumps(d),mid))
c.commit()
