# SyncService

- File ID: file:1la6lrw:syncservice-cs
- Path: NexusReader.UI.Shared/Services/SyncService.cs
- Role: service
- Layer: frontend

## Purpose

Client-side service that establishes a SignalR hub connection to synchronize reading progress (pages) with a remote server, providing debounce logic, event exposure, and lifecycle disposal.

## Key Details

Uses a trailing-edge 2s debounce to batch progress updates, retrieves an auth token from secure storage for SignalR AccessTokenProvider, registers a hub handler that forwards to an event, and safely cancels/disposes background work and hub connection on dispose.

## Symbols

- SyncService: Client-side service that establishes a SignalR hub connection to synchronize reading progress (pages) with a remote server, providing debounce logic, event exposure, and lifecycle disposal.
- SyncService(): Constructs the SyncService and stores injected dependencies.
- InitializeAsync(): Initializes the SignalR HubConnection (with token from secure storage), registers a progress handler, and starts the connection with automatic reconnect.
- UpdateProgressAsync(): Debounces and sends reading progress updates to the server via the hub connection in a trailing-edge manner, avoiding duplicate sends for the same page.
- DisposeAsync(): Cancels pending debounce, disposes the hub connection if present.
- IAsyncDisposable.DisposeAsync(): Explicit interface implementation that forwards to DisposeAsync to unify disposal semantics.
- SyncService: Encapsulates client synchronization logic for reading progress via SignalR, providing initialization, debounced update sending, event exposure, and disposal.

## Dependencies

- No resolved dependencies.

## Calls

- No resolved calls.

## Unresolved References

- dependency-target: NexusReader.Application.Abstractions.Services
- dependency-target: Microsoft.AspNetCore.SignalR.Client
- dependency-target: Microsoft.Extensions.Logging
- call-target: unknown
- call-target: self
- call-target: self
- call-target: self
- interaction-target: await _hubConnection.SendAsync("UpdateProgress", pageId, ebookId, progress, chapterTitle, token);
- interaction-target: Calls _hubConnection.SendAsync('UpdateProgress', pageId, ebookId, progress, chapterTitle, token) when connected (external SignalR call)

## Coverage

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

## Control Flow Fragments

- SyncService: 3 nodes, 2 edges, 0 jumps, 0 unsupported constructs
- InitializeAsync: 35 nodes, 39 edges, 2 jumps, 0 unsupported constructs
- UpdateProgressAsync: 33 nodes, 36 edges, 1 jumps, 0 unsupported constructs
- DisposeAsync: 9 nodes, 9 edges, 0 jumps, 0 unsupported constructs
- IAsyncDisposable.DisposeAsync: 5 nodes, 4 edges, 1 jumps, 0 unsupported constructs

## Diagrams

### SyncService Neighborhood

```mermaid
flowchart LR
    class_1jwtkwo_syncservice("SyncService")
    file_1la6lrw_syncservice_cs("SyncService")
    method_14llm2d_disposeasync[["DisposeAsync()"]]
    method_171cr2c_syncservice[["SyncService()"]]
    method_1oqk0x0_iasyncdisposable_disposeasync[["IAsyncDisposable.DisposeAsync()"]]
    method_1w7mi8p_updateprogressasync[["UpdateProgressAsync()"]]
    method_r2rlv7_initializeasync[["InitializeAsync()"]]
    type_1sbj28q_syncservice[/"SyncService"/]
```

### SyncService Execution Overview

