Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion l10n/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,6 @@ OC.L10N.register(
"Launchpad stays open." : "Launchpad blijft open.",
"Legacy Windows program" : "Oud Windows-programma",
"Most used first" : "Meest gebruikt eerst",
"No group" : "Geen groep",
"None chosen: the tile opens as the dashboard decides." : "Niets gekozen: de tegel opent zoals het dashboard bepaalt.",
"Not checked yet" : "Nog niet gecontroleerd",
"Not reachable at the last check, {when}" : "Niet bereikbaar bij de laatste controle, {when}",
Expand Down
5 changes: 4 additions & 1 deletion src/stores/__tests__/fixtures/dashboard.golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,9 @@
],
"getVisibleDashboards": [
[]
],
"getActiveDashboard": [
[]
]
},
"toasts": [],
Expand Down Expand Up @@ -1058,7 +1061,7 @@
"warnings": [],
"errors": [
[
"Failed to load dashboards:",
"Failed to load the active dashboard:",
"Error: active down"
]
]
Expand Down
19 changes: 18 additions & 1 deletion src/stores/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,24 @@ function firstDashboardResponses() {
if (firstLoad !== null) {
return Promise.resolve([{ data: firstLoad.visible }, { data: firstLoad.active }])
}
return Promise.all([fetchVisibleDashboards(), api.getActiveDashboard()])
return Promise.all([fetchVisibleDashboards(), fetchActiveDashboard()])
}

/**
* Fetch the active dashboard. It is asked for together with the list, so a
* failure here must not take the list down with it: the load then has no
* active dashboard, as it had when the two were asked for one after the other.
*
* @return {Promise<{data: (object|null)}>} The axios response, or an empty one.
* @spec openspec/changes/archive/2026-11-25-dashboard-first-load-from-initial-state/tasks.md#task-3
*/
async function fetchActiveDashboard() {
try {
return await api.getActiveDashboard()
} catch (error) {
logger.error('Failed to load the active dashboard:', error)
return { data: null }
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils/__tests__/adminWalkthrough.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import { afterEach, describe, expect, it, vi } from 'vitest'
import manifest from '../../manifest.json'
import {
ADMIN_TOUR_COMPLETION_KEY,
ADMIN_TOUR_WALKTHROUGH_KEY,
ADMIN_TOUR_ID,
ADMIN_TOUR_STORAGE_SUFFIX,
ADMIN_TOUR_WALKTHROUGH_KEY,
adminTourManifest,
adminTourStorage,
loadAdminTourSeen,
Expand Down
Loading