mirror of
https://github.com/stablyai/orca.git
synced 2026-10-25 08:04:05 +00:00
fix(linear): apply search filter in 'in-orca' mode to prevent drops
- Apply search filter in 'in-orca' mode even without active context label to prevent team filters from silently hiding linked tickets (no "Fetch more" recovery path) - Add aria-label to workspace-open button for accessibility - Update tooltip from "local worktree" to "Orca workspace" - Reorganize i18n: move workspace.open from lib.linear to components.issue - Expand test coverage for workspace start and activation scenarios
This commit is contained in:
@@ -1040,6 +1040,10 @@ export default function LinearIssueWorkspace({
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleOpenOrUseIssue}
|
||||
aria-label={translate(
|
||||
'auto.components.LinearIssueWorkspace.openAttachedWorkspace',
|
||||
'Open workspace attached to issue'
|
||||
)}
|
||||
className="flex min-h-9 w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-muted-foreground transition hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
||||
>
|
||||
<FolderOpen className="size-4 shrink-0" />
|
||||
|
||||
@@ -5244,7 +5244,9 @@ export default function TaskPage(): React.JSX.Element {
|
||||
linearMode === 'in-orca'
|
||||
? filterLinearIssuesBySearchQuery(displayedLinearIssues, appliedLinearSearch)
|
||||
: displayedLinearIssues
|
||||
if (activeLinearIssueContextLabel) {
|
||||
// Why: 'in-orca' is scoped by local workspace links, not by team, and it has no "Fetch more" —
|
||||
// a team filter would silently drop a linked ticket with no way to recover it.
|
||||
if (activeLinearIssueContextLabel || linearMode === 'in-orca') {
|
||||
return searchedIssues
|
||||
}
|
||||
// Why: team options can arrive after issue rows render; treat an empty selection as "all" until reconciliation sets teams.
|
||||
@@ -8794,7 +8796,7 @@ export default function TaskPage(): React.JSX.Element {
|
||||
<TooltipContent side="bottom" sideOffset={6}>
|
||||
{translate(
|
||||
'auto.components.TaskPage.linearModeHasWorktreeTooltip',
|
||||
'Linear tickets linked to a local Orca worktree'
|
||||
'Linear tickets linked to an Orca workspace'
|
||||
)}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
|
||||
@@ -302,15 +302,6 @@
|
||||
}
|
||||
},
|
||||
"lib": {
|
||||
"linear": {
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "No se pudo abrir el espacio de trabajo vinculado a este issue."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"agent": {
|
||||
"catalog": {
|
||||
"5dff448636": "OpenClaw",
|
||||
@@ -638,6 +629,13 @@
|
||||
"triageFollowupsSummary": "Set assignee, priority, or estimate, and file parented follow-up tickets.",
|
||||
"triageFollowupsPrompt": "Use {{value0}} to triage the linked Linear issue — set priority and estimate — and create a parented follow-up ticket for the deferred cleanup."
|
||||
}
|
||||
},
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "No se pudo abrir el espacio de trabajo vinculado a este issue."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codex": {
|
||||
|
||||
@@ -302,15 +302,6 @@
|
||||
}
|
||||
},
|
||||
"lib": {
|
||||
"linear": {
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "このイシューにリンクされたワークスペースを開けませんでした。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"agent": {
|
||||
"catalog": {
|
||||
"5dff448636": "OpenClaw",
|
||||
@@ -638,6 +629,13 @@
|
||||
"triageFollowupsSummary": "Set assignee, priority, or estimate, and file parented follow-up tickets.",
|
||||
"triageFollowupsPrompt": "Use {{value0}} to triage the linked Linear issue — set priority and estimate — and create a parented follow-up ticket for the deferred cleanup."
|
||||
}
|
||||
},
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "このイシューにリンクされたワークスペースを開けませんでした。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codex": {
|
||||
|
||||
@@ -302,15 +302,6 @@
|
||||
}
|
||||
},
|
||||
"lib": {
|
||||
"linear": {
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "이 이슈에 연결된 워크스페이스를 열 수 없습니다."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"agent": {
|
||||
"catalog": {
|
||||
"5dff448636": "OpenClaw",
|
||||
@@ -638,6 +629,13 @@
|
||||
"triageFollowupsSummary": "Set assignee, priority, or estimate, and file parented follow-up tickets.",
|
||||
"triageFollowupsPrompt": "Use {{value0}} to triage the linked Linear issue — set priority and estimate — and create a parented follow-up ticket for the deferred cleanup."
|
||||
}
|
||||
},
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "이 이슈에 연결된 워크스페이스를 열 수 없습니다."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codex": {
|
||||
|
||||
@@ -302,15 +302,6 @@
|
||||
}
|
||||
},
|
||||
"lib": {
|
||||
"linear": {
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "无法打开关联到此议题的工作区。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"agent": {
|
||||
"catalog": {
|
||||
"5dff448636": "OpenClaw",
|
||||
@@ -638,6 +629,13 @@
|
||||
"triageFollowupsSummary": "设置负责人、优先级或预估工时,并创建带父级关联的后续议题。",
|
||||
"triageFollowupsPrompt": "使用 {{value0}} 对关联的 Linear 议题进行分类处理 — 设置优先级和预估工时 — 并为延后清理创建带父级关联的后续议题。"
|
||||
}
|
||||
},
|
||||
"issue": {
|
||||
"workspace": {
|
||||
"open": {
|
||||
"4f2c1d8a3b": "无法打开关联到此议题的工作区。"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"codex": {
|
||||
|
||||
@@ -100,4 +100,21 @@ describe('openLinearIssueWorkspaceOrStart', () => {
|
||||
})
|
||||
expect(startWorkspace).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('starts a workspace when the issue has none attached', () => {
|
||||
const startWorkspace = vi.fn()
|
||||
|
||||
expect(openLinearIssueWorkspaceOrStart({ identifier: 'ENG-1' }, startWorkspace)).toBe('started')
|
||||
expect(startWorkspace).toHaveBeenCalledTimes(1)
|
||||
expect(mocks.activateAndRevealWorktree).not.toHaveBeenCalled()
|
||||
})
|
||||
|
||||
it('reports failure when activation is refused', () => {
|
||||
mocks.worktrees = [worktree()]
|
||||
mocks.activateAndRevealWorktree.mockReturnValue(false)
|
||||
const startWorkspace = vi.fn()
|
||||
|
||||
expect(openLinearIssueWorkspaceOrStart({ identifier: 'ENG-1' }, startWorkspace)).toBe('failed')
|
||||
expect(startWorkspace).not.toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user