Expand description
Application state updater (TEA update function).
Application state updater (TEA update function).
The Message enum defines every action the app can take.
The update() function is a pure state transition โ it takes
a mutable App reference and a Message, modifies state,
and returns a Cmd describing any async side-effects to perform.
Enumsยง
- Message
- Every action the application can take.
Functionsยง
- apply_
sort - Sort
app.patchsets.itemsin-place by the active sort column and direction. - compute_
comment_ ๐positions - Compute line positions of comment boundaries in a patchset detail.
- handle_
back ๐ - Handle
Message::Backโ close help, clear search filter, or return from detail. - handle_
bookmark_ ๐filter_ toggle - Toggle the bookmark-only display filter.
- handle_
bookmark_ ๐toggle - Handle
Message::BookmarkToggleโ toggle bookmark on the selected patchset. - handle_
comment_ ๐nav - Handle comment navigation (n/N) in the detail view.
- handle_
detail_ ๐loaded - Handle API response for patchset detail.
- handle_
lists_ ๐loaded - Handle API response for mailing lists.
- handle_
message_ ๐detail_ loaded - Handle
Message::MessageDetailLoadedโ store and show message detail. - handle_
messages_ ๐loaded - Handle
Message::MessagesLoadedโ store message list. - handle_
page_ ๐nav - Handle page navigation (
NextPage/PrevPage). - handle_
patchsets_ ๐loaded - Handle API response for patchset list.
- handle_
reverse_ ๐sort - Toggle the sort direction without changing the column.
- handle_
scroll ๐ - Handle scroll/selection messages, routed by focus panel.
- handle_
search ๐ - Handle search lifecycle messages.
- handle_
select ๐ - Handle
Message::Selectโ dispatch based on focus panel. - handle_
sidebar_ ๐scroll - Handle scroll within the sidebar โ navigate between remotes and mailing lists.
- handle_
sidebar_ ๐select - Handle Enter in the sidebar โ switch remote or apply mailing list filter.
- handle_
sort_ ๐cycle - Advance the sort column to the next variant and reset direction.
- handle_
stats_ ๐loaded - Handle API response for server stats.
- handle_
toggle_ ๐list_ content - Handle
Message::ToggleListContentโ switch between patchsets and messages. - handle_
view_ ๐baseline_ log - Handle
Message::ViewBaselineLogโ open baseline logs in editor. - handle_
view_ ๐raw_ log - Handle
Message::ViewRawLogโ collect review content and open in editor. - log_
message ๐ - Log a message at the appropriate tracing level.
- status_
sort_ ๐key - Map a
PatchsetStatusto a sort key (lifecycle priority order). - switch_
remote ๐ - Switch the active remote to the given index, clear patchset data, and return a fetch command batch.
- update
- Apply a message to the application state and return any commands (async side-effects) to execute.