Skip to content
Closed
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
10 changes: 6 additions & 4 deletions apps/mobile/src/features/home/HomeRouteScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ export function HomeRouteScreen() {
projects,
environmentId: selectedEnvironmentId,
projectGroupingMode: listOptions.projectGroupingMode,
}).map((scope) => ({
key: scope.key,
label: scope.title,
})),
})
.map((scope) => ({
key: scope.key,
label: scope.title,
}))
.toSorted((left, right) => left.label.localeCompare(right.label)),
[listOptions.projectGroupingMode, projects, selectedEnvironmentId],
);
useEffect(() => {
Expand Down
10 changes: 6 additions & 4 deletions apps/mobile/src/features/threads/ThreadNavigationSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,12 @@ function ThreadNavigationSidebarPane(
);
const projectFilterOptions = useMemo(
() =>
projectScopes.map((scope) => ({
key: scope.key,
label: scope.title,
})),
projectScopes
.map((scope) => ({
key: scope.key,
label: scope.title,
}))
.toSorted((left, right) => left.label.localeCompare(right.label)),
[projectScopes],
);
const projectTitleByProjectKey = useMemo(
Expand Down
7 changes: 6 additions & 1 deletion apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1864,6 +1864,11 @@ export default function Sidebar() {
() => sortLogicalProjectsForSidebar(unsortedProjectGroups, threads, sidebarProjectSortOrder),
[sidebarProjectSortOrder, threads, unsortedProjectGroups],
);
const projectScopeMenuGroups = useMemo(
() =>
projectGroups.toSorted((left, right) => left.displayName.localeCompare(right.displayName)),
[projectGroups],
);
const serverConfigs = useAtomValue(environmentServerConfigsAtom);
// Threads on non-primary environments (T3 Connect, hosted) resolve their
// provider entry from their own environment's config: default instance ids
Expand Down Expand Up @@ -3513,7 +3518,7 @@ export default function Sidebar() {
<FolderIcon className="size-4 shrink-0" />
<span className="min-w-0 truncate text-sm">All projects</span>
</MenuRadioItem>
{projectGroups.map((project) => {
{projectScopeMenuGroups.map((project) => {
const scopeKey = project.projectKey;
return (
<MenuRadioItem
Expand Down
Loading