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
1 change: 1 addition & 0 deletions apps/api/plane/app/views/search/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def filter_issues(self, query, slug, project_id, workspace_search):
"project__identifier",
"project_id",
"workspace__slug",
"state_id"
)[:100]

def filter_cycles(self, query, slug, project_id, workspace_search):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type { TPowerKSearchResultsKeys } from "@/components/power-k/core/types";
// plane web imports
import { SEARCH_RESULTS_GROUPS_MAP_EXTENDED } from "@/plane-web/components/command-palette/power-k/search/search-results-map";
import { IssueIdentifier } from "@/plane-web/components/issues/issue-details/issue-identifier";
import { StateDropdown } from "@/components/dropdowns/state/dropdown";

export type TPowerKSearchResultGroupDetails = {
icon?: React.ComponentType<{ className?: string }>;
Expand Down Expand Up @@ -43,7 +44,13 @@ export const POWER_K_SEARCH_RESULTS_GROUPS_MAP: Record<TPowerKSearchResultsKeys,
projectIdentifier={workItem.project__identifier}
issueSequenceId={workItem.sequence_id}
size="xs"
/>{" "}
/>
<StateDropdown
value={workItem?.state_id}
projectId={workItem?.project_id}
disabled={true}
buttonVariant="background-with-text"
/>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabled StateDropdown won't fetch missing project states

The StateDropdown component only fetches states when opened via onDropdownOpen, but since disabled={true} is set, the dropdown will never be opened. For workspace search results that include issues from multiple projects, if a project's states haven't been loaded into the store yet, the state will display fallback content (backlog icon and "State" text) instead of the actual state name and color. The codebase has a ReadonlyState component specifically designed for this read-only use case that fetches states on mount via useEffect.

Fix in Cursor Fix in Web

{workItem.name}
</div>
),
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export interface IWorkspaceIssueSearchResult {
sequence_id: number;
workspace__slug: string;
type_id: string;
state_id: string;
}

export interface IWorkspacePageSearchResult {
Expand Down