CockpitRecorderController class final
View model over CockpitInteractionRecorder for recorder panels.
The only object panel widgets bind to: it relays engine change notifications, derives the enablement state widgets render, and funnels every command so failures land in lastError instead of escaping into a widget build. The engine stays reachable for hosts that drive it through other surfaces (remote endpoints, CLI), but panels never touch it.
- Inheritance
-
- Object
- ChangeNotifier
- CockpitRecorderController
Constructors
- CockpitRecorderController({required CockpitInteractionRecorder recorder, CockpitRecorderExportGateway? exportGateway})
-
Creates a controller over
recorder.exportGatewaybacks saveBundle; the default writes YAML to the system temp directory.
Properties
- canDiscardLast → bool
-
Whether the newest recorded step can be annotated or deleted: only
while
recording, and only when a step exists.no setter - canPause → bool
-
Whether pause is legal: only while
recording.no setter - canResume → bool
-
Whether resume is legal: only while
paused.no setter - canStart → bool
-
Whether start is legal: from
idle, or a new session afterstopped.no setter - canStop → bool
-
Whether stop is legal: while
recordingorpaused.no setter - canVerifyReplay → bool
-
Whether verifyReplay has work to do: a session with at least one
actionable step, not already replaying.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isReplaying → bool
-
Whether a verify-replay pass is currently executing.
no setter
- isSaving → bool
-
Whether a saveBundle call is in flight.
no setter
- lastBundle → CockpitRecordedFlowBundle?
-
The last export bundle, or
nulluntil exportBundle succeeds.no setter - lastError → String?
-
The error of the last failed command, shown inline by panels. Cleared
by the next successful command or by clearError.
no setter
-
openSegments
→ List<
String> -
The currently open segment labels, bottom first.
no setter
- phase → CockpitRecorderPhase
-
Current phase of the recording state machine.
no setter
- recorder → CockpitInteractionRecorder
-
The engine this controller fronts. Owned by the Cockpit root, not by
this controller — disposing the controller only detaches the listener.
final
-
replayReports
→ List<
CockpitReplayReport> ? -
The per-step reports of the last verifyReplay, or
nullbefore the first pass.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- savedPath → String?
-
The path or message returned by the last successful saveBundle.
no setter
- session → CockpitInteractionRecordingSession?
-
The current session view (with recomputed counts), or
nullbefore the first start.no setter -
steps
→ List<
CockpitInteractionStep> -
The recorded steps of the current session, oldest first.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
annotate(
String stepId, String note) → void - Replaces the annotation of a recorded step.
-
beginSegment(
String label) → void - Opens a nested segment label.
-
clearError(
) → void - Clears lastError.
-
discardLastStep(
) → void - Removes the most recently recorded step.
-
dispose(
) → void -
Discards any resources used by the object.
override
-
endSegment(
) → void - Closes the most recently opened segment.
-
exportBundle(
) → void - Builds the export bundle of the current session and stores it as lastBundle; earlier bundles are replaced, so re-exporting is always allowed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
pause(
) → void - Pauses the running session.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
resume(
) → void - Resumes a paused session.
-
saveBundle(
) → Future< void> - Persists lastBundle through the export gateway and stores the returned path as savedPath. Ignored while a save is in flight or no bundle exists.
-
start(
[String? name]) → void -
Starts a new recording session, optionally named
name(whitespace trimmed; empty names start an unnamed session). The name surfaces as the exported case document'sname. -
stop(
) → void -
Stops the session;
stoppedis terminal until the next start. -
toString(
) → String -
A string representation of this object.
inherited
-
verifyReplay(
) → Future< void> - Replays the recorded steps in-process and stores the per-step reports as replayReports. Ignored while a pass is already running.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited