@@ -16,6 +16,7 @@ import { useCodeComponent } from "@opencode-ai/ui/context/code"
1616import { SessionTurn } from "@opencode-ai/ui/session-turn"
1717import { SessionMessageRail } from "@opencode-ai/ui/session-message-rail"
1818import { SessionReview } from "@opencode-ai/ui/session-review"
19+ import { showToast } from "@opencode-ai/ui/toast"
1920import {
2021 DragDropProvider ,
2122 DragDropSensors ,
@@ -318,6 +319,43 @@ export default function Page() {
318319 setActiveMessage ( priorMsg )
319320 } ,
320321 } ,
322+ {
323+ id : "session.share" ,
324+ title : "Share session" ,
325+ description : "Create a shareable link for the session" ,
326+ category : "Session" ,
327+ slash : "share" ,
328+ disabled : ! params . id || ! ! info ( ) ?. share ?. url || sync . data . config . share === "disabled" ,
329+ onSelect : async ( ) => {
330+ if ( ! params . id ) return
331+ try {
332+ const res = await sdk . client . session . share ( { sessionID : params . id } )
333+ if ( res . data ?. share ?. url ) {
334+ await navigator . clipboard . writeText ( res . data . share . url )
335+ showToast ( { title : "Share URL copied to clipboard!" , variant : "success" } )
336+ }
337+ } catch {
338+ showToast ( { title : "Failed to share session" , variant : "error" } )
339+ }
340+ } ,
341+ } ,
342+ {
343+ id : "session.unshare" ,
344+ title : "Unshare session" ,
345+ description : "Remove the shareable link" ,
346+ category : "Session" ,
347+ slash : "unshare" ,
348+ disabled : ! params . id || ! info ( ) ?. share ?. url ,
349+ onSelect : async ( ) => {
350+ if ( ! params . id ) return
351+ try {
352+ await sdk . client . session . unshare ( { sessionID : params . id } )
353+ showToast ( { title : "Session unshared" , variant : "success" } )
354+ } catch {
355+ showToast ( { title : "Failed to unshare session" , variant : "error" } )
356+ }
357+ } ,
358+ } ,
321359 ] )
322360
323361 const handleKeyDown = ( event : KeyboardEvent ) => {
@@ -654,7 +692,7 @@ export default function Page() {
654692 root : "pb-20 flex-1 min-w-0 overflow-x-hidden" ,
655693 content : "pb-20" ,
656694 container :
657- "w-full max-w-full " + ( wide ( ) ? "max-w-146 mx-auto px-4 sm:px-6" : "pr -4 sm:pr -6" ) ,
695+ "w-full max-w-full " + ( wide ( ) ? "max-w-146 mx-auto px-4 sm:px-6" : "px -4 sm:px -6" ) ,
658696 } }
659697 />
660698 </ Show >
@@ -699,9 +737,20 @@ export default function Page() {
699737 < Show when = { layout . review . state ( ) === "pane" && diffs ( ) . length } >
700738 < div
701739 classList = { {
702- "relative grow pt-3 flex-1 min-h-0 border-l border-border-weak-base" : true ,
740+ "relative pt-3 shrink-0 min-h-0 border-l border-border-weak-base" : true ,
703741 } }
742+ style = { { width : `${ layout . review . width ( ) } px` } }
704743 >
744+ < ResizeHandle
745+ direction = "horizontal"
746+ reverse
747+ size = { layout . review . width ( ) }
748+ min = { 300 }
749+ max = { window . innerWidth * 0.5 }
750+ collapseThreshold = { 100 }
751+ onResize = { layout . review . resize }
752+ onCollapse = { ( ) => layout . review . tab ( ) }
753+ />
705754 < SessionReview
706755 classes = { {
707756 root : "pb-20" ,
0 commit comments