Skip to main content

Module update

Module update 

Source
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.items in-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 PatchsetStatus to 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.