ReviewOS

also looking at this

stacks/wildloop

feat: native trail maps and complete native mobile screens

#1017
Draft chris wants to merge codex/trail-experience into main
60 files +2505 -823

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

tests/unit/native-record-screen.test.tsmodified+19-0
Changes to tests/unit/native-record-screen.test.ts
@@ -28,6 +28,25 @@ describe('native Record checkpoint recovery',()=>{
2828 await waitForText(screen,'Log in as the account that started the saved recording before resuming or uploading it.')
2929 expect(requests(screen).some(r=>r.payload.module==='Network')).toBe(false)
3030 expect(requests(screen).some(r=>r.payload.method==='startRecording')).toBe(false)
31 expect(requests(screen).some(r=>r.payload.method==='getRecordingState' || r.payload.method==='readRecording')).toBe(false)
32 })
33 it('checks the saved identity atomically before recovering the host recording',async()=>{
34 const screen=await start('Record',{},['fetch','secureStorage','storage','geolocation','lifecycle','liveActivity'],new Map([['auth_token','record-token'],['wildloop-account',JSON.stringify({token:'record-token',user:{id:7}})]]))
35 const stored=await waitForRequest(screen,0,r=>r.payload.module==='Storage' && r.payload.method==='get')
36 answer(screen,stored,{...checkpoint,pending:undefined})
37 const host=await waitForRequest(screen,0,r=>r.payload.method==='getRecordingState')
38 expect(host.payload.args[0]).toMatchObject({expectedId:'run-7'})
39 answer(screen,host,{active:true,paused:false,id:'run-7',startedAt:100000})
40 const read=await waitForRequest(screen,requests(screen).indexOf(host)+1,r=>r.payload.method==='readRecording')
41 expect(read.payload.args[0]).toMatchObject({expectedId:'run-7'})
42 })
43 it('does not read GPS when a legacy checkpoint has no verifiable host identity',async()=>{
44 const screen=await start('Record',{},['fetch','secureStorage','storage','geolocation','lifecycle','liveActivity'],new Map([['auth_token','record-token'],['wildloop-account',JSON.stringify({token:'record-token',user:{id:7}})]]))
45 const stored=await waitForRequest(screen,0,r=>r.payload.module==='Storage' && r.payload.method==='get')
46 answer(screen,stored,{...checkpoint,id:null,pending:undefined})
47 await Bun.sleep(0)
48 expect(requests(screen).some(r=>r.payload.method==='getRecordingState' || r.payload.method==='readRecording')).toBe(false)
49 expect(requests(screen).some(r=>r.payload.method==='startRecording')).toBe(false)
3150 })
3251 it('retains a finished track when uploading fails and retries the same identity',async()=>{
3352 const screen=await recover()