@devries-cameron20 / t3code-1 / commits / 99dbe4ff02
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): disable add project button for empty path

Satyam Bansal committed Mar 10, 2026 at 00:41 UTC 99dbe4ff02d9ee8e5450e96d84e8f96170c64a71
1 file changed +3 -1
apps/web/src/components/Sidebar.tsx
+3 -1
@@ -550,6 +550,8 @@ export default function Sidebar() {
550 void addProjectFromPath(newCwd);
551 };
552
553 + const canAddProject = newCwd.trim().length > 0 && !isAddingProject;
554 +
555 const handlePickFolder = async () => {
556 const api = readNativeApi();
557 if (!api || isPickingFolder) return;
@@ -1223,7 +1225,7 @@ export default function Sidebar() {
1225 type="button"
1226 className="shrink-0 rounded-md bg-primary px-2.5 py-1 text-xs font-medium text-primary-foreground transition-colors duration-150 hover:bg-primary/90 disabled:opacity-60"
1227 onClick={handleAddProject}
1226 - disabled={isAddingProject}
1228 + disabled={!canAddProject}
1229 >
1230 {isAddingProject ? "Adding..." : "Add"}
1231 </button>