|
9 | 9 | ChevronDown, |
10 | 10 | GitBranch, |
11 | 11 | Settings, |
12 | | - Globe |
| 12 | + Globe, |
| 13 | + X |
13 | 14 | } from "lucide-react"; |
14 | 15 | import { Button } from "@/components/ui/button"; |
15 | 16 | import { Input } from "@/components/ui/input"; |
@@ -971,7 +972,10 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({ |
971 | 972 | </motion.div> |
972 | 973 |
|
973 | 974 | {/* Main Content Area */} |
974 | | - <div className="flex-1 overflow-hidden"> |
| 975 | + <div className={cn( |
| 976 | + "flex-1 overflow-hidden transition-all duration-300", |
| 977 | + showTimeline && "sm:mr-96" |
| 978 | + )}> |
975 | 979 | {showPreview ? ( |
976 | 980 | // Split pane layout when preview is active |
977 | 981 | <SplitPane |
@@ -1018,29 +1022,62 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({ |
1018 | 1022 | </div> |
1019 | 1023 |
|
1020 | 1024 | {/* Floating Prompt Input - Always visible */} |
1021 | | - <ErrorBoundary> |
1022 | | - <FloatingPromptInput |
1023 | | - ref={floatingPromptRef} |
1024 | | - onSend={handleSendPrompt} |
1025 | | - onCancel={handleCancelExecution} |
1026 | | - isLoading={isLoading} |
1027 | | - disabled={!projectPath} |
1028 | | - projectPath={projectPath} |
1029 | | - /> |
1030 | | - </ErrorBoundary> |
| 1025 | + <div className={cn( |
| 1026 | + "fixed bottom-0 left-0 right-0 transition-all duration-300 z-50", |
| 1027 | + showTimeline && "sm:right-96" |
| 1028 | + )}> |
| 1029 | + <ErrorBoundary> |
| 1030 | + <FloatingPromptInput |
| 1031 | + ref={floatingPromptRef} |
| 1032 | + onSend={handleSendPrompt} |
| 1033 | + onCancel={handleCancelExecution} |
| 1034 | + isLoading={isLoading} |
| 1035 | + disabled={!projectPath} |
| 1036 | + projectPath={projectPath} |
| 1037 | + /> |
| 1038 | + </ErrorBoundary> |
| 1039 | + </div> |
1031 | 1040 |
|
1032 | 1041 | {/* Timeline */} |
1033 | | - {showTimeline && effectiveSession && ( |
1034 | | - <TimelineNavigator |
1035 | | - sessionId={effectiveSession.id} |
1036 | | - projectId={effectiveSession.project_id} |
1037 | | - projectPath={projectPath} |
1038 | | - currentMessageIndex={messages.length - 1} |
1039 | | - onCheckpointSelect={handleCheckpointSelect} |
1040 | | - onFork={handleFork} |
1041 | | - refreshVersion={timelineVersion} |
1042 | | - /> |
1043 | | - )} |
| 1042 | + <AnimatePresence> |
| 1043 | + {showTimeline && effectiveSession && ( |
| 1044 | + <motion.div |
| 1045 | + initial={{ x: "100%" }} |
| 1046 | + animate={{ x: 0 }} |
| 1047 | + exit={{ x: "100%" }} |
| 1048 | + transition={{ type: "spring", damping: 20, stiffness: 300 }} |
| 1049 | + className="fixed right-0 top-0 h-full w-full sm:w-96 bg-background border-l border-border shadow-xl z-30 overflow-hidden" |
| 1050 | + > |
| 1051 | + <div className="h-full flex flex-col"> |
| 1052 | + {/* Timeline Header */} |
| 1053 | + <div className="flex items-center justify-between p-4 border-b border-border"> |
| 1054 | + <h3 className="text-lg font-semibold">Session Timeline</h3> |
| 1055 | + <Button |
| 1056 | + variant="ghost" |
| 1057 | + size="icon" |
| 1058 | + onClick={() => setShowTimeline(false)} |
| 1059 | + className="h-8 w-8" |
| 1060 | + > |
| 1061 | + <X className="h-4 w-4" /> |
| 1062 | + </Button> |
| 1063 | + </div> |
| 1064 | + |
| 1065 | + {/* Timeline Content */} |
| 1066 | + <div className="flex-1 overflow-y-auto p-4"> |
| 1067 | + <TimelineNavigator |
| 1068 | + sessionId={effectiveSession.id} |
| 1069 | + projectId={effectiveSession.project_id} |
| 1070 | + projectPath={projectPath} |
| 1071 | + currentMessageIndex={messages.length - 1} |
| 1072 | + onCheckpointSelect={handleCheckpointSelect} |
| 1073 | + onFork={handleFork} |
| 1074 | + refreshVersion={timelineVersion} |
| 1075 | + /> |
| 1076 | + </div> |
| 1077 | + </div> |
| 1078 | + </motion.div> |
| 1079 | + )} |
| 1080 | + </AnimatePresence> |
1044 | 1081 | </div> |
1045 | 1082 |
|
1046 | 1083 | {/* Fork Dialog */} |
|
0 commit comments