build_tools.syllable_walk_tui.modules.generator.panel

Combiner panel UI component.

This module provides the CombinerPanel widget for name_combiner controls. The panel mirrors the exact CLI options from build_tools/name_combiner.

CLI Options → UI Controls:
--run-dir

→ Determined by which patch panel this is in

--syllables

→ Syllables spinner (2-4, default: 2)

--count

→ Count spinner (default: 10000)

--seed

→ Seed input (None = random)

–frequency-weight → Frequency weight slider (0.0-1.0)

Classes

CombinerPanel

Panel with name_combiner controls for a specific patch.

Module Contents

class build_tools.syllable_walk_tui.modules.generator.panel.CombinerPanel(patch_name='A', **kwargs)[source]

Bases: textual.widgets.Static

Panel with name_combiner controls for a specific patch.

Mirrors the CLI options exactly: - Syllables: 2, 3, or 4 (–syllables) - Count: Number of candidates (–count, default: 10000) - Seed: RNG seed (–seed, None = random) - Frequency Weight: Sampling bias (–frequency-weight, default: 1.0)

Parameters:

patch_name (str) – Name of the patch (“A” or “B”)

Initialize combiner panel.

Parameters:

patch_name (str) – Name of the patch (“A” or “B”)

DEFAULT_CSS = Multiline-String
Show Value
"""
    CombinerPanel {
        width: 100%;
        height: auto;
        padding: 1;
    }

    CombinerPanel .panel-header {
        text-style: bold;
        color: $accent;
        margin-bottom: 1;
    }

    CombinerPanel .control-row {
        height: auto;
        margin-bottom: 1;
    }

    CombinerPanel .mode-label {
        margin-top: 1;
        margin-bottom: 0;
    }

    CombinerPanel .mode-options {
        layout: horizontal;
        height: auto;
        margin-bottom: 1;
    }

    CombinerPanel .combiner-mode-options {
        layout: vertical;
        height: auto;
        margin-bottom: 1;
    }

    /* Override spinner-value width for count spinner (needs room for 100000) */
    #combiner-count-a .spinner-value,
    #combiner-count-b .spinner-value {
        width: 10;
    }

    CombinerPanel .generate-button {
        margin-top: 1;
        margin-bottom: 1;
    }

    CombinerPanel .output-section {
        margin-top: 1;
        border-top: solid $primary-darken-2;
        padding-top: 1;
    }

    CombinerPanel .output-header {
        text-style: bold;
        color: $primary;
        margin-bottom: 1;
    }

    CombinerPanel .meta-line {
        color: $text;
    }

    CombinerPanel .meta-label {
        color: $text-muted;
    }

    CombinerPanel .meta-value {
        color: $success;
    }

    CombinerPanel .meta-path {
        color: $accent;
        text-style: italic;
    }

    CombinerPanel .placeholder {
        color: $text-muted;
        text-style: italic;
    }
    """

Default TCSS.

patch_name = 'A'
compose()[source]

Create combiner panel layout matching CLI options.

update_output(meta=None)[source]

Update the output display with combiner metadata.

Parameters:

meta (dict | None) – Metadata dict from combiner (matches nltk_combiner_meta.json structure) Keys: tool, version, generated_at, arguments, output

clear_output()[source]

Clear the output display.