```mermaid
flowchart TD
    class_1jwtkwo_syncservice("SyncService")
    method_14llm2d_disposeasync[["DisposeAsync()"]]
    method_171cr2c_syncservice[["SyncService()"]]
    method_1oqk0x0_iasyncdisposable_disposeasync[["IAsyncDisposable.DisposeAsync()"]]
    method_1w7mi8p_updateprogressasync[["UpdateProgressAsync()"]]
    method_r2rlv7_initializeasync[["InitializeAsync()"]]
    unresolved_unresolved_1b6k3t3_call_target{"Unresolved: InitializeAsync"}
    unresolved_unresolved_1eu3rn0_call_target{"Unresolved: OnProgressReceived"}
    unresolved_unresolved_1k9vuzk_call_target{"Unresolved: DisposeAsync"}
    unresolved_unresolved_dxqwhl_call_target{"Unresolved: GetSecureString"}
    unresolved_unresolved_fglrce_interaction_target{"Unresolved: await _hubConnection.SendAsync(\\"UpdateProgress\\", pageId, ebookId, progress, chapterTitle, token);"}
    unresolved_unresolved_k2ym2b_interaction_target{"Unresolved: Calls _hubConnection.SendAsync('UpdateProgress', pageId, ebookId, progress, chapterTitle, token) when connected (external SignalR call)"}
    class_1jwtkwo_syncservice -->|contains| method_14llm2d_disposeasync
    class_1jwtkwo_syncservice -->|contains| method_171cr2c_syncservice
    class_1jwtkwo_syncservice -->|contains| method_1oqk0x0_iasyncdisposable_disposeasync
    class_1jwtkwo_syncservice -->|contains| method_1w7mi8p_updateprogressasync
    class_1jwtkwo_syncservice -->|contains| method_r2rlv7_initializeasync
    class_1jwtkwo_syncservice -->|unresolved interaction| unresolved_unresolved_fglrce_interaction_target
    class_1jwtkwo_syncservice -->|unresolved interaction| unresolved_unresolved_k2ym2b_interaction_target
    method_1oqk0x0_iasyncdisposable_disposeasync -->|unresolved call| unresolved_unresolved_1k9vuzk_call_target
    method_1w7mi8p_updateprogressasync -->|unresolved call| unresolved_unresolved_1b6k3t3_call_target
    method_r2rlv7_initializeasync -->|unresolved call| unresolved_unresolved_1eu3rn0_call_target
    method_r2rlv7_initializeasync -->|unresolved call| unresolved_unresolved_dxqwhl_call_target
```

### InitializeAsync() Control Flow

_Warnings: diagram method_r2rlv7_initializeasync__fragment_diagram exceeds preferred complexity thresholds (35 nodes, 39 edges)._

```mermaid
---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart TD
    method_r2rlv7_initializeasync__call_36_GetSecureString[["GetSecureString"]]
    method_r2rlv7_initializeasync__call_53_OnProgressReceived[["OnProgressReceived"]]
    method_r2rlv7_initializeasync__action_34_guard_clause_34__condition{"_isInitialized == true"}
    method_r2rlv7_initializeasync__action_34_guard_clause_34__false("skip-init")
    method_r2rlv7_initializeasync__action_34_guard_clause_34__merge("merge")
    method_r2rlv7_initializeasync__action_34_guard_clause_34__true("return-Ok")
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__condition{"_isInitialized) return Result.Ok("}
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__false("continue")
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__merge("merge")
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__true("exit")
    method_r2rlv7_initializeasync__action_36_external_read_36__linear("read-secure-token")
    method_r2rlv7_initializeasync__action_36_initializeasync_await_36_1__await[["Waits for async work"]]
    method_r2rlv7_initializeasync__action_37_guard_clause_37__condition{"tokenResult.IsFailed"}
    method_r2rlv7_initializeasync__action_37_guard_clause_37__false("stop-init")
    method_r2rlv7_initializeasync__action_37_guard_clause_37__merge("merge")
    method_r2rlv7_initializeasync__action_37_guard_clause_37__true("return-Fail")
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__condition{"tokenResult.IsFailed) return Result.Fail(\\"Not authenticated\\""}
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__false("continue")
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__merge("merge")
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__true("exit")
    method_r2rlv7_initializeasync__action_39_compute_39__linear("build-hub-url")
    method_r2rlv7_initializeasync__action_42_configure_42__linear("configure-hub-connection")
    method_r2rlv7_initializeasync__action_50_event_subscription_50__linear("register-progress-handler")
    method_r2rlv7_initializeasync__action_53_initializeasync_await_53_4__await[["Waits for async work"]]
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__condition{"OnProgressReceived != null) await OnProgressReceived(pageId, timestamp"}
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__false("false")
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__merge("merge")
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__true("true")
    method_r2rlv7_initializeasync__action_56_initializeasync_try_56_5__try("Begins protected execution")
    method_r2rlv7_initializeasync__action_56_try_catch_56__linear("start-hub-with-fallback")
    method_r2rlv7_initializeasync__action_58_initializeasync_await_58_6__await[["Waits for async work"]]
    method_r2rlv7_initializeasync__action_62_initializeasync_catch_62_8__catch("catch Exception ex")
    method_r2rlv7_initializeasync__entry(["InitializeAsync entry"])
    method_r2rlv7_initializeasync__action_60_initializeasync_return_60_7__return(["Returns result"])
    method_r2rlv7_initializeasync__action_64_initializeasync_return_64_9__return(["Returns result"])
    method_r2rlv7_initializeasync__action_34_guard_clause_34__condition -->|skip-init| method_r2rlv7_initializeasync__action_34_guard_clause_34__false
    method_r2rlv7_initializeasync__action_34_guard_clause_34__condition -->|return-Ok| method_r2rlv7_initializeasync__action_34_guard_clause_34__true
    method_r2rlv7_initializeasync__action_34_guard_clause_34__false -->|next| method_r2rlv7_initializeasync__action_34_guard_clause_34__merge
    method_r2rlv7_initializeasync__action_34_guard_clause_34__merge -->|next| method_r2rlv7_initializeasync__action_36_initializeasync_await_36_1__await
    method_r2rlv7_initializeasync__action_34_guard_clause_34__true -->|next| method_r2rlv7_initializeasync__action_34_guard_clause_34__merge
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__condition -->|continue| method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__false
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__condition -->|exit| method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__true
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__false -->|next| method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__merge
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__merge -->|next| method_r2rlv7_initializeasync__action_34_guard_clause_34__condition
    method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__true -->|next| method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__merge
    method_r2rlv7_initializeasync__action_36_external_read_36__linear -->|nexus_auth_token| method_r2rlv7_initializeasync__call_36_GetSecureString
    method_r2rlv7_initializeasync__action_36_initializeasync_await_36_1__await -->|next| method_r2rlv7_initializeasync__action_36_external_read_36__linear
    method_r2rlv7_initializeasync__action_37_guard_clause_37__condition -->|stop-init| method_r2rlv7_initializeasync__action_37_guard_clause_37__false
    method_r2rlv7_initializeasync__action_37_guard_clause_37__condition -->|return-Fail| method_r2rlv7_initializeasync__action_37_guard_clause_37__true
    method_r2rlv7_initializeasync__action_37_guard_clause_37__false -->|next| method_r2rlv7_initializeasync__action_37_guard_clause_37__merge
    method_r2rlv7_initializeasync__action_37_guard_clause_37__merge -->|next| method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__condition
    method_r2rlv7_initializeasync__action_37_guard_clause_37__true -->|next| method_r2rlv7_initializeasync__action_37_guard_clause_37__merge
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__condition -->|continue| method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__false
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__condition -->|exit| method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__true
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__false -->|next| method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__merge
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__merge -->|next| method_r2rlv7_initializeasync__action_39_compute_39__linear
    method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__true -->|next| method_r2rlv7_initializeasync__action_37_initializeasync_guard_clause_37_2__merge
    method_r2rlv7_initializeasync__action_39_compute_39__linear -->|next| method_r2rlv7_initializeasync__action_42_configure_42__linear
    method_r2rlv7_initializeasync__action_42_configure_42__linear -->|next| method_r2rlv7_initializeasync__action_50_event_subscription_50__linear
    method_r2rlv7_initializeasync__action_50_event_subscription_50__linear -->|next| method_r2rlv7_initializeasync__action_53_initializeasync_await_53_4__await
    method_r2rlv7_initializeasync__action_53_initializeasync_await_53_4__await -->|next| method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__condition
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__condition -->|false| method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__false
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__condition -->|true| method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__true
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__false -->|next| method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__merge
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__merge -->|pageId, timestamp invoked when hub event arrives| method_r2rlv7_initializeasync__call_53_OnProgressReceived
    method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__true -->|next| method_r2rlv7_initializeasync__action_53_initializeasync_branch_53_3__merge
    method_r2rlv7_initializeasync__action_56_initializeasync_try_56_5__try -->|next| method_r2rlv7_initializeasync__action_58_initializeasync_await_58_6__await
    method_r2rlv7_initializeasync__action_56_try_catch_56__linear -->|next| method_r2rlv7_initializeasync__action_56_initializeasync_try_56_5__try
    method_r2rlv7_initializeasync__action_58_initializeasync_await_58_6__await -->|return| method_r2rlv7_initializeasync__action_60_initializeasync_return_60_7__return
    method_r2rlv7_initializeasync__action_60_initializeasync_return_60_7__return -->|exception| method_r2rlv7_initializeasync__action_62_initializeasync_catch_62_8__catch
    method_r2rlv7_initializeasync__action_62_initializeasync_catch_62_8__catch -->|return| method_r2rlv7_initializeasync__action_64_initializeasync_return_64_9__return
    method_r2rlv7_initializeasync__call_36_GetSecureString -->|next| method_r2rlv7_initializeasync__action_37_guard_clause_37__condition
    method_r2rlv7_initializeasync__call_53_OnProgressReceived -->|next| method_r2rlv7_initializeasync__action_56_try_catch_56__linear
    method_r2rlv7_initializeasync__entry -->|next| method_r2rlv7_initializeasync__action_34_initializeasync_guard_clause_34_0__condition
```

