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:
gsxdsm
2026-02-21 13:56:48 -08:00
committed by GitHub
parent f785f1204b
commit 28becb177b
11 changed files with 100 additions and 53 deletions

View File

@@ -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]);