39 lines
910 B
Plaintext
39 lines
910 B
Plaintext
@startuml
|
|
!theme plain
|
|
title Artifact Editor State Machine
|
|
|
|
[*] --> Empty : launch without file
|
|
[*] --> Loading : launch with file path
|
|
|
|
Empty --> Editing : user types / AI generates
|
|
Loading --> Editing : file loaded
|
|
Loading --> Error : file not found
|
|
|
|
Editing --> Rendering : save triggered
|
|
Editing --> Editing : user edits
|
|
Editing --> AIProcessing : voice/AI command
|
|
|
|
AIProcessing --> Editing : AI response applied
|
|
AIProcessing --> Error : AI failed
|
|
|
|
Rendering --> Rendered : success
|
|
Rendering --> Error : render failed
|
|
Rendering --> Rendering : timeout (retry)
|
|
|
|
Rendered --> Editing : user continues editing
|
|
Rendered --> Saved : output confirmed
|
|
|
|
Saved --> [*] : exit with success
|
|
Error --> Editing : user fixes
|
|
Error --> [*] : exit with error
|
|
|
|
note right of Editing
|
|
Dirty flag tracked
|
|
Undo/redo stack maintained
|
|
end note
|
|
|
|
note right of Rendering
|
|
Subprocess with timeout
|
|
Cancellable
|
|
end note
|
|
@enduml |