### UpdateProgressAsync() Control Flow

_Warnings: diagram method_1w7mi8p_updateprogressasync__fragment_diagram exceeds preferred complexity thresholds (33 nodes, 36 edges)._

```mermaid
---
config:
  flowchart:
    defaultRenderer: "elk"
---
flowchart TD
    method_1w7mi8p_updateprogressasync__call_85_InitializeAsync[["InitializeAsync"]]
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__condition{"pageId == _lastSentPageId"}
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__false("skip-send")
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__merge("merge")
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__true("return-Ok")
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__condition{"pageId == _lastSentPageId) return Result.Ok("}
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__false("continue")
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__merge("merge")
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__true("exit")
    method_1w7mi8p_updateprogressasync__action_74_debounce_74__linear("trailing-edge-debounce")
    method_1w7mi8p_updateprogressasync__action_79_background_task_79__linear("delayed-send-task")
    method_1w7mi8p_updateprogressasync__action_81_updateprogressasync_try_81_1__try("Begins protected execution")
    method_1w7mi8p_updateprogressasync__action_83_updateprogressasync_await_83_2__await[["Waits for async work"]]
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_await_85_4__await[["Waits for async work"]]
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__condition{"!_isInitialized) await InitializeAsync("}
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__false("false")
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__merge("merge")
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__true("true")
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__condition{"_hubConnection?.State == HubConnectionState.Connected"}
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__false("false")
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__merge("merge")
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__true("true")
    method_1w7mi8p_updateprogressasync__action_89_updateprogressasync_await_89_7__await[["Waits for async work"]]
    method_1w7mi8p_updateprogressasync__action_90_state_change_90__linear("update-last-sent")
    method_1w7mi8p_updateprogressasync__action_93_error_handling_93__linear("handle-cancellation")
    method_1w7mi8p_updateprogressasync__action_93_updateprogressasync_catch_93_8__catch("catch TaskCanceledException")
    method_1w7mi8p_updateprogressasync__action_94_error_handling_94__linear("log-send-error")
    method_1w7mi8p_updateprogressasync__action_94_updateprogressasync_catch_94_9__catch("catch Exception ex")
    method_1w7mi8p_updateprogressasync__action_96_updateprogressasync_log_96_10__linear("Logs runtime state")
    method_1w7mi8p_updateprogressasync__entry(["UpdateProgressAsync entry"])
    method_1w7mi8p_updateprogressasync__action_89_external_call_89__linear("send-progress-to-hub")
    method_1w7mi8p_updateprogressasync__action_89_updateprogressasync_external_call_89_6__linear("Calls external dependency")
    method_1w7mi8p_updateprogressasync__action_100_updateprogressasync_return_100_11__return(["Returns result"])
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__condition -->|skip-send| method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__false
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__condition -->|return-Ok| method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__true
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__false -->|next| method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__merge
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__merge -->|next| method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__condition
    method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__true -->|next| method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__merge
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__condition -->|continue| method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__false
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__condition -->|exit| method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__true
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__false -->|next| method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__merge
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__merge -->|next| method_1w7mi8p_updateprogressasync__action_74_debounce_74__linear
    method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__true -->|next| method_1w7mi8p_updateprogressasync__action_72_updateprogressasync_guard_clause_72_0__merge
    method_1w7mi8p_updateprogressasync__action_74_debounce_74__linear -->|next| method_1w7mi8p_updateprogressasync__action_79_background_task_79__linear
    method_1w7mi8p_updateprogressasync__action_79_background_task_79__linear -->|next| method_1w7mi8p_updateprogressasync__action_81_updateprogressasync_try_81_1__try
    method_1w7mi8p_updateprogressasync__action_81_updateprogressasync_try_81_1__try -->|next| method_1w7mi8p_updateprogressasync__action_83_updateprogressasync_await_83_2__await
    method_1w7mi8p_updateprogressasync__action_83_updateprogressasync_await_83_2__await -->|next| method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_await_85_4__await
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_await_85_4__await -->|next| method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__condition
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__condition -->|false| method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__false
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__condition -->|true| method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__true
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__false -->|next| method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__merge
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__merge -->|none ensures hub is initialized before sending| method_1w7mi8p_updateprogressasync__call_85_InitializeAsync
    method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__true -->|next| method_1w7mi8p_updateprogressasync__action_85_updateprogressasync_branch_85_3__merge
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__condition -->|false| method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__false
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__condition -->|true| method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__true
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__false -->|next| method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__merge
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__merge -->|next| method_1w7mi8p_updateprogressasync__action_89_updateprogressasync_await_89_7__await
    method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__true -->|next| method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__merge
    method_1w7mi8p_updateprogressasync__action_89_external_call_89__linear -->|next| method_1w7mi8p_updateprogressasync__action_89_updateprogressasync_external_call_89_6__linear
    method_1w7mi8p_updateprogressasync__action_89_updateprogressasync_await_89_7__await -->|next| method_1w7mi8p_updateprogressasync__action_89_external_call_89__linear
    method_1w7mi8p_updateprogressasync__action_89_updateprogressasync_external_call_89_6__linear -->|next| method_1w7mi8p_updateprogressasync__action_90_state_change_90__linear
    method_1w7mi8p_updateprogressasync__action_90_state_change_90__linear -->|exception| method_1w7mi8p_updateprogressasync__action_93_updateprogressasync_catch_93_8__catch
    method_1w7mi8p_updateprogressasync__action_93_error_handling_93__linear -->|next| method_1w7mi8p_updateprogressasync__action_94_error_handling_94__linear
    method_1w7mi8p_updateprogressasync__action_93_updateprogressasync_catch_93_8__catch -->|next| method_1w7mi8p_updateprogressasync__action_93_error_handling_93__linear
    method_1w7mi8p_updateprogressasync__action_94_error_handling_94__linear -->|exception| method_1w7mi8p_updateprogressasync__action_94_updateprogressasync_catch_94_9__catch
    method_1w7mi8p_updateprogressasync__action_94_updateprogressasync_catch_94_9__catch -->|next| method_1w7mi8p_updateprogressasync__action_96_updateprogressasync_log_96_10__linear
    method_1w7mi8p_updateprogressasync__action_96_updateprogressasync_log_96_10__linear -->|return| method_1w7mi8p_updateprogressasync__action_100_updateprogressasync_return_100_11__return
    method_1w7mi8p_updateprogressasync__call_85_InitializeAsync -->|next| method_1w7mi8p_updateprogressasync__action_87_updateprogressasync_branch_87_5__condition
    method_1w7mi8p_updateprogressasync__entry -->|next| method_1w7mi8p_updateprogressasync__action_72_guard_clause_72__condition
```

## Diagram Validation

- Status: warn
- Warning: Control-flow extraction left 2 unresolved jumps.
- Warning: control-flow: diagram method_r2rlv7_initializeasync__fragment_diagram exceeds preferred complexity thresholds (35 nodes, 39 edges).
- Warning: control-flow: diagram method_1w7mi8p_updateprogressasync__fragment_diagram exceeds preferred complexity thresholds (33 nodes, 36 edges).
