# Dashboard

- File ID: file:1b5rrku:dashboard-razor
- Path: NexusReader.UI.Shared/Pages/Dashboard.razor
- Role: ui-page
- Layer: frontend

## Purpose

Razor UI page component that renders the user dashboard and, on initialization, loads the current user's profile from an injected identity service.

## Key Details

Razor page at route '/' (line 1) marked [Authorize] (line 8); injects IIdentityService (line 6) and NavigationManager (line 7). Primary runtime behavior is OnInitializedAsync fetching and assigning _profile (lines 90-97). UI composes CurrentReadingWidget and NexusIcon components.

## Symbols

- Dashboard: Razor UI page component that renders the user dashboard and, on initialization, loads the current user's profile from an injected identity service.
- OnInitializedAsync(): Component lifecycle method: asynchronously fetches the current user's profile when the dashboard initializes and stores it in component state.

## Dependencies

- imports NexusReader.UI.Shared/Components/Organisms/CurrentReadingWidget.razor
- imports NexusReader.UI.Shared/Components/Atoms/NexusIcon.razor

## Calls

- No resolved calls.

## Unresolved References

- dependency-target: NexusReader.UI.Shared/Services/IIdentityService.cs
- call-target: unknown
- interaction-target: await IdentityService.GetProfileAsync()

## Coverage

- Symbols: 2
- Executable symbols: 1
- Executable symbols with control flow: 1
- Grounded edges: 4
- Unresolved references: 3
- Control-flow fragments: 1
- Unresolved jumps: 1
- Unsupported constructs: 0
- Control-flow coverage: 100%
- Required diagrams: 2
- Generated diagrams: 3

## Control Flow Fragments

- OnInitializedAsync: 14 nodes, 15 edges, 1 jumps, 0 unsupported constructs

## Diagrams

### Dashboard Neighborhood

```mermaid
flowchart LR
    class_140cn9s_dashboard("Dashboard")
    file_1b5rrku_dashboard_razor("Dashboard")
    method_lqrlha_oninitializedasync[["OnInitializedAsync()"]]
    file_1uvdam9_currentreadingwidget_razor[/"CurrentReadingWidget"/]
    file_q8opk3_nexusicon_razor[/"NexusIcon"/]
    file_1b5rrku_dashboard_razor -->|CurrentReadingWidget| file_1uvdam9_currentreadingwidget_razor
    file_1b5rrku_dashboard_razor -->|NexusIcon| file_q8opk3_nexusicon_razor
```

### Dashboard Execution Overview

```mermaid
flowchart TD
    class_140cn9s_dashboard("Dashboard")
    method_lqrlha_oninitializedasync[["OnInitializedAsync()"]]
    unresolved_unresolved_1m34u60_call_target{"Unresolved: GetProfileAsync"}
    unresolved_unresolved_1w4tpao_interaction_target{"Unresolved: await IdentityService.GetProfileAsync()"}
    class_140cn9s_dashboard -->|contains| method_lqrlha_oninitializedasync
    class_140cn9s_dashboard -->|unresolved interaction| unresolved_unresolved_1w4tpao_interaction_target
    method_lqrlha_oninitializedasync -->|unresolved call| unresolved_unresolved_1m34u60_call_target
```

### OnInitializedAsync() Control Flow

```mermaid
flowchart TD
    method_lqrlha_oninitializedasync__call_92_GetProfileAsync[["GetProfileAsync"]]
    method_lqrlha_oninitializedasync__action_92_oninitializedasync_await_92_0__await[["Waits for async work"]]
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__condition{"result.IsSuccess"}
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__false("no-op on failure")
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__merge("merge")
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__true("set _profile")
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__condition{"result.IsSuccess"}
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__false("false")
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__merge("merge")
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__true("true")
    method_lqrlha_oninitializedasync__action_95_state_mutation_95__linear("Store profile in local state")
    method_lqrlha_oninitializedasync__entry(["OnInitializedAsync entry"])
    method_lqrlha_oninitializedasync__action_92_external_call_92__linear("Fetch user profile")
    method_lqrlha_oninitializedasync__implicit_return(["return"])
    method_lqrlha_oninitializedasync__action_92_external_call_92__linear -->|no parameters awaited call to retrieve user profile result| method_lqrlha_oninitializedasync__call_92_GetProfileAsync
    method_lqrlha_oninitializedasync__action_92_oninitializedasync_await_92_0__await -->|next| method_lqrlha_oninitializedasync__action_92_external_call_92__linear
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__condition -->|no-op on failure| method_lqrlha_oninitializedasync__action_93_guard_clause_93__false
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__condition -->|set _profile| method_lqrlha_oninitializedasync__action_93_guard_clause_93__true
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__false -->|next| method_lqrlha_oninitializedasync__action_93_guard_clause_93__merge
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__merge -->|next| method_lqrlha_oninitializedasync__action_95_state_mutation_95__linear
    method_lqrlha_oninitializedasync__action_93_guard_clause_93__true -->|next| method_lqrlha_oninitializedasync__action_93_guard_clause_93__merge
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__condition -->|false| method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__false
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__condition -->|true| method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__true
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__false -->|next| method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__merge
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__merge -->|next| method_lqrlha_oninitializedasync__action_93_guard_clause_93__condition
    method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__true -->|next| method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__merge
    method_lqrlha_oninitializedasync__action_95_state_mutation_95__linear -->|return| method_lqrlha_oninitializedasync__implicit_return
    method_lqrlha_oninitializedasync__call_92_GetProfileAsync -->|next| method_lqrlha_oninitializedasync__action_93_oninitializedasync_branch_93_1__condition
    method_lqrlha_oninitializedasync__entry -->|next| method_lqrlha_oninitializedasync__action_92_oninitializedasync_await_92_0__await
```

## Diagram Validation

- Status: warn
- Warning: Control-flow extraction left 1 unresolved jumps.
