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

Function isDatabaseSurfaceTabPath

packages/app-core/src/store.ts:1119–1123  ·  view source on GitHub ↗

* A database surface that can be the active tab: either a `zen://database/…` * tab (opened via "New Database") or a `.csv` opened directly as an asset tab * (`zen://asset/Foo.csv`), which EditorPane renders as a database grid. Both * must round-trip through the note jump history so Ctrl+O returns

(path: string | null | undefined)

Source from the content-addressed store, hash-verified

1117 * must round-trip through the note jump history so Ctrl+O returns to the grid.
1118 */
1119function isDatabaseSurfaceTabPath(path: string | null | undefined): path is string {
1120 if (!path) return false
1121 if (isDatabaseTabPath(path)) return true
1122 return isAssetTabPath(path) && isDatabaseCsvPath(assetPathFromTab(path) ?? '')
1123}
1124
1125/**
1126 * Tabs worth recording in the note jump history (Ctrl+O / Ctrl+I): real notes,

Callers 2

isJumpHistoryTabPathFunction · 0.85
jumpThroughNoteHistoryFunction · 0.85

Calls 4

isDatabaseTabPathFunction · 0.90
isAssetTabPathFunction · 0.90
isDatabaseCsvPathFunction · 0.90
assetPathFromTabFunction · 0.90

Tested by

no test coverage detected