DiffReviewModel class final TUI
TEA review interaction model with source-anchored selection and threads.
view is the base patch projection. Rich hosts consume highlights and threadPlacements without changing the patch model or reparsing its text. Thread payloads and drafts remain host-owned and should be keyed by thread ID, not by the lifetime of mounted widgets.
- Inheritance
-
- Object
- Model
- ViewComponent
- DiffReviewModel
Constructors
-
DiffReviewModel({required String documentId, required String revision, required GitDiffModel diff, Iterable<
DiffReviewThread> threads = const []}) -
Creates a review for a loaded patch.
factory
Properties
- commentTarget → DiffReviewRange?
-
A submit-ready source target, or null if selection crosses omitted context.
no setter
- diff → GitDiffModel
-
Current patch presentation and base viewport.
final
- document → DiffReviewDocument
-
Stable source index for the current revision.
final
-
expandedThreadIds
→ Set<
String> -
Expanded thread identities, independent of widget mounting.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
highlights
→ List<
DiffCommentLineHighlight> -
Selection decorations; deriving these does not rerender the patch.
latefinal
- rangeStart → DiffCommentLineKey?
-
Fixed source endpoint while range selection is active.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected → DiffCommentLineKey?
-
Selected source key, independent of rendered rows.
final
- selectedAnchor → DiffCommentAnchor?
-
Selected source position resolved against the current layout.
no setter
- selection → DiffReviewRange?
-
Current normalized selection, which may span omitted patch context.
no setter
-
threadPlacements
→ List<
DiffReviewThreadPlacement> -
Exact thread resolution for this layout, retaining both sides and IDs.
latefinal
-
threads
→ Map<
String, DiffReviewThread> -
Thread descriptors indexed by identity, preserving provider order.
final
Methods
-
init(
) → Cmd? -
Returns an optional command to execute on program startup.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Msg msg) → (DiffReviewModel, Cmd?) -
Updates the component state in response to a message.
override
-
view(
) → String -
Renders the current model state for display.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited