mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 10:23:07 +00:00
Fix Docker Compose CORS issues with nginx API proxying (#793)
* Changes from fix/docker-compose-cors-error * Update apps/server/src/index.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Fix: Delete Worktree Crash + PR Comments + Dev Server UX Improvements (#792) * Changes from fix/delete-worktree-hotifx * fix: Improve bot detection and prevent UI overflow issues - Include GitHub app-initiated comments in bot detection - Wrap handleQuickCreateSession with useCallback to fix dependency issues - Truncate long branch names in agent header to prevent layout overflow * feat: Support GitHub App comments in PR review and fix session filtering * feat: Return invalidation result from delete session handler * fix: Improve CORS origin validation to handle wildcard correctly * fix: Correct IPv6 localhost parsing and improve responsive UI layouts * Changes from fix/pwa-cache-fix (#794) * fix: Add type checking to prevent crashes from malformed cache entries --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -914,7 +914,7 @@ export function PRCommentResolutionDialog({
|
||||
{!loading && !error && allComments.length > 0 && (
|
||||
<>
|
||||
{/* Controls Bar */}
|
||||
<div className="flex items-center justify-between gap-4 px-1">
|
||||
<div className="flex flex-wrap items-center justify-between gap-2 px-1">
|
||||
{/* Select All - only interactive when there are visible comments */}
|
||||
<div className="flex items-center gap-2">
|
||||
<Checkbox
|
||||
@@ -935,7 +935,7 @@ export function PRCommentResolutionDialog({
|
||||
</Label>
|
||||
</div>
|
||||
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="flex flex-wrap items-center gap-2">
|
||||
{/* Show/Hide Resolved Filter Toggle - always visible */}
|
||||
<Button
|
||||
variant="ghost"
|
||||
@@ -990,7 +990,7 @@ export function PRCommentResolutionDialog({
|
||||
</Button>
|
||||
|
||||
{/* Mode Toggle */}
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex items-center gap-2 shrink-0">
|
||||
<Label
|
||||
className={cn(
|
||||
'text-xs cursor-pointer',
|
||||
|
||||
@@ -301,8 +301,13 @@ export function SessionManager({
|
||||
const refetchResult = await invalidateSessions();
|
||||
if (currentSessionId === sessionId) {
|
||||
// Switch to another session using fresh data, excluding the deleted session
|
||||
// Filter to sessions within the same worktree to avoid jumping to a different worktree
|
||||
const freshSessions = refetchResult?.data ?? [];
|
||||
const activeSessionsList = freshSessions.filter((s) => !s.isArchived && s.id !== sessionId);
|
||||
const activeSessionsList = freshSessions.filter((s) => {
|
||||
if (s.isArchived || s.id === sessionId) return false;
|
||||
const sessionDir = s.workingDirectory || s.projectPath;
|
||||
return pathsEqual(sessionDir, effectiveWorkingDirectory);
|
||||
});
|
||||
if (activeSessionsList.length > 0) {
|
||||
onSelectSession(activeSessionsList[0].id);
|
||||
}
|
||||
|
||||
@@ -480,6 +480,7 @@ export function BoardView() {
|
||||
// Find the worktree that matches the current selection, or use main worktree
|
||||
const selectedWorktree = useMemo((): WorktreeInfo | undefined => {
|
||||
let found;
|
||||
let usedFallback = false;
|
||||
if (currentWorktreePath === null) {
|
||||
// Primary worktree selected - find the main worktree
|
||||
found = worktrees.find((w) => w.isMain);
|
||||
@@ -487,9 +488,11 @@ export function BoardView() {
|
||||
// Specific worktree selected - find it by path
|
||||
found = worktrees.find((w) => !w.isMain && pathsEqual(w.path, currentWorktreePath));
|
||||
// If the selected worktree no longer exists (e.g. just deleted),
|
||||
// fall back to main to prevent rendering with undefined worktree
|
||||
// fall back to main to prevent rendering with undefined worktree.
|
||||
// onDeleted will call setCurrentWorktree(…, null) to reset properly.
|
||||
if (!found) {
|
||||
found = worktrees.find((w) => w.isMain);
|
||||
usedFallback = true;
|
||||
}
|
||||
}
|
||||
if (!found) return undefined;
|
||||
@@ -498,7 +501,11 @@ export function BoardView() {
|
||||
...found,
|
||||
isCurrent:
|
||||
found.isCurrent ??
|
||||
(currentWorktreePath !== null ? pathsEqual(found.path, currentWorktreePath) : found.isMain),
|
||||
(usedFallback
|
||||
? found.isMain // treat main as current during the transient fallback render
|
||||
: currentWorktreePath !== null
|
||||
? pathsEqual(found.path, currentWorktreePath)
|
||||
: found.isMain),
|
||||
hasWorktree: found.hasWorktree ?? true,
|
||||
};
|
||||
}, [worktrees, currentWorktreePath]);
|
||||
|
||||
@@ -220,6 +220,7 @@ export function useBoardActions({
|
||||
const {
|
||||
initialStatus: requestedStatus,
|
||||
workMode: _workMode,
|
||||
childDependencies,
|
||||
...restFeatureData
|
||||
} = featureData;
|
||||
const initialStatus = requestedStatus || 'backlog';
|
||||
@@ -244,8 +245,8 @@ export function useBoardActions({
|
||||
saveCategory(featureData.category);
|
||||
|
||||
// Handle child dependencies - update other features to depend on this new feature
|
||||
if (featureData.childDependencies && featureData.childDependencies.length > 0) {
|
||||
for (const childId of featureData.childDependencies) {
|
||||
if (childDependencies && childDependencies.length > 0) {
|
||||
for (const childId of childDependencies) {
|
||||
const childFeature = features.find((f) => f.id === childId);
|
||||
if (childFeature) {
|
||||
const childDeps = childFeature.dependencies || [];
|
||||
|
||||
@@ -267,6 +267,13 @@ export function WorktreeActionsDropdown({
|
||||
};
|
||||
}, [showPRInfo, worktree.pr]);
|
||||
|
||||
const viewDevServerLogsItem = (
|
||||
<DropdownMenuItem onClick={() => onViewDevServerLogs(worktree)} className="text-xs">
|
||||
<ScrollText className="w-3.5 h-3.5 mr-2" />
|
||||
View Dev Server Logs
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
|
||||
return (
|
||||
<DropdownMenu onOpenChange={onOpenChange}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
@@ -411,12 +418,7 @@ export function WorktreeActionsDropdown({
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSubTrigger className="text-xs px-1 rounded-l-none border-l border-border/30 h-8" />
|
||||
</div>
|
||||
<DropdownMenuSubContent>
|
||||
<DropdownMenuItem onClick={() => onViewDevServerLogs(worktree)} className="text-xs">
|
||||
<ScrollText className="w-3.5 h-3.5 mr-2" />
|
||||
View Dev Server Logs
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuSubContent>
|
||||
<DropdownMenuSubContent>{viewDevServerLogsItem}</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
<DropdownMenuSeparator />
|
||||
</>
|
||||
@@ -443,12 +445,7 @@ export function WorktreeActionsDropdown({
|
||||
disabled={isStartingDevServer}
|
||||
/>
|
||||
</div>
|
||||
<DropdownMenuSubContent>
|
||||
<DropdownMenuItem onClick={() => onViewDevServerLogs(worktree)} className="text-xs">
|
||||
<ScrollText className="w-3.5 h-3.5 mr-2" />
|
||||
View Dev Server Logs
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuSubContent>
|
||||
<DropdownMenuSubContent>{viewDevServerLogsItem}</DropdownMenuSubContent>
|
||||
</DropdownMenuSub>
|
||||
<DropdownMenuSeparator />
|
||||
</>
|
||||
|
||||
@@ -467,8 +467,7 @@ export function useDevServers({ projectPath }: UseDevServersOptions) {
|
||||
} catch (error) {
|
||||
logger.error('Start dev server failed:', error);
|
||||
toast.error('Failed to start dev server', {
|
||||
description:
|
||||
error instanceof Error ? error.message : 'Check the dev server logs panel for details.',
|
||||
description: error instanceof Error ? error.message : undefined,
|
||||
});
|
||||
} finally {
|
||||
setIsStartingDevServer(false);
|
||||
|
||||
Reference in New Issue
Block a user