@startuml
title PCS TIA Sync - Snapshot And Status Overview

actor Engineer
participant "PCS GUI" as Gui
participant "PCS CLI" as Cli
participant "TIA Openness" as Openness
participant "TIA Portal" as TIA
database "Repository" as Repo
participant "Git" as Git

Engineer -> Gui : Capture TIA Snapshot
Gui -> Cli : pcs sync snapshot tia
Cli -> Openness : export block sources
Openness -> TIA : attach/open project
TIA --> Openness : current PLC sources
Openness --> Cli : generated snapshot files
Cli -> Repo : write .pcs/sync/tia-snapshot/latest

Engineer -> Gui : Refresh Status
Gui -> Cli : pcs sync status --json
Cli -> Repo : compare Repo + Base + TIA snapshot
Cli --> Gui : sync decision model
Gui --> Engineer : show clean / sync / review / baseline state

note over Repo, Git
No Git remote operation in this step.
end note

@enduml
