Framing Advice - How to re-frame opening of non-load bearing wall
I think you need to trim the 2x4 studs in the opening and build a header over the whole new opening, like the header that was over the original doorway, which will extend across your new opening.

Something like this:

(hopefully you're better at it than I am with Photoshop...)

Taking care to attach to existing studs on the right side and adding a jack stud (doubling the stud) at the end. 

Like this: 


I also think that you'll have to do some work on the "knee wall" (half-wall) to make sure it's sturdy enough, too. I assume it's just 2x4s toenailed into the bottom plate and maybe a double stud on the end (left over from the door frame)? It's hard to know for sure since we can't see what's left.