{"record":{"id":"dc1114ad4f0758bc","repo":"stablyai/orca","slug":"concrete-linear-workspace-id-is-required","errorCode":null,"errorMessage":"Concrete Linear workspace ID is required","messagePattern":"Concrete Linear workspace ID is required","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/main/ipc/linear.ts","lineNumber":49,"sourceCode":"  LinearIssueUpdate,\n  LinearWorkspaceSelection\n} from '../../shared/types'\n\nconst VALID_FILTERS = new Set<LinearListFilter>(['assigned', 'created', 'all', 'completed'])\n\nfunction normalizeWorkspaceId(value: unknown): string | undefined {\n  return typeof value === 'string' && value.trim() ? value.trim() : undefined\n}\n\nfunction normalizeWorkspaceSelection(value: unknown): LinearWorkspaceSelection | undefined {\n  const workspaceId = normalizeWorkspaceId(value)\n  return workspaceId as LinearWorkspaceSelection | undefined\n}\n\nfunction normalizeConcreteWorkspaceId(value: unknown): string {\n  const workspaceId = normalizeWorkspaceId(value)\n  if (!workspaceId || workspaceId === 'all') {\n    throw new Error('Concrete Linear workspace ID is required')\n  }\n  return workspaceId\n}\n\nfunction normalizeCustomViewModel(value: unknown): LinearCustomViewModel {\n  if (value !== 'issue' && value !== 'project') {\n    throw new Error('Custom view model is required')\n  }\n  return value\n}\n\nfunction normalizeIdList(value: unknown, fieldName: string): string[] | undefined {\n  if (value === undefined) {\n    return undefined\n  }\n  if (\n    !Array.isArray(value) ||\n    !value.every((id): id is string => typeof id === 'string' && Boolean(id.trim()))","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/main/ipc/linear.ts#L31-L67","documentation":"Thrown by normalizeConcreteWorkspaceId when the Linear workspaceId is missing, blank, or the sentinel value 'all'. Some Linear IPC operations require a single concrete workspace because they query workspace-scoped resources (a specific project, custom view, or issue list) that cannot be resolved across all workspaces. The 'all' sentinel is valid for listing operations but not for single-resource fetches.","triggerScenarios":"Calling a Linear IPC method that internally uses normalizeConcreteWorkspaceId (e.g. linear:getProject, linear:listProjectIssues, linear:getCustomView) without a workspaceId, with an empty string, or with the value 'all'. The renderer omits workspaceId assuming a default, or passes the multi-workspace 'all' selection from a workspace picker.","commonSituations":"User selected 'All workspaces' in the UI picker but invoked a single-resource action. workspaceId was not propagated from the parent component. A new Linear account with workspace selection state defaulting to 'all'.","solutions":["Pass a specific Linear workspace UUID/string, not 'all' and not empty.","In the UI, disable single-resource actions when the workspace picker is set to 'All workspaces', or auto-select the first workspace.","Ensure the workspace selection state is threaded through to every IPC call site that needs a concrete ID."],"exampleFix":"// before\nawait ipc.call('linear:getProject', { id, workspaceId: selectedWorkspace }) // selectedWorkspace === 'all'\n\n// after\nif (selectedWorkspace === 'all') throw new Error('Select a single workspace first')\nawait ipc.call('linear:getProject', { id, workspaceId: selectedWorkspace })","handlingStrategy":"type-guard","validationCode":"if (typeof workspaceId !== 'string' || !workspaceId.trim() || workspaceId === 'all') {\n  throw new Error('Select a single Linear workspace')\n}","typeGuard":"function isConcreteWorkspaceId(value: unknown): value is string {\n  return typeof value === 'string' && value.trim().length > 0 && value !== 'all'\n}","tryCatchPattern":null,"preventionTips":["Disable single-resource Linear actions when the workspace picker is 'all'.","Thread the concrete workspaceId through every IPC call that requires one.","Default the workspace picker to a single workspace, not 'all', for detail views."],"tags":["linear","validation","workspace","ipc"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}