50 lines
2.3 KiB
Markdown
50 lines
2.3 KiB
Markdown
# za-tui screens/main.py — screen composition and manual sidebar toggle
|
|
|
|
## Metadata
|
|
|
|
| Field | Value |
|
|
|---|---|
|
|
| Institute | Molodetz Institute — Research & Retrieval Division |
|
|
| Subject | tui-framework-design |
|
|
| Document type | Source Dossier |
|
|
| Tier | 1 |
|
|
| Source title | za-tui screens/main.py — main screen (Textual Zalo client) |
|
|
| Source URL | https://raw.githubusercontent.com/buihongduc132/za-tui/main/src/za_tui/screens/main.py |
|
|
| Source publisher / author | buihongduc132 (za-tui project) |
|
|
| Source type | repository |
|
|
| Source date (published) | Unknown — not stated |
|
|
| Date researched | 2026-10-11 |
|
|
| Researched by | tai (agent), model: Muse Spark, on behalf of retoor |
|
|
| Research method | direct page fetch |
|
|
| Confidence | Medium |
|
|
| Status | Active |
|
|
|
|
## Summary
|
|
|
|
Main-screen composition (Header, StatusBar, sidebar/chat Horizontal, Footer) with F2 sidebar toggle and F6 focus cycling — and a code comment stating that `on_resize` auto-hide of the sidebar was intentionally omitted because it breaks tests, keeping the manual toggle instead. The deliberate omission is the key finding.
|
|
|
|
## Key findings
|
|
|
|
- `MainScreen` composes a Header, StatusBar, a Horizontal split of Sidebar and chat area, and a Footer.
|
|
- `F2` toggles the sidebar; `Ctrl+B` is a manual toggle alternative; `F6` cycles focus Sidebar → ChatView → InputBar.
|
|
- A code comment records that automatic sidebar hiding on resize was intentionally omitted (it breaks tests); manual toggle is the shipped behavior.
|
|
|
|
## Pros / strengths
|
|
|
|
- Honest in-code rationale for shipping manual toggle over auto-hide gives tai a precedent for sequencing: manual first, automatic later.
|
|
- F6 single-key focus cycling is a simple alternative to Tab cycling.
|
|
|
|
## Cons / limitations / caveats
|
|
|
|
- No automatic narrow-terminal behavior to copy — this source is evidence for what to defer, not a breakpoint implementation.
|
|
|
|
## Relevance to tai
|
|
|
|
- Directly shapes the messaging-layout conclusion's sequencing: ship a manual sidebar toggle first (F2/Ctrl+B style), add the sub-80-column auto-hide as an enhancement, per this source's stated reasoning.
|
|
|
|
## Changelog
|
|
|
|
| Date | Change |
|
|
|---|---|
|
|
| 2026-10-11 | Initial dossier created from 2026-10-11 research-pass evidence (body opened via web_fetch by researching agent). |
|