diff --git a/Makefile b/Makefile index da4c3da03..4319dfd13 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,6 @@ build-renderer: node_modules/.installed src/version.ts ## Build renderer process build-static: ## Copy static assets to dist @echo "Copying static assets..." @mkdir -p dist - @./scripts/copy-fonts.sh @cp static/splash.html dist/splash.html @cp -r public/* dist/ diff --git a/public/fonts/geist-mono/GeistMono-Variable.woff2 b/public/fonts/geist-mono/GeistMono-Variable.woff2 deleted file mode 100644 index 4692e48c5..000000000 Binary files a/public/fonts/geist-mono/GeistMono-Variable.woff2 and /dev/null differ diff --git a/public/fonts/geist-sans/Geist-Variable.woff2 b/public/fonts/geist-sans/Geist-Variable.woff2 deleted file mode 100644 index d1a0cbc66..000000000 Binary files a/public/fonts/geist-sans/Geist-Variable.woff2 and /dev/null differ diff --git a/scripts/copy-fonts.sh b/scripts/copy-fonts.sh deleted file mode 100755 index 0ffd9111a..000000000 --- a/scripts/copy-fonts.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -# Copy Geist fonts from node_modules to public/fonts -set -euo pipefail - -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" - -mkdir -p "${PROJECT_ROOT}/public/fonts/geist-sans" -mkdir -p "${PROJECT_ROOT}/public/fonts/geist-mono" - -# Copy variable fonts (support weights 100-900) -cp "${PROJECT_ROOT}/node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2" \ - "${PROJECT_ROOT}/public/fonts/geist-sans/" - -cp "${PROJECT_ROOT}/node_modules/geist/dist/fonts/geist-mono/GeistMono-Variable.woff2" \ - "${PROJECT_ROOT}/public/fonts/geist-mono/" - -echo "✓ Copied Geist variable fonts to public/fonts/" diff --git a/src/components/ChatInput/useCreationWorkspace.ts b/src/components/ChatInput/useCreationWorkspace.ts index 56045ac02..d00dded3f 100644 --- a/src/components/ChatInput/useCreationWorkspace.ts +++ b/src/components/ChatInput/useCreationWorkspace.ts @@ -50,6 +50,11 @@ export function useCreationWorkspace({ // Load branches on mount useEffect(() => { + // This can be created with an empty project path when the user is + // creating a new workspace. + if (!projectPath.length) { + return; + } const loadBranches = async () => { try { const result = await window.api.projects.listBranches(projectPath); diff --git a/src/styles/globals.css b/src/styles/globals.css index ed1e1ffde..c9e7927b9 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -4,7 +4,7 @@ /* Geist Font Declarations */ @font-face { font-family: "Geist"; - src: url("/fonts/geist-sans/Geist-Variable.woff2") format("woff2"); + src: url("../../node_modules/geist/dist/fonts/geist-sans/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; @@ -12,7 +12,7 @@ @font-face { font-family: "Geist Mono"; - src: url("/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2"); + src: url("../../node_modules/geist/dist/fonts/geist-mono/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap;