Parent: Spaces Overview · Related: Concepts — Space
Displays an overview of the selected space — counts and storage sizes for content, translations, schemas, assets, and tasks. Acts as the landing page after selecting a space.
/features/spaces/:spaceId/dashboard
src/app/features/spaces/dashboard/
dashboard.component.ts/html/scss
Shows SpaceOverview statistics from the selected space document. If the overview is missing or older than 24 hours, it is recalculated automatically — there is no refresh prompt. A manual refresh button (lucideRotateCw) is shown in the toolbar for users with SPACE_MANAGEMENT.
The UI is built with Spartan/Helm components: HlmCard for each stat tile, HlmButton for the refresh button, and HlmProgress for the per-locale translation progress bars.
Injected services: SpaceService, NotificationService, SpaceStore
Key behaviour:
- Reads
SpaceStore.selectedSpace()to display current overview stats - Uses
effect()in the constructor to watch the selected space; whenoverviewisundefinedor stale (> 24h sinceoverview.updatedAt) it callscalculateOverview()automatically calculateOverview()— also bound to the manual refresh button; callsSpaceServiceto trigger a server-side recalculation of all counts and sizes, updates theSpaceOverviewsub-document in Firestore. Thespace-calculateoverviewcallable accepts any signed-in user with roleadminorcustom, the same audience that can read the space document, because the automatic refresh runs for everyone who opens the dashboard. Unauthenticated calls are rejected
Locales count comes from space.locales.length (not part of SpaceOverview). The rest comes from SpaceOverview:
{
translationsCount, translationsSize,
assetsCount, assetsSize,
contentsCount, contentsSize,
schemasCount,
tasksCount, tasksSize,
totalSize,
updatedAt
}When space.progress.translations is present, a Translations section shows one card per locale with the translated count vs. translationsCount and an hlm-progress bar.
| Service | Purpose |
|---|---|
SpaceService |
Recalculate space overview stats |
NotificationService |
Snackbar feedback |
SpaceStore |
Read selected space + overview data |