diff --git a/apps/web/ce/components/command-palette/helpers.tsx b/apps/web/ce/components/command-palette/helpers.tsx
index 865aa9e53fe..1ad7e6f4983 100644
--- a/apps/web/ce/components/command-palette/helpers.tsx
+++ b/apps/web/ce/components/command-palette/helpers.tsx
@@ -93,7 +93,7 @@ export const commandGroups: TCommandGroups = {
if (!!projectId && page?.project_ids?.includes(projectId)) redirectProjectId = projectId;
return redirectProjectId
? `/${page?.workspace__slug}/projects/${redirectProjectId}/pages/${page?.id}`
- : `/${page?.workspace__slug}/pages/${page?.id}`;
+ : `/${page?.workspace__slug}/wiki/${page?.id}`;
},
title: "Pages",
},
diff --git a/apps/web/ce/components/command-palette/index.ts b/apps/web/ce/components/command-palette/index.ts
index 62404249d75..cb220b2bd92 100644
--- a/apps/web/ce/components/command-palette/index.ts
+++ b/apps/web/ce/components/command-palette/index.ts
@@ -1,3 +1,2 @@
export * from "./actions";
-export * from "./modals";
export * from "./helpers";
diff --git a/apps/web/ce/components/command-palette/modals/index.ts b/apps/web/ce/components/command-palette/modals/index.ts
deleted file mode 100644
index a4fac4b91ef..00000000000
--- a/apps/web/ce/components/command-palette/modals/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from "./workspace-level";
-export * from "./project-level";
-export * from "./issue-level";
diff --git a/apps/web/ce/components/command-palette/modals/issue-level.tsx b/apps/web/ce/components/command-palette/modals/work-item-level.tsx
similarity index 75%
rename from apps/web/ce/components/command-palette/modals/issue-level.tsx
rename to apps/web/ce/components/command-palette/modals/work-item-level.tsx
index f720e38ea35..d06602d7e25 100644
--- a/apps/web/ce/components/command-palette/modals/issue-level.tsx
+++ b/apps/web/ce/components/command-palette/modals/work-item-level.tsx
@@ -15,21 +15,23 @@ import { useUser } from "@/hooks/store/user";
import { useAppRouter } from "@/hooks/use-app-router";
import { useIssuesActions } from "@/hooks/use-issues-actions";
-export type TIssueLevelModalsProps = {
- projectId: string | undefined;
- issueId: string | undefined;
+export type TWorkItemLevelModalsProps = {
+ workItemIdentifier: string | undefined;
};
-export const IssueLevelModals: FC
= observer((props) => {
- const { projectId, issueId } = props;
+export const WorkItemLevelModals: FC = observer((props) => {
+ const { workItemIdentifier } = props;
// router
const { workspaceSlug, cycleId, moduleId } = useParams();
const router = useAppRouter();
// store hooks
const { data: currentUser } = useUser();
const {
- issue: { getIssueById },
+ issue: { getIssueById, getIssueIdByIdentifier },
} = useIssueDetail();
+ // derived values
+ const workItemId = workItemIdentifier ? getIssueIdByIdentifier(workItemIdentifier) : undefined;
+ const workItemDetails = workItemId ? getIssueById(workItemId) : undefined;
const { removeIssue: removeEpic } = useIssuesActions(EIssuesStoreType.EPIC);
const { removeIssue: removeWorkItem } = useIssuesActions(EIssuesStoreType.PROJECT);
@@ -44,13 +46,12 @@ export const IssueLevelModals: FC = observer((props) =>
createWorkItemAllowedProjectIds,
} = useCommandPalette();
// derived values
- const issueDetails = issueId ? getIssueById(issueId) : undefined;
const { fetchSubIssues: fetchSubWorkItems } = useIssueDetail();
const { fetchSubIssues: fetchEpicSubWorkItems } = useIssueDetail(EIssueServiceType.EPICS);
const handleDeleteIssue = async (workspaceSlug: string, projectId: string, issueId: string) => {
try {
- const isEpic = issueDetails?.is_epic;
+ const isEpic = workItemDetails?.is_epic;
const deleteAction = isEpic ? removeEpic : removeWorkItem;
const redirectPath = `/${workspaceSlug}/projects/${projectId}/${isEpic ? "epics" : "issues"}`;
@@ -62,10 +63,10 @@ export const IssueLevelModals: FC = observer((props) =>
};
const handleCreateIssueSubmit = async (newIssue: TIssue) => {
- if (!workspaceSlug || !newIssue.project_id || !newIssue.id || newIssue.parent_id !== issueDetails?.id) return;
+ if (!workspaceSlug || !newIssue.project_id || !newIssue.id || newIssue.parent_id !== workItemDetails?.id) return;
- const fetchAction = issueDetails?.is_epic ? fetchEpicSubWorkItems : fetchSubWorkItems;
- await fetchAction(workspaceSlug?.toString(), newIssue.project_id, issueDetails.id);
+ const fetchAction = workItemDetails?.is_epic ? fetchEpicSubWorkItems : fetchSubWorkItems;
+ await fetchAction(workspaceSlug?.toString(), newIssue.project_id, workItemDetails.id);
};
const getCreateIssueModalData = () => {
@@ -83,13 +84,15 @@ export const IssueLevelModals: FC = observer((props) =>
onSubmit={handleCreateIssueSubmit}
allowedProjectIds={createWorkItemAllowedProjectIds}
/>
- {workspaceSlug && projectId && issueId && issueDetails && (
+ {workspaceSlug && workItemId && workItemDetails && workItemDetails.project_id && (
toggleDeleteIssueModal(false)}
isOpen={isDeleteIssueModalOpen}
- data={issueDetails}
- onSubmit={() => handleDeleteIssue(workspaceSlug.toString(), projectId?.toString(), issueId?.toString())}
- isEpic={issueDetails?.is_epic}
+ data={workItemDetails}
+ onSubmit={() =>
+ handleDeleteIssue(workspaceSlug.toString(), workItemDetails.project_id!, workItemId?.toString())
+ }
+ isEpic={workItemDetails?.is_epic}
/>
)}
= {};
diff --git a/apps/web/ce/components/command-palette/power-k/context-detector.ts b/apps/web/ce/components/command-palette/power-k/context-detector.ts
new file mode 100644
index 00000000000..acc803bdc87
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/context-detector.ts
@@ -0,0 +1,5 @@
+import type { Params } from "next/dist/shared/lib/router/utils/route-matcher";
+// local imports
+import type { TPowerKContextTypeExtended } from "./types";
+
+export const detectExtendedContextFromURL = (_params: Params): TPowerKContextTypeExtended | null => null;
diff --git a/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts b/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts
new file mode 100644
index 00000000000..ad5f43860b9
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/hooks/use-extended-context-indicator.ts
@@ -0,0 +1,8 @@
+// local imports
+import type { TPowerKContextTypeExtended } from "../types";
+
+type TArgs = {
+ activeContext: TPowerKContextTypeExtended | null;
+};
+
+export const useExtendedContextIndicator = (_args: TArgs): string | null => null;
diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts b/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts
new file mode 100644
index 00000000000..1efe34c51ec
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/pages/context-based/index.ts
@@ -0,0 +1 @@
+export * from "./root";
diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx b/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx
new file mode 100644
index 00000000000..2c6c0e8913d
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/pages/context-based/root.tsx
@@ -0,0 +1,11 @@
+// components
+import type { TPowerKCommandConfig } from "@/components/power-k/core/types";
+import type { ContextBasedActionsProps, TContextEntityMap } from "@/components/power-k/ui/pages/context-based";
+// local imports
+import type { TPowerKContextTypeExtended } from "../../types";
+
+export const CONTEXT_ENTITY_MAP_EXTENDED: Record = {};
+
+export const PowerKContextBasedActionsExtended: React.FC = () => null;
+
+export const usePowerKContextBasedExtendedActions = (): TPowerKCommandConfig[] => [];
diff --git a/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx b/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx
new file mode 100644
index 00000000000..5fbc91edf8b
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/pages/context-based/work-item/state-menu-item.tsx
@@ -0,0 +1,34 @@
+"use client";
+
+import { observer } from "mobx-react";
+// plane types
+import { StateGroupIcon } from "@plane/propel/icons";
+import type { IState } from "@plane/types";
+// components
+import { PowerKModalCommandItem } from "@/components/power-k/ui/modal/command-item";
+
+export type TPowerKProjectStatesMenuItemsProps = {
+ handleSelect: (stateId: string) => void;
+ projectId: string | undefined;
+ selectedStateId: string | undefined;
+ states: IState[];
+ workspaceSlug: string;
+};
+
+export const PowerKProjectStatesMenuItems: React.FC = observer((props) => {
+ const { handleSelect, selectedStateId, states } = props;
+
+ return (
+ <>
+ {states.map((state) => (
+ }
+ label={state.name}
+ isSelected={state.id === selectedStateId}
+ onSelect={() => handleSelect(state.id)}
+ />
+ ))}
+ >
+ );
+});
diff --git a/apps/web/ce/components/command-palette/power-k/search/no-results-command.tsx b/apps/web/ce/components/command-palette/power-k/search/no-results-command.tsx
new file mode 100644
index 00000000000..cc8ca10d513
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/search/no-results-command.tsx
@@ -0,0 +1,36 @@
+import { Command } from "cmdk";
+import { Search } from "lucide-react";
+// plane imports
+import { useTranslation } from "@plane/i18n";
+// components
+import type { TPowerKContext } from "@/components/power-k/core/types";
+// plane web imports
+import { PowerKModalCommandItem } from "@/components/power-k/ui/modal/command-item";
+
+export type TPowerKModalNoSearchResultsCommandProps = {
+ context: TPowerKContext;
+ searchTerm: string;
+ updateSearchTerm: (value: string) => void;
+};
+
+export const PowerKModalNoSearchResultsCommand: React.FC = (props) => {
+ const { updateSearchTerm } = props;
+ // translation
+ const { t } = useTranslation();
+
+ return (
+
+
+ {t("power_k.search_menu.no_results")}{" "}
+ {t("power_k.search_menu.clear_search")}
+
+ }
+ onSelect={() => updateSearchTerm("")}
+ />
+
+ );
+};
diff --git a/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx b/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx
new file mode 100644
index 00000000000..c09dd41a10b
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/search/search-results-map.tsx
@@ -0,0 +1,10 @@
+"use client";
+
+// components
+import type { TPowerKSearchResultGroupDetails } from "@/components/power-k/ui/modal/search-results-map";
+// local imports
+import type { TPowerKSearchResultsKeysExtended } from "../types";
+
+type TSearchResultsGroupsMapExtended = Record;
+
+export const SEARCH_RESULTS_GROUPS_MAP_EXTENDED: TSearchResultsGroupsMapExtended = {};
diff --git a/apps/web/ce/components/command-palette/power-k/types.ts b/apps/web/ce/components/command-palette/power-k/types.ts
new file mode 100644
index 00000000000..4e497f8b87a
--- /dev/null
+++ b/apps/web/ce/components/command-palette/power-k/types.ts
@@ -0,0 +1,5 @@
+export type TPowerKContextTypeExtended = never;
+
+export type TPowerKPageTypeExtended = never;
+
+export type TPowerKSearchResultsKeysExtended = never;
diff --git a/apps/web/ce/components/workspace/sidebar/app-search.tsx b/apps/web/ce/components/workspace/sidebar/app-search.tsx
index 9e0f4cd9557..89d2607cf80 100644
--- a/apps/web/ce/components/workspace/sidebar/app-search.tsx
+++ b/apps/web/ce/components/workspace/sidebar/app-search.tsx
@@ -1,20 +1,21 @@
import { observer } from "mobx-react";
// plane imports
import { useTranslation } from "@plane/i18n";
-// hooks
+// components
import { SidebarSearchButton } from "@/components/sidebar/search-button";
-import { useCommandPalette } from "@/hooks/store/use-command-palette";
+// hooks
+import { usePowerK } from "@/hooks/store/use-power-k";
export const AppSearch = observer(() => {
// store hooks
- const { toggleCommandPaletteModal } = useCommandPalette();
+ const { togglePowerKModal } = usePowerK();
// translation
const { t } = useTranslation();
return (
-