Skip to content
Open
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
14 changes: 12 additions & 2 deletions apps/mesh/src/web/hooks/use-project-sidebar-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {
SidebarSection,
} from "@/web/components/sidebar/types";
import { useNavigate, useRouterState } from "@tanstack/react-router";
import { Folder, Home01 } from "@untitledui/icons";
import { Columns03, Folder, Home01 } from "@untitledui/icons";
import {
SidebarGroup,
SidebarGroupContent,
Expand Down Expand Up @@ -32,6 +32,16 @@ export function useProjectSidebarItems(): SidebarSection[] {
},
};

const tasksItem: NavigationSidebarItem = {
key: "tasks",
label: "Tasks",
icon: <Columns03 className="size-4!" />,
isActive: pathname.startsWith(`/${slug}/tasks`),
onClick: () => {
navigate({ to: "/$org/tasks", params: { org: slug } });
},
};

const filesItem: NavigationSidebarItem = {
key: "files",
label: "Library",
Expand All @@ -43,7 +53,7 @@ export function useProjectSidebarItems(): SidebarSection[] {
};

const sections: SidebarSection[] = [
{ type: "items", items: [homeItem, filesItem] },
{ type: "items", items: [homeItem, tasksItem, filesItem] },
];

if (isCollapsed) {
Expand Down
10 changes: 10 additions & 0 deletions apps/mesh/src/web/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,15 @@ const libraryRoute = createRoute({
component: lazyRouteComponent(() => import("./layouts/library/index.tsx")),
});

// Tasks board (/$org/tasks) — the org's tasks as a kanban or list.
const tasksRoute = createRoute({
getParentRoute: () => orgShellLayout,
path: "/tasks",
component: lazyRouteComponent(
() => import("./layouts/tasks-board/index.tsx"),
),
});

// ============================================
// SETTINGS LAYOUT (/$org/settings)
// ============================================
Expand Down Expand Up @@ -615,6 +624,7 @@ const agentShellWithChildren = agentShellLayout.addChildren([
const orgShellWithChildren = orgShellLayout.addChildren([
orgIndexRoute,
libraryRoute,
tasksRoute,
agentShellWithChildren,
]);

Expand Down
Loading
Loading