MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / activeLeaf

Function activeLeaf

packages/app-core/src/store.test.ts:692–696  ·  view source on GitHub ↗
(store: { paneLayout: PaneLayout; activePaneId: string })

Source from the content-addressed store, hash-verified

690
691describe('preview tabs (VS Code-style open flow)', () => {
692 function activeLeaf(store: { paneLayout: PaneLayout; activePaneId: string }): PaneLeaf {
693 const leaf = findLeaf(store.paneLayout, store.activePaneId)
694 if (!leaf) throw new Error('no active leaf')
695 return leaf
696 }
697
698 it('previews replace each other; a permanent re-open promotes the preview', async () => {
699 const noteA = { ...makeNote('alpha'), path: 'inbox/A.md', title: 'A' }

Callers 1

store.test.tsFile · 0.85

Calls 1

findLeafFunction · 0.90

Tested by

no test coverage detected