(state: {
paneLayout: PaneLayout
activePaneId: string
})
| 1806 | * panel lives as a tab in the pane layout, so this is how callers detect |
| 1807 | * "user is on the Tasks view" (there's no `view.kind === 'tasks'`). */ |
| 1808 | export function isTasksViewActive(state: { |
| 1809 | paneLayout: PaneLayout |
| 1810 | activePaneId: string |
| 1811 | }): boolean { |
| 1812 | const leaf = findLeaf(state.paneLayout, state.activePaneId) |
| 1813 | return leaf?.activeTab === TASKS_TAB_PATH |
| 1814 | } |
| 1815 | |
| 1816 | function hasTasksViewOpen(state: { paneLayout: PaneLayout }): boolean { |
| 1817 | return allLeaves(state.paneLayout).some((leaf) => leaf.tabs.includes(TASKS_TAB_PATH)) |
no test coverage detected