Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
Menu,
MenuGroup,
MenuItem,
MenuPopup,

Check warning on line 161 in apps/web/src/components/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint(no-unused-vars)

Identifier 'MenuItem' is imported but never used.
MenuRadioGroup,
MenuRadioItem,
MenuTrigger,
Expand Down Expand Up @@ -233,7 +233,7 @@
resolveSplitViewPaneIdForThread,
selectSplitView,
type SplitViewId,
useSplitViewStore,

Check warning on line 236 in apps/web/src/components/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint(no-unused-vars)

Type 'SplitViewId' is imported but never used.
} from "../splitViewStore";
import { THREAD_DRAG_MIME } from "./chat-drop-overlay/ChatPaneDropOverlay";
import { useTemporaryThreadStore } from "../temporaryThreadStore";
Expand Down Expand Up @@ -1988,7 +1988,7 @@
});
if (snapshot) {
syncServerShellSnapshot(snapshot);
}

Check warning on line 1991 in apps/web/src/components/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint-plugin-react-hooks(exhaustive-deps)

React Hook useCallback has a missing dependency: 'syncServerShellSnapshot'
if (project && snapshot) {
const recovered = await openExistingProjectFromSnapshot(project.id, snapshot);
if (recovered) {
Expand All @@ -2011,7 +2011,7 @@

setIsAddingProject(false);
throw new Error(ADD_PROJECT_EXISTING_SYNC_ERROR);
} catch (recoveryError) {

Check warning on line 2014 in apps/web/src/components/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint(preserve-caught-error)

There is no cause error attached to this new thrown error.
setIsAddingProject(false);
throw recoveryError;
}
Expand Down Expand Up @@ -3435,7 +3435,7 @@
return byProjectId;
}, [appSettings.sidebarThreadSortOrder, sidebarThreadsByProjectId]);
const resolveSplitPreview = useCallback(
(threadId: ThreadId | null): SidebarSplitPreview => {

Check warning on line 3438 in apps/web/src/components/Sidebar.tsx

View workflow job for this annotation

GitHub Actions / Format, Lint, Typecheck, Test, Browser Test, Build

eslint(no-unused-vars)

Variable 'resolveSplitPreview' is declared but never used. Unused variables should start with a '_'.
const thread = threadId ? (sidebarThreadSummaryById[threadId] ?? null) : null;
const draftProvider =
threadId && composerDraftsByThreadId[threadId]?.activeProvider
Expand Down Expand Up @@ -5782,22 +5782,26 @@
{!showManualPathInput ? (
<div className="space-y-1.5">
{projectFolderPath ? (
<div className="space-y-1">
<div className="overflow-hidden rounded-xl border border-[color:var(--app-chat-chip-border,var(--color-border))] bg-[linear-gradient(180deg,rgba(255,255,255,0.055),rgba(255,255,255,0.018)),var(--color-background-elevated-secondary)] shadow-[inset_0_1px_0_rgba(255,255,255,0.075),0_12px_28px_rgba(0,0,0,0.18)]">
{projectFolderSuggestions.map((suggestion) => (
<button
key={suggestion.path}
type="button"
className="flex w-full min-w-0 items-center gap-2 rounded-lg bg-[var(--color-background-elevated-secondary)] px-2 py-1.5 text-left text-[length:var(--app-font-size-ui,12px)] text-[var(--color-text-foreground-secondary)] transition-colors hover:bg-[var(--color-background-button-secondary-hover)] hover:text-[var(--color-text-foreground)] disabled:opacity-50"
className="group flex w-full min-w-0 items-center gap-2.5 border-b border-[color:var(--color-border-light)]/55 px-2.5 py-2 text-left text-[length:var(--app-font-size-ui,12px)] text-[var(--color-text-foreground-secondary)] transition-colors last:border-b-0 hover:bg-[var(--color-background-button-secondary-hover)]/85 hover:text-[var(--color-text-foreground)] focus-visible:bg-[var(--color-background-button-secondary-hover)] focus-visible:text-[var(--color-text-foreground)] focus-visible:outline-none disabled:opacity-50"
title={suggestion.path}
onClick={() => void addProjectFromPath(suggestion.path)}
disabled={isAddingProject}
>
<FolderIcon className="size-3.5 shrink-0" />
<span className="min-w-0 flex-1 truncate">{suggestion.name}</span>
<span className="flex size-5 shrink-0 items-center justify-center rounded-md border border-[color:var(--app-chat-chip-border,var(--color-border))] bg-[var(--composer-surface)]/60 text-[var(--color-text-foreground-tertiary)] shadow-[inset_0_1px_0_rgba(255,255,255,0.055)] transition-colors group-hover:border-[color:var(--color-border)] group-hover:text-[var(--color-text-foreground-secondary)]">
<FolderIcon className="size-3.5" />
</span>
<span className="min-w-0 flex-1 truncate tracking-[0.01em]">
{suggestion.name}
</span>
</button>
))}
{projectFolderSuggestions.length === 0 ? (
<div className="rounded-lg border border-dashed border-[color:var(--color-border)] px-2 py-2 text-[length:var(--app-font-size-ui,12px)] leading-tight text-muted-foreground/70">
<div className="px-2.5 py-2 text-[length:var(--app-font-size-ui,12px)] leading-tight text-muted-foreground/70">
{projectFolderDirectoriesQuery.isFetching
? "Loading Project Folder suggestions..."
: projectFolderSuggestionsError
Expand All @@ -5822,7 +5826,7 @@
{isElectron && (
<button
type="button"
className="flex h-8 flex-1 items-center justify-center gap-2 rounded-lg bg-[var(--color-background-elevated-secondary)] px-2 text-[length:var(--app-font-size-ui,12px)] font-normal text-[var(--color-text-foreground-secondary)] transition-colors hover:bg-[var(--color-background-button-secondary-hover)] hover:text-[var(--color-text-foreground)] disabled:opacity-50"
className="flex h-8 flex-1 items-center justify-center gap-2 rounded-lg border border-[color:var(--app-chat-chip-border,var(--color-border))] bg-[var(--color-background-elevated-secondary)]/35 px-2 text-[length:var(--app-font-size-ui,12px)] font-medium text-[var(--color-text-foreground-secondary)] shadow-[inset_0_1px_0_rgba(255,255,255,0.045)] transition-colors hover:bg-[var(--color-background-button-secondary-hover)] hover:text-[var(--color-text-foreground)] disabled:opacity-50"
onClick={() => void handlePickFolder()}
disabled={isPickingFolder || isAddingProject}
>
Expand All @@ -5836,7 +5840,7 @@
)}
<button
type="button"
className="flex h-8 flex-1 items-center justify-center gap-2 rounded-lg bg-[var(--color-background-elevated-secondary)] px-2 text-[length:var(--app-font-size-ui,12px)] font-normal text-[var(--color-text-foreground-secondary)] transition-colors hover:bg-[var(--color-background-button-secondary-hover)] hover:text-[var(--color-text-foreground)]"
className="flex h-8 flex-1 items-center justify-center gap-2 rounded-lg border border-[color:var(--app-chat-chip-border,var(--color-border))] bg-[var(--color-background-elevated-secondary)]/35 px-2 text-[length:var(--app-font-size-ui,12px)] font-medium text-[var(--color-text-foreground-secondary)] shadow-[inset_0_1px_0_rgba(255,255,255,0.045)] transition-colors hover:bg-[var(--color-background-button-secondary-hover)] hover:text-[var(--color-text-foreground)]"
onClick={() => setShowManualPathInput(true)}
>
<TbCursorText className="size-3.5" />
Expand Down
Loading