source_browser

Source browser components for displaying and filtering transcription sources

Grouping Selector

Source Browser Item Model


SourceBrowserItem


def SourceBrowserItem(
    item_type:str, group_key:str='', group_display:str='', group_count:int=0, grouping_mode:str='',
    record:Optional=None, is_selected:bool=False
)->None:

Item in the source browser virtual collection (header or record).


build_source_items


def build_source_items(
    transcriptions:List, # Available transcription records
    selected_sources:List, # Currently selected sources
    grouping_mode:str='media_path', # Grouping mode: "media_path" or "batch_id"
)->List: # Flat list with interleaved headers and records

Build the items list for the source browser virtual collection.


is_source_item_skippable


def is_source_item_skippable(
    item:SourceBrowserItem, # Item to check
)->bool: # True if item is a group header (cursor should skip)

Predicate for virtual collection is_skippable parameter.

Virtual Collection Column Definitions & Cell Renderer


create_source_cell_renderer


def create_source_cell_renderer(
    toggle_url:str='', # URL for toggling source selection
    select_all_url:str='', # URL for selecting all in a group
)->Callable: # render_cell(item: SourceBrowserItem, ctx: CellRenderContext) -> Any

Create a render_cell callback for the source browser virtual collection.

Source Browser (Virtual Collection)


build_source_browser_keyboard_system


def build_source_browser_keyboard_system(
    sb_state:Any, # SourceBrowserRouterState (carries vc_ids, vc_btn_ids, vc_urls)
    manager_label:Optional=None, # Human-readable label for the ZoneManager (consumed by render_keyboard_hints_modal section header when this is a child_managers entry)
)->KeyboardSystem: # Complete rendered KeyboardSystem (carries .manager for hierarchical hints handoff)

Build the source browser’s KeyboardSystem standalone.

Lifts the manager construction out of _render_source_browser_vc_content so the underlying ZoneManager is accessible via KeyboardSystem.manager for hierarchical hints handoff. Consumers wiring this as a child of the parent selection-step manager pass the manager to render_keyboard_hints_modal(..., child_managers=[...]) so the modal’s section header reads as manager_label instead of the technical SB_SYSTEM_ID.