MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / modalSize

Method modalSize

internal/ui/program.go:560–576  ·  view source on GitHub ↗

modalSize returns the outer width/height of the detail modal — capped so it doesn't get unreadably wide on big monitors, and clamped so small terminals still get something usable.

()

Source from the content-addressed store, hash-verified

558// it doesn't get unreadably wide on big monitors, and clamped so small
559// terminals still get something usable.
560func (m *harness) modalSize() (int, int) {
561 w := m.width - 4
562 if w > debugModalMaxWidth {
563 w = debugModalMaxWidth
564 }
565 if w < 30 {
566 w = 30
567 }
568 h := m.height - 4
569 if h > debugModalMaxHeight {
570 h = debugModalMaxHeight
571 }
572 if h < debugModalMinHeight {
573 h = debugModalMinHeight
574 }
575 return w, h
576}
577
578// refreshDebugContent re-renders the debug ring into the debug viewport.
579// Two modes:

Callers 3

layoutMethod · 0.95
viewApprovalModalMethod · 0.95
viewDebugModalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected