Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
1221adc
feat: add example data for the distributed bucket mock
St4NNi Oct 23, 2026
67c7cb9
feat: add the gated distributed bucket mock entry
St4NNi Oct 23, 2026
004c49f
feat: mock the preset and member choice of a distributed bucket
St4NNi Oct 23, 2026
d1058b2
feat: mock ranges, refresh and range requests of a new bucket
St4NNi Oct 23, 2026
2b04c51
feat: mock the create results with a failed member
St4NNi Oct 23, 2026
5cc2beb
feat: mock the members, ranges and degraded range of a bucket
St4NNi Oct 23, 2026
973bec3
feat: mock adding and removing a node of a bucket
St4NNi Oct 23, 2026
9ccc2c6
feat: mock the transfer of a range
St4NNi Oct 23, 2026
f6dc53b
feat: mock the deletion preview of a distributed bucket
St4NNi Oct 23, 2026
38d8af6
feat: mock the node glob warning for node-specific grants
St4NNi Oct 23, 2026
5c8ad1c
feat: mock the object view with global id and source details
St4NNi Oct 23, 2026
ffe0c3e
feat: mock the registration of an external collection
St4NNi Oct 23, 2026
8145fcf
feat: mock the combined search of datasets and files
St4NNi Oct 23, 2026
616c3e1
fix: keep the cache node out of the bakrep coordinators
St4NNi Oct 23, 2026
d3a1555
test: cover the permission and degraded range notices
St4NNi Oct 23, 2026
e22aed9
fix: link the mock pages to the buckets manual
St4NNi Oct 23, 2026
bf96fd7
refactor: remove the separate pages of the node mock
St4NNi Oct 23, 2026
0f545c4
refactor: move the mock gate into the node mock library
St4NNi Oct 23, 2026
84b3392
feat: list the example buckets next to the real buckets
St4NNi Oct 23, 2026
c6d7e81
feat: open an example bucket in the Data view
St4NNi Oct 23, 2026
6a28cb1
feat: show the global id and storage locations in file details
St4NNi Oct 23, 2026
478263b
test: stub the example bucket modules in the Data tests
St4NNi Oct 23, 2026
77ef2a4
feat: choose the nodes of a new bucket in the create flow
St4NNi Oct 23, 2026
372ce54
feat: show the result of each node in the create flow
St4NNi Oct 23, 2026
98b5554
feat: add the storage feature guide as a design preview
St4NNi Oct 23, 2026
3ba81ef
feat: link storage settings to the matching question of the guide
St4NNi Oct 23, 2026
428a9ff
feat: show the nodes and the sources of a bucket in its settings
St4NNi Oct 23, 2026
c7f117d
feat: add the node glob warning and the delete preview to bucket sett…
St4NNi Oct 23, 2026
6d181d5
feat: register a whole collection from the Add data dialog
St4NNi Oct 23, 2026
8c54d66
feat: show example file hits in the header search
St4NNi Oct 23, 2026
1555ad9
feat: hide the whole-bucket copy to another node while the mock is on
St4NNi Oct 23, 2026
8c7c686
chore: remove unused example data and old wording
St4NNi Oct 23, 2026
144e931
feat: add an ordinary example bucket
St4NNi Oct 23, 2026
0463b1c
feat: show the example buckets in the Data section without a session
St4NNi Oct 23, 2026
9f1aabf
feat: show mock values in the settings of an example bucket
St4NNi Oct 23, 2026
0f22444
feat: warn in the role builder about grants that miss nodes
St4NNi Oct 23, 2026
ba904fd
feat: browse example buckets in the folder view of the Data section
St4NNi Oct 23, 2026
0ba3c73
fix: list only nodes with bytes as storage locations and mark ETag di…
St4NNi Oct 23, 2026
064f3c3
feat: explain where the contents of a bucket come from in plain sente…
St4NNi Oct 23, 2026
0800df5
fix: show folder names in the file browser without the trailing slash
St4NNi Oct 23, 2026
6b1bbaa
fix: replace the word pinned with fixed content in the mock
St4NNi Oct 23, 2026
751f4c6
feat: add the database list to the Data section
St4NNi Oct 23, 2026
beff8b8
feat: offer the databases in Add data and the header search
St4NNi Oct 23, 2026
7cda240
feat: add the database list to the realm admin settings
St4NNi Oct 23, 2026
14eb326
feat: show file sources and copies of this bucket in bucket settings
St4NNi Oct 23, 2026
4c88853
feat: show the origin of a file and what the dataset editor adds from it
St4NNi Oct 23, 2026
bf2cc65
fix: add no origin entry for storage folders and show run links for j…
St4NNi Oct 23, 2026
598dd8e
fix: fit the databases table without horizontal scrolling
St4NNi Oct 23, 2026
1a83980
feat: show database buckets as a filter of the bucket list
St4NNi Oct 23, 2026
2e68731
feat: let realm admins grant who can create database buckets
St4NNi Oct 23, 2026
b579e7a
feat: mark and unmark a database bucket in bucket settings
St4NNi Oct 23, 2026
2dd3900
fix: show the database bucket heading once in bucket settings
St4NNi Oct 23, 2026
6c2ca6e
feat: describe databases with a linked dataset and rename them from d…
St4NNi Oct 23, 2026
658fa4b
feat: show linked parts and the datasets a file is part of
St4NNi Oct 23, 2026
3020d67
fix: keep linked parts live only and limit what a linked database covers
St4NNi Oct 23, 2026
da20c5a
feat: group the example file details and keep the long parts in a col…
St4NNi Oct 23, 2026
ee6efa3
feat: compact database header, move dataset parts to the admin list, …
St4NNi Oct 23, 2026
23e65c5
feat: structure bucket settings and the nodes tab with sections and l…
St4NNi Oct 23, 2026
6e1c726
fix: cut explanatory sentences from the mock surfaces
St4NNi Oct 23, 2026
f876513
feat: open the storage feature guide for everyone
St4NNi Oct 24, 2026
ba6187d
fix: remove the whole-bucket copy to another node from the Data section
St4NNi Oct 24, 2026
502083f
feat: word syncs as a second bucket that follows the first
St4NNi Oct 24, 2026
8f1d641
feat: add the requests for buckets stored on more nodes
St4NNi Oct 24, 2026
04d71ea
refactor: move the bucket view types out of the example data
St4NNi Oct 24, 2026
03688d6
feat: show the nodes and ranges a node reports for a bucket
St4NNi Oct 24, 2026
1a3f5a3
feat: show the state of a bucket stored on more nodes in the settings…
St4NNi Oct 24, 2026
bb4a6f0
feat: warn about grants that miss a node of a bucket the node reports
St4NNi Oct 24, 2026
bcb7438
feat: link the storage settings to the guide for everyone
St4NNi Oct 24, 2026
2fa88b0
feat: choose the nodes of a new bucket from the realm nodes
St4NNi Oct 24, 2026
8aab1b4
feat: create a bucket on several nodes and show the result of each node
St4NNi Oct 24, 2026
703f2e8
feat: request the datasets that link a file, a folder or a bucket
St4NNi Oct 24, 2026
8efa4c7
feat: show the datasets a file is part of and the datasets that link …
St4NNi Oct 24, 2026
2e1eba3
feat: link the import in place dialog to the storage feature guide
St4NNi Oct 24, 2026
eaf4147
feat: add the requests of the database routes
St4NNi Oct 24, 2026
4a467ce
feat: read the databases of the realm and the marks that wait for the…
St4NNi Oct 24, 2026
b7a0bd1
feat: list the databases in the bucket list and show the dataset abov…
St4NNi Oct 24, 2026
9278c96
feat: mark a bucket as a database with the agreement of its group in …
St4NNi Oct 24, 2026
386b200
feat: manage the databases of the realm with the real routes in the a…
St4NNi Oct 24, 2026
4e7cf5c
feat: add databases from Add data and find them in the header search
St4NNi Oct 24, 2026
d855b4c
feat: read where a file version came from and what a dataset may say …
St4NNi Oct 24, 2026
07dbe5f
feat: show the origin of a file and the version a sync copied it from…
St4NNi Oct 24, 2026
e7c9819
chore: remove the example dataset preview that no page uses
St4NNi Oct 24, 2026
39cdec5
feat: add the requests of the part of, link target and sources routes
St4NNi Oct 24, 2026
e9cca34
feat: show the datasets a file is part of from the part of route
St4NNi Oct 24, 2026
4370c4f
feat: list the incoming syncs and storage folders of a bucket from th…
St4NNi Oct 24, 2026
daa98d7
feat: browse a linked part live and see the other datasets that link …
St4NNi Oct 24, 2026
156f0d0
feat: let a file part carry its origin and its datasets and keep othe…
St4NNi Oct 24, 2026
f84dfef
feat: add the origin, the datasets and the linked part id when a file…
St4NNi Oct 24, 2026
90766da
feat: show the global id of a version and ask for checksums by it whe…
St4NNi Oct 24, 2026
64b1b74
feat: link the download of a version of a bucket on more nodes throug…
St4NNi Oct 24, 2026
653e036
feat: add a CreateAction with the file as result when a job result jo…
St4NNi Oct 24, 2026
ab1526f
feat: add the requests that change a bucket stored on more nodes
St4NNi Oct 25, 2026
fa25249
feat: read the transfers, the deletion and the lineage of a bucket st…
St4NNi Oct 25, 2026
b2dfa60
feat: run the changes of a bucket stored on more nodes and replace it…
St4NNi Oct 25, 2026
a53ae20
feat: add a node, remove a node and move a range of a bucket stored o…
St4NNi Oct 25, 2026
5974b6f
feat: delete a bucket stored on more nodes and show the deletion and …
St4NNi Oct 25, 2026
1e6ca03
feat: offer the split limits when a bucket on more nodes is created
St4NNi Oct 25, 2026
6ec90ab
feat: let a joining node override the range behaviour of the bucket i…
St4NNi Oct 25, 2026
d0df7e4
test: provide the distribution helpers to the bucket storage view
St4NNi Oct 25, 2026
3347ca0
test: wait for the file lookups before reading the uploaded part
St4NNi Oct 25, 2026
39e34e7
fix: read database, origin, link and source answers again after a ses…
St4NNi Oct 25, 2026
dffb274
fix: read all databases a realm may hold
St4NNi Oct 25, 2026
5894bac
fix: keep a refused database request change visible after the refresh
St4NNi Oct 25, 2026
5fdd79f
fix: list bucket sources from the bounded sources route only
St4NNi Oct 25, 2026
b7ecb0f
fix: match databases by set or by node and name, and keep an unknown …
St4NNi Oct 25, 2026
1af4776
fix: open a database of a set only on a node that holds it
St4NNi Oct 25, 2026
6b5d612
fix: leave the destination bucket out of the databases by its identity
St4NNi Oct 25, 2026
f9480d8
fix: page the datasets of a database mark, send a mark once and seed …
St4NNi Oct 25, 2026
dfe6ecb
fix: count the databases in the search coverage
St4NNi Oct 25, 2026
ba91451
fix: move the bucket list keys through the database rows in the datab…
St4NNi Oct 25, 2026
62ea17a
fix: keep linked part prefixes exact and browse ordinary buckets on t…
St4NNi Oct 25, 2026
8ac5ec6
fix: open the files of a linked part only for the current resolution
St4NNi Oct 25, 2026
05cd0c8
fix: keep files with different origin, memberships or runs apart in a…
St4NNi Oct 25, 2026
d6c6517
fix: suggest other datasets of added files, read the origin of one ve…
St4NNi Oct 25, 2026
999180f
fix: name a folder by this node only for a confirmed ordinary bucket …
St4NNi Oct 25, 2026
4518ef6
feat: pick files from a database when adding files to a dataset or ta…
St4NNi Oct 25, 2026
e3faa4d
fix: download the origin version through the session instead of a pla…
St4NNi Oct 25, 2026
8901b58
fix: keep dataset list coverage across pages and hide an empty list o…
St4NNi Oct 25, 2026
3e4c8e2
fix: report members that are not admitted and offer their retry on an…
St4NNi Oct 25, 2026
6cfffef
fix: show a failed storage read and offer ordinary deletion only for …
St4NNi Oct 25, 2026
f0e6301
fix: type the route query of a database opened from search
St4NNi Oct 25, 2026
c790585
test: provide the database picker and linked part modules to the edit…
St4NNi Oct 25, 2026
828c979
fix: keep the realm nodes for the place of a new bucket in the Data s…
St4NNi Oct 25, 2026
6354c68
fix: keep one node location in the realm node list
St4NNi Oct 25, 2026
ac4bd0f
test: provide the example bucket and storage modules to the Data refr…
St4NNi Oct 25, 2026
48d923d
fix: use the set deletion preflight in the delete dialog
St4NNi Oct 25, 2026
43b772d
fix: remove the Public switch from the bucket settings
St4NNi Oct 25, 2026
c6e4aaf
fix: pin the picked file version in its location
St4NNi Oct 25, 2026
1a9504d
fix: show the global id of a file version as a version
St4NNi Oct 25, 2026
8a9e8e6
fix: browse a linked part at its exact prefix
St4NNi Oct 25, 2026
28fff97
fix: offer the node address of a copy source only as a suggestion
St4NNi Oct 25, 2026
6e8ae4b
fix: show what the set deletion list leaves out
St4NNi Oct 26, 2026
3af3170
fix: download and preview a file named by its global version id
St4NNi Oct 26, 2026
51f3b62
fix: stream a resolved download and cap the preview while reading
St4NNi Oct 26, 2026
dff1447
fix: drop a version preview or download once the version or session c…
St4NNi Oct 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions src/components/compute/TesDataRefDialog.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import { defineComponent, h, ref } from 'vue'
import * as VueRuntime from 'vue'
import { describe, expect, it } from 'vitest'
import * as Tes from '@/lib/tes'
import { button, click, compileClientComponent, content, element, flush, mountApp, moduleDefault } from '@/test/clientRender'

const Passthrough = defineComponent({ inheritAttrs: false, setup: (_, { attrs, slots }) => () => h('div', attrs, slots.default?.()) })
const Empty = defineComponent(() => () => null)

const component = compileClientComponent(new URL('./TesDataRefDialog.vue', import.meta.url), {
vue: VueRuntime,
'vue-router': { RouterLink: Passthrough },
'@lucide/vue': new Proxy({}, { get: () => Empty }),
'@/components/ui/Dialog.vue': moduleDefault(Passthrough),
'@/components/ui/DialogClose.vue': moduleDefault(Passthrough),
'@/components/ui/DialogContent.vue': moduleDefault(Passthrough),
'@/components/ui/DialogDescription.vue': moduleDefault(Passthrough),
'@/components/ui/DialogFooter.vue': moduleDefault(Passthrough),
'@/components/ui/DialogHeader.vue': moduleDefault(Passthrough),
'@/components/ui/DialogTitle.vue': moduleDefault(Passthrough),
'@/components/ui/Notice.vue': moduleDefault(Passthrough),
'@/components/ui/Switch.vue': moduleDefault(Empty),
'@/components/ui/Button.vue': moduleDefault(defineComponent({ inheritAttrs: false, setup: (_, { attrs, slots }) => () => h('button', attrs, slots.default?.()) })),
'@/components/ui/Input.vue': moduleDefault(Empty),
'@/components/ui/OptionToggle.vue': moduleDefault(defineComponent({ inheritAttrs: false, setup: (_, { attrs }) => () => h('div', { ...attrs, role: 'radiogroup' }) })),
'@/components/data/ObjectBrowserPanel.vue': moduleDefault(defineComponent({
props: { bucket: String, groupId: String },
setup: (props) => () => h('section', `browser ${props.bucket ?? 'any'} ${props.groupId ?? ''}`),
})),
'@/components/data/CreateCredentialDialog.vue': moduleDefault(Empty),
'@/components/data/add/DatabasesTab.vue': moduleDefault(defineComponent({
emits: ['choose'],
setup: (_, { emit }) => () => h('div', [
h('button', { onClick: () => emit('choose', 'far-db', 'n2', 'g2') }, 'Far database'),
h('button', { onClick: () => emit('choose', 'spire', 'n1', 'g3') }, 'Local database'),
]),
})),
'@/composables/useS3': { useS3: () => ({ endpoint: ref('https://s3.test'), hasActiveKey: ref(true), ensureSession: async () => {} }) },
'@/composables/useAruna': { useAruna: () => ({ currentUser: ref(null), myGroups: ref([]) }) },
'@/composables/useGroupSelection': { activeGroupId: ref('') },
'@/composables/useRealmNodes': { useRealmNodes: () => ({ isLocalNode: (id: string) => id === 'n1' }) },
'@/lib/utils': { errorMessage: (cause: unknown) => String(cause) },
'@/lib/tes': Tes,
})

describe('TES input picker databases', () => {
it('browses a database this node holds in its own group, and refuses one of another node', async () => {
const { root } = await mountApp(component, { props: { open: true, mode: 'input' } })
;(element(root, (node) => node.props.role === 'radiogroup').props['onUpdate:modelValue'] as (value: string) => void)('databases')
await flush()

await click(button(root, 'Far database'))
expect(content(root)).toContain('This database is on another node.')
await click(button(root, 'Local database'))
expect(content(root)).toContain('browser spire g3')
})
})
52 changes: 51 additions & 1 deletion src/components/compute/TesDataRefDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ import DialogHeader from '@/components/ui/DialogHeader.vue'
import DialogTitle from '@/components/ui/DialogTitle.vue'
import Button from '@/components/ui/Button.vue'
import Input from '@/components/ui/Input.vue'
import OptionToggle from '@/components/ui/OptionToggle.vue'
import ObjectBrowserPanel from '@/components/data/ObjectBrowserPanel.vue'
import CreateCredentialDialog from '@/components/data/CreateCredentialDialog.vue'
import DatabasesTab from '@/components/data/add/DatabasesTab.vue'
import { useS3, type FolderEntry, type ObjectEntry } from '@/composables/useS3'
import { useAruna } from '@/composables/useAruna'
import { activeGroupId } from '@/composables/useGroupSelection'
import { useRealmNodes } from '@/composables/useRealmNodes'
import { errorMessage } from '@/lib/utils'
import {
normalizeContainerDir,
Expand Down Expand Up @@ -46,8 +49,35 @@ const emit = defineEmits<{

const s3 = useS3()
const { currentUser, myGroups } = useAruna()
const { isLocalNode } = useRealmNodes()
const credentialDialogOpen = ref(false)

// Inputs come from a bucket of this node or from a database this node holds, in its own group.
const SOURCES = [
{ value: 'buckets', label: 'Buckets' },
{ value: 'databases', label: 'Databases' },
]
const source = ref<'buckets' | 'databases'>('buckets')
const database = ref<{ bucket: string; groupId: string } | null>(null)
const databaseProblem = ref<string | null>(null)

function chooseDatabase(bucket: string, nodeId: string, groupId: string) {
if (!isLocalNode(nodeId)) {
databaseProblem.value = 'This database is on another node. Task inputs come from this node.'
return
}
databaseProblem.value = null
pendingSelection.value = null
database.value = { bucket, groupId }
}

function showSource(next: 'buckets' | 'databases') {
source.value = next
database.value = null
databaseProblem.value = null
pendingSelection.value = null
}

// Folder handling: the TES facade stages FILE inputs only, so a folder pick is
// expanded here (for validation and the file cap) but emitted as ONE folder
// entry carrying its file list; consumers expand it again at task assembly.
Expand Down Expand Up @@ -151,6 +181,7 @@ watch(
folderError.value = null
mountDir.value = props.mountDefault
pendingSelection.value = null
showSource('buckets')
// The browser needs a session; without one the picker only offers credentials.
if (!currentUser.value) return
const gid = activeGroupId.value || myGroups.value[0]?.id
Expand Down Expand Up @@ -200,7 +231,26 @@ watch(
Selected files are staged below this container directory; folders keep their name as a subdirectory.
</p>
</div>
<ObjectBrowserPanel selectable @add="addSelection" @selection-change="pendingSelection = $event" />
<OptionToggle :model-value="source" :options="SOURCES" aria-label="Inputs from" @update:model-value="(value: string) => showSource(value as 'buckets' | 'databases')" />
<ObjectBrowserPanel v-if="source === 'buckets'" selectable @add="addSelection" @selection-change="pendingSelection = $event" />
<template v-else-if="database">
<div class="flex items-center gap-2 text-xs">
<span class="min-w-0 flex-1 truncate font-mono text-foreground">{{ database.bucket }}</span>
<Button variant="ghost" size="sm" @click="showSource('databases')">Choose another database</Button>
</div>
<ObjectBrowserPanel
:key="`${database.groupId}/${database.bucket}`"
selectable
:bucket="database.bucket"
:group-id="database.groupId"
@add="addSelection"
@selection-change="pendingSelection = $event"
/>
</template>
<template v-else>
<DatabasesTab bucket="" @choose="chooseDatabase" />
<p v-if="databaseProblem" class="text-[11px] text-destructive">{{ databaseProblem }}</p>
</template>
<div v-if="previewPaths.length" class="rounded-md border border-border bg-muted/20 px-3 py-2">
<p class="text-[11px] font-medium text-foreground">Will be staged as</p>
<ul class="mt-1 space-y-0.5 font-mono text-[11px] text-muted-foreground">
Expand Down
49 changes: 49 additions & 0 deletions src/components/dashboard/SearchOverlay.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as VueRuntime from 'vue'
import { createRenderer, defineComponent, h, nextTick, ref, type App, type Component, type Ref } from 'vue'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { isLeafFile } from '@/lib/dataEntities'
import * as Databases from '@/lib/databases'

const ButtonStub = defineComponent({
inheritAttrs: false,
Expand All @@ -30,6 +31,10 @@ const icons = new Proxy({}, { get: () => IconStub })
const moduleDefault = (component: Component) => ({ __esModule: true, default: component })

const narrow = ref(true)
let databaseRows: Databases.DatabaseRow[] = []
const databaseHits = (query: string) => Databases.searchRows(databaseRows, query)
const databaseState = ref('ready')
const databaseReload = vi.fn()
const authToken = ref<string | null>('token-a')
const objectSearchMode = ref('distributed_best_effort')
const mediaQuery = vi.fn(() => narrow)
Expand Down Expand Up @@ -109,9 +114,24 @@ const compiled = compileClientComponent(new URL('./SearchOverlay.vue', import.me
useRealmNodes: () => ({
displayName: (nodeId: string) => nodeId === 'node-b' ? 'Storage node B' : nodeId,
isLocalNode: (nodeId: string) => nodeId === 'node-a',
localNodeId: ref('node-a'),
}),
},
'@/lib/dataEntities': { isLeafFile },
'@/lib/databases': Databases,
'@/composables/useMockDatabases': { useMockDatabases: () => ({ search: () => [] }) },
'@/composables/useDatabases': {
useDatabases: () => ({
search: (query: string) => databaseHits(query),
ensure: () => undefined,
reload: databaseReload,
state: databaseState,
complete: ref(true),
locate: async (row: Databases.DatabaseRow) => Databases.placeOf(row, null, 'node-a'),
}),
},
'@/lib/distributedMock': { mockEnabled: () => false },
'@/lib/distributedMockData': { searchFiles: () => [] },
'@/lib/utils': {
relativeTime: (value: string) => `relative ${value}`,
truncateMiddle: (value: string) => value,
Expand Down Expand Up @@ -631,6 +651,22 @@ describe('narrow TopBar search panel', () => {
mounted.app.unmount()
})

it('lists the databases a person may use under their own tag', async () => {
databaseRows = [{
entryId: 'e1', datasetId: 'd1', bucket: 'spire-db', ownerGroup: 'group-a', title: 'SPIRE microbiome', documentPath: null, state: 'active', public: false,
target: { kind: 'ordinary', node_id: 'node-b', bucket: 'spire-db' },
}]
const mounted = await mount()
await click(element(mounted.root, (node) => node.props['aria-label'] === 'Open global search'))
await inputValue(element(mounted.root, (node) => node.tag === 'input'), 'microbiome')

const option = allNodes(mounted.root).find((node) => node.props.id === 'qs-db:e1')
expect(option && content(option)).toContain('Database')
expect(option && content(option)).toContain('SPIRE microbiome')
databaseRows = []
mounted.app.unmount()
})

it('summarizes the answer and drops empty kinds', async () => {
// No subject_types: an older node's hits keep the dataset label.
search.documents.value = [
Expand Down Expand Up @@ -802,4 +838,17 @@ describe('narrow TopBar search panel', () => {
expect(mounted.errors).toEqual([])
mounted.app.unmount()
})

it('reports partial coverage when the databases could not be read, and reads them again on retry', async () => {
databaseState.value = 'failed'
const mounted = await mount()
await click(element(mounted.root, (node) => node.props['aria-label'] === 'Open global search'))
await inputValue(element(mounted.root, (node) => node.tag === 'input'), 'sample')

expect(allNodes(mounted.root).some((node) => node.props['aria-label'] === 'Search coverage: partial')).toBe(true)
await click(element(mounted.root, (node) => node.tag === 'button' && content(node).trim() === 'Retry'))
expect(databaseReload).toHaveBeenCalled()
databaseState.value = 'ready'
mounted.app.unmount()
})
})
Loading
Loading