@@ -28,6 +28,7 @@ import { GitPanel } from "../../features/workspace/views/shared/git-panel";
2828import { WorkspaceLaunchModal } from "../../features/workspace/views/shared/workspace-launch-modal" ;
2929import { WorkspaceStatusBar } from "../../features/workspace/views/shared/workspace-status-bar" ;
3030import { WorktreeManagerSurface } from "../../features/workspace/views/shared/worktree-manager-surface" ;
31+ import { useTranslation } from "../../lib/i18n" ;
3132import type { UiPreviewSceneDefinition } from "../catalog" ;
3233import { getUiPreviewSceneMetadata } from "../scene-metadata" ;
3334
@@ -789,6 +790,88 @@ function scene(
789790 } ;
790791}
791792
793+ function FooterUpdateRailPreviewShell ( {
794+ device,
795+ className,
796+ } : {
797+ device : "desktop" | "mobile" ;
798+ className : string ;
799+ } ) {
800+ return device === "mobile" ? (
801+ < div
802+ className = { `${ className } mobile-shell mobile-shell--stacked mobile-shell--motion-reduced` }
803+ data-testid = "mobile-shell"
804+ >
805+ < MobileTopBar
806+ activeWorkspace = { workspace }
807+ drawerOpen = { false }
808+ onOpenSettings = { ( ) => { } }
809+ onToggleDrawer = { ( ) => { } }
810+ />
811+ < main className = "mobile-shell__viewport" >
812+ < div className = "mobile-shell__content" style = { { paddingBottom : "144px" } } />
813+ </ main >
814+ < div
815+ className = "mobile-shell__bottom-stack"
816+ data-testid = "mobile-bottom-stack"
817+ style = { { "--mobile-keyboard-inset" : "0px" } as CSSProperties }
818+ >
819+ < div className = "mobile-dock-shell" >
820+ < MobileDock activeItem = "agent" onSelectItem = { ( ) => { } } />
821+ </ div >
822+ < WorkspaceStatusBar workspaceId = { workspace . id } gitState = { readmeDesktopGitStatus } />
823+ </ div >
824+ </ div >
825+ ) : (
826+ < div className = { className } >
827+ < div className = "workspace-page workspace-page--desktop" >
828+ < TopBar />
829+ < div className = "workspace-body" >
830+ < div className = "workspace-main-area" >
831+ < div className = "workspace-main-stage" />
832+ </ div >
833+ </ div >
834+ < WorkspaceStatusBar
835+ align = "start"
836+ workspaceId = { workspace . id }
837+ gitState = { readmeDesktopGitStatus }
838+ />
839+ </ div >
840+ </ div >
841+ ) ;
842+ }
843+
844+ function FooterUpdateRailConfirmPreview ( { device } : { device : "desktop" | "mobile" } ) {
845+ const t = useTranslation ( ) ;
846+
847+ return (
848+ < >
849+ < FooterUpdateRailPreviewShell className = "footer-update-rail-confirm-review" device = { device } />
850+ < ConfirmDialog
851+ open
852+ onOpenChange = { ( ) => { } }
853+ title = { t ( "settings.about.confirm_update_title" ) }
854+ description = {
855+ < div className = "settings-dialog-copy" >
856+ < p > { t ( "settings.about.confirm_update_message" ) } </ p >
857+ < p >
858+ { t ( "settings.about.confirm_update_activity" , {
859+ terminals : 1 ,
860+ sessions : 2 ,
861+ supervisors : 3 ,
862+ } ) }
863+ </ p >
864+ </ div >
865+ }
866+ cancelText = { t ( "action.cancel" ) }
867+ confirmText = { t ( "settings.about.update_now" ) }
868+ tone = "danger"
869+ onConfirm = { ( ) => { } }
870+ />
871+ </ >
872+ ) ;
873+ }
874+
792875export function createShowcaseScenes ( ) : UiPreviewSceneDefinition [ ] {
793876 return [
794877 scene ( "workspace-launch-modal" , {
@@ -884,49 +967,25 @@ export function createShowcaseScenes(): UiPreviewSceneDefinition[] {
884967 } ,
885968 updateState : footerUpdateRailPreviewState ,
886969 } ) ,
887- render : ( context ) =>
888- context . device === "mobile" ? (
889- < div
890- className = "footer-update-rail-review mobile-shell mobile-shell--stacked mobile-shell--motion-reduced"
891- data-testid = "mobile-shell"
892- >
893- < MobileTopBar
894- activeWorkspace = { workspace }
895- drawerOpen = { false }
896- onOpenSettings = { ( ) => { } }
897- onToggleDrawer = { ( ) => { } }
898- />
899- < main className = "mobile-shell__viewport" >
900- < div className = "mobile-shell__content" style = { { paddingBottom : "144px" } } />
901- </ main >
902- < div
903- className = "mobile-shell__bottom-stack"
904- data-testid = "mobile-bottom-stack"
905- style = { { "--mobile-keyboard-inset" : "0px" } as CSSProperties }
906- >
907- < div className = "mobile-dock-shell" >
908- < MobileDock activeItem = "agent" onSelectItem = { ( ) => { } } />
909- </ div >
910- < WorkspaceStatusBar workspaceId = { workspace . id } gitState = { readmeDesktopGitStatus } />
911- </ div >
912- </ div >
913- ) : (
914- < div className = "footer-update-rail-review" >
915- < div className = "workspace-page workspace-page--desktop" >
916- < TopBar />
917- < div className = "workspace-body" >
918- < div className = "workspace-main-area" >
919- < div className = "workspace-main-stage" />
920- </ div >
921- </ div >
922- < WorkspaceStatusBar
923- align = "start"
924- workspaceId = { workspace . id }
925- gitState = { readmeDesktopGitStatus }
926- />
927- </ div >
928- </ div >
929- ) ,
970+ render : ( context ) => (
971+ < FooterUpdateRailPreviewShell
972+ className = "footer-update-rail-review"
973+ device = { context . device }
974+ />
975+ ) ,
976+ } ) ,
977+ scene ( "footer-update-rail-confirm-review" , {
978+ router : ( ) => ( { initialEntries : [ "/workspace" ] , path : "/workspace" } ) ,
979+ seed : ( context ) => ( {
980+ ...context ,
981+ workspaces : [ workspace ] ,
982+ activeWorkspaceId : workspace . id ,
983+ gitStateByWorkspaceId : {
984+ [ workspace . id ] : readmeDesktopGitStatus ,
985+ } ,
986+ updateState : footerUpdateRailPreviewState ,
987+ } ) ,
988+ render : ( context ) => < FooterUpdateRailConfirmPreview device = { context . device } /> ,
930989 } ) ,
931990 scene ( "workspace-icon-review" , {
932991 router : ( ) => ( { initialEntries : [ "/workspace" ] , path : "/workspace" } ) ,
0 commit comments