Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/tau_coding/tui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,10 @@ class TauTuiApp(App[None]):
dock: top;
}

Header.-tall {
height: 1;
}

Footer {
background: $tau-chrome-background;
color: $tau-chrome-text;
Expand Down Expand Up @@ -2120,7 +2124,7 @@ def get_theme_variable_defaults(self) -> dict[str, str]:

def compose(self) -> ComposeResult:
"""Compose the TUI widgets."""
yield Header()
yield Header(id="header")
with Horizontal(id="workspace"):
yield SessionSidebar(id="sidebar")
with Vertical(id="main-pane"):
Expand Down
21 changes: 21 additions & 0 deletions tests/test_tui_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3542,6 +3542,27 @@ async def test_tui_app_notifications_render_literal_markup_text() -> None:
assert notification.markup is False


@pytest.mark.anyio
async def test_tui_app_clicking_header_does_not_resize_workspace() -> None:
app = TauTuiApp(FakeSession())

async with app.run_test(size=(120, 30)) as pilot:
header = app.query_one("#header")
workspace = app.query_one("#workspace")
sidebar = app.query_one("#sidebar")
assert sidebar.display is True
initial_header_height = header.region.height
initial_workspace_region = workspace.region
initial_sidebar_region = sidebar.region

await pilot.click("#header")
await pilot.pause()

assert header.region.height == initial_header_height == 1
assert workspace.region == initial_workspace_region
assert sidebar.region == initial_sidebar_region


@pytest.mark.anyio
async def test_tui_app_clicking_transcript_refocuses_prompt() -> None:
app = TauTuiApp(FakeSession())
Expand Down