Skip to content

feat(tui): Phase 2 dynamic metrics — compaction/STT models, inference params, test coverage #2160

@bug-ops

Description

@bug-ops

Context

PR #2159 implemented Phase 1 TUI dynamic metrics. Phase 2 items were deferred due to cross-crate complexity or lower priority.

Tasks

Cross-crate model fields

  • stt_model: Option<String> — STT model name; requires plumbing through zeph-channels or a dedicated config accessor
  • compaction_model: Option<String> — summarization/compaction model; lives in llm.summary_model config but not currently exposed in MetricsSnapshot

Inference parameter display

  • provider_temperature: Option<f32> — current temperature for active provider
  • provider_top_p: Option<f32> — current top_p for active provider
  • These are runtime-dynamic (can change on /provider switch) so require watch channel update, not just startup population

Naming fix

  • Rename cache_enabledsemantic_cache_enabled in MetricsSnapshot to distinguish from response cache (response_cache_enabled)

Test coverage gaps (identified by tester in PR #2159)

  • default_metrics_snapshot test: assert new Phase 1 fields default to zero/empty/false
  • MetricsCollector::update round-trip test for new fields
  • Resources panel collapsed mode: assert ch: (active_channel) segment visible
  • Resources panel: token_budget Some + compaction_threshold None branch
  • Resources panel: individual flag rendering (self_learning_enabled alone)
  • Resources panel: embedding_model conditional (non-empty) display
  • Status bar: model_name non-empty shows inline model segment

Active channel detection improvement

  • Replace telegram-token-presence proxy in runner.rs with explicit AnyChannel variant passed to MetricsSnapshot — more robust and accurate

Resources panel

  • Decide whether filter confidence line should appear in the Resources panel (dropped in Phase 1 refactor — N3 from reviewer)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions