refactor: improve KanbanCard styling and enhance path normalization in worktree routes

- Updated the button variant in KanbanCard for better visual consistency.
- Adjusted CSS classes for improved styling of shortcut keys.
- Introduced a normalizePath function to ensure consistent path formatting across platforms.
- Updated worktree routes to utilize normalizePath for path handling, enhancing cross-platform compatibility.
This commit is contained in:
Cody Seibert
2025-12-16 13:09:20 -05:00
parent 064a395c4c
commit 8482cdab87
5 changed files with 23 additions and 18 deletions

View File

@@ -13,6 +13,15 @@ import {
const logger = createLogger("Worktree");
const execAsync = promisify(exec);
/**
* Normalize path separators to forward slashes for cross-platform consistency.
* This ensures paths from `path.join()` (backslashes on Windows) match paths
* from git commands (which may use forward slashes).
*/
export function normalizePath(p: string): string {
return p.replace(/\\/g, "/");
}
/**
* Check if a path is a git repo
*/