Merge remote dev and resolve conflicts in CreateSessionForm
This commit is contained in:
@@ -73,23 +73,19 @@ export const CreateSessionForm = ({
|
|||||||
|
|
||||||
// Load branches when selected repo changes
|
// Load branches when selected repo changes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!selectedRepo || !showCloneMode) {
|
const projectId = fixedProjectId || selectedProject;
|
||||||
|
if (!selectedRepo || !projectId || !showCloneMode) {
|
||||||
setBranches([]);
|
setBranches([]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const loadBranches = async () => {
|
const loadBranches = async () => {
|
||||||
setIsLoadingBranches(true);
|
setIsLoadingBranches(true);
|
||||||
try {
|
try {
|
||||||
const branchResponse = await listRepositoryBranches(
|
const response = await listRepositoryBranches(projectId, selectedRepo);
|
||||||
fixedProjectId || selectedProject,
|
setBranches(response.branches);
|
||||||
selectedRepo
|
if (response.default_branch) {
|
||||||
);
|
setBranch(response.default_branch);
|
||||||
const branchList = branchResponse.branches;
|
setBaseBranch(response.default_branch);
|
||||||
setBranches(branchList);
|
|
||||||
const defaultBranch = branchList.find((b) => b.is_default);
|
|
||||||
if (defaultBranch) {
|
|
||||||
setBranch(defaultBranch.name);
|
|
||||||
setBaseBranch(defaultBranch.name);
|
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
// ignore
|
// ignore
|
||||||
@@ -98,7 +94,7 @@ export const CreateSessionForm = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
void loadBranches();
|
void loadBranches();
|
||||||
}, [selectedRepo, showCloneMode, selectedProject, fixedProjectId]);
|
}, [selectedRepo, selectedProject, fixedProjectId, showCloneMode]);
|
||||||
|
|
||||||
// Filter repositories by selected project
|
// Filter repositories by selected project
|
||||||
const availableRepos = selectedProject
|
const availableRepos = selectedProject
|
||||||
|
|||||||
@@ -33,12 +33,10 @@ export const MobileTerminalWrapper: React.FC<MobileTerminalWrapperProps> = ({
|
|||||||
} | null>(null);
|
} | null>(null);
|
||||||
|
|
||||||
const headerAutoHide = useAutoHide({ timeout: 3000, enabled: isMobile });
|
const headerAutoHide = useAutoHide({ timeout: 3000, enabled: isMobile });
|
||||||
const keysAutoHide = useAutoHide({ timeout: 3000, enabled: isMobile });
|
|
||||||
|
|
||||||
const handleTerminalTap = useCallback(() => {
|
const handleTerminalTap = useCallback(() => {
|
||||||
headerAutoHide.toggle();
|
headerAutoHide.toggle();
|
||||||
keysAutoHide.toggle();
|
}, [headerAutoHide]);
|
||||||
}, [headerAutoHide, keysAutoHide]);
|
|
||||||
|
|
||||||
const handleTerminalReady = useCallback(
|
const handleTerminalReady = useCallback(
|
||||||
(sendData: (data: string) => void, connectionStatus: "connecting" | "connected" | "disconnected" | "error", focusInput: () => void) => {
|
(sendData: (data: string) => void, connectionStatus: "connecting" | "connected" | "disconnected" | "error", focusInput: () => void) => {
|
||||||
@@ -92,7 +90,7 @@ export const MobileTerminalWrapper: React.FC<MobileTerminalWrapperProps> = ({
|
|||||||
|
|
||||||
<SpecialKeysStrip
|
<SpecialKeysStrip
|
||||||
onSend={handleSendKey}
|
onSend={handleSendKey}
|
||||||
isVisible={keysAutoHide.isVisible && !showPanel}
|
isVisible={!showPanel}
|
||||||
onMoreClick={() => setShowPanel(true)}
|
onMoreClick={() => setShowPanel(true)}
|
||||||
onKeepFocus={() => terminalRef?.focusInput()}
|
onKeepFocus={() => terminalRef?.focusInput()}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -275,10 +275,10 @@ export const TerminalComponent: React.FC<TerminalProps> = ({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Focus hidden input on mobile to keep keyboard open
|
// Focus terminal on mobile to keep keyboard open
|
||||||
const handleTerminalClick = () => {
|
const handleTerminalClick = () => {
|
||||||
if (isMobile && hiddenInputRef.current) {
|
if (isMobile && termRef.current) {
|
||||||
hiddenInputRef.current.focus();
|
termRef.current.focus();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3211,13 +3211,15 @@ a.nav-item,
|
|||||||
}
|
}
|
||||||
|
|
||||||
.terminal-hidden-input {
|
.terminal-hidden-input {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
bottom: 0;
|
left: -9999px;
|
||||||
left: 0;
|
top: -9999px;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Disable zoom on mobile terminal */
|
/* Disable zoom on mobile terminal */
|
||||||
|
|||||||
Reference in New Issue
Block a user