class BBS::Windows::MasterDetail

A two-pane browser: left ListBox of items, right ScrollView of details. Selecting an item in the list reloads the detail pane.

BBS::Windows::MasterDetail.open(app,
  title: ' Game Catalog ',
  items: services[:games].all,
  item_label: ->(g) { g.title },
  list_width: 30,
  render_detail: ->(game, width) { GameCard.lines(game, width) },
  actions: [
    { label: '&New', on_click: ->(win) { ... } }
  ],
  bottom_meta: ->(item) { "...optional 1-line meta..." }
)

render_detail is called with (item, width) whenever the selection changes and on first paint. It must return an Array of strings (each one is one rendered line; ANSI is supported). Returning nil shows nothing.

bottom_meta is optional; if given, itโ€™s a ->(item) { text } lambda for a single info line below the detail pane.

actions: are extra buttons (right-aligned by default). A Close button is always appended on the right unless the caller suppresses it via close_button: false.

on_activate is optional: ->(item, window) { ... }, called when the caller presses Enter on a list item. replace_items swaps the list in place (a file browser changing folders) and selects the first item.