Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ brew tap Jay1/jcode https://github.com/Jay1/jcode
brew install --cask jcode
```

#### Download the latest macOS
#### Download the latest macOS

`JCode-<version>-arm64.dmg` or
`JCode-<version>-x64.dmg`, or the latest Linux `JCode-<version>-x64.AppImage`, from
[GitHub Releases](https://github.com/Jay1/jcode/releases).

### Windows

#### Scoop
#### Scoop

If you do not have Scoop yet, follow the [official Scoop installation guide](https://scoop.sh/):

Expand All @@ -42,7 +42,7 @@ scoop bucket add jcode https://github.com/Jay1/scoop-jcode
scoop install jcode
```

#### Winget
#### Winget

```powershell
winget install Jay1.JCode
Expand Down
20 changes: 20 additions & 0 deletions apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
import {
Menu,
MenuGroup,
MenuItem,

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.
MenuPopup,
MenuRadioGroup,
MenuRadioItem,
Expand Down Expand Up @@ -233,7 +233,7 @@
resolveSplitViewFocusedThreadId,
resolveSplitViewPaneIdForThread,
selectSplitView,
type SplitViewId,

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.
useSplitViewStore,
} from "../splitViewStore";
import { THREAD_DRAG_MIME } from "./chat-drop-overlay/ChatPaneDropOverlay";
Expand Down Expand Up @@ -270,6 +270,7 @@
easing: "ease-out",
} as const;
const EMPTY_THREAD_JUMP_LABELS = new Map<ThreadId, string>();
const EMPTY_PROJECT_EXPANDED_MAP = new Map<string, boolean>();
const EMPTY_SHORTCUT_PARTS: readonly string[] = [];
const ADD_PROJECT_SNAPSHOT_CATCH_UP_MAX_ATTEMPTS = 6;
const ADD_PROJECT_SNAPSHOT_CATCH_UP_DELAY_MS = 50;
Expand Down Expand Up @@ -1988,7 +1989,7 @@
delayMs: ADD_PROJECT_SNAPSHOT_CATCH_UP_DELAY_MS,
});
if (snapshot) {
syncServerShellSnapshot(snapshot);

Check warning on line 1992 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);
Expand All @@ -2011,7 +2012,7 @@
}

setIsAddingProject(false);
throw new Error(ADD_PROJECT_EXISTING_SYNC_ERROR);

Check warning on line 2015 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.
} catch (recoveryError) {
setIsAddingProject(false);
throw recoveryError;
Expand Down Expand Up @@ -3435,7 +3436,7 @@
}
return byProjectId;
}, [appSettings.sidebarThreadSortOrder, sidebarThreadsByProjectId]);
const resolveSplitPreview = useCallback(

Check warning on line 3439 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 '_'.
(threadId: ThreadId | null): SidebarSplitPreview => {
const thread = threadId ? (sidebarThreadSummaryById[threadId] ?? null) : null;
const draftProvider =
Expand Down Expand Up @@ -3572,7 +3573,26 @@
);

// Reset per-project preview expansion when a folder closes so reopening starts at five rows again.
const previousProjectExpandedRef = useRef<ReadonlyMap<string, boolean>>(
EMPTY_PROJECT_EXPANDED_MAP,
);
useEffect(() => {
const nextExpanded = new Map(
standardProjects.map((project) => [project.cwd, project.expanded] as const),
);
const prev = previousProjectExpandedRef.current;
let expandedChanged = nextExpanded.size !== prev.size;
if (!expandedChanged) {
for (const [cwd, expanded] of nextExpanded) {
if (prev.get(cwd) !== expanded) {
expandedChanged = true;
break;
}
}
}
previousProjectExpandedRef.current = nextExpanded;
if (!expandedChanged) return;

setExpandedThreadListsByProject((current) =>
pruneExpandedProjectThreadListsForCollapsedProjects({
expandedProjectThreadListCwds: current,
Expand Down
Loading