|
tui: code-review Etap 1 — crash/injection/reconnect fixes + drop artifact renderer
Point fixes from the full TUI/terminal-client code review (docs/code_review_tui.md), each with a covering test: - command_palette: guard on_list_view_selected against IndexError when the filter is empty and the placeholder row is selected. - cli /profile: read session_id (not the absent "id") from the server — the handler no longer KeyErrors. - todo_list: escape task text/validation/index/milestone before interpolating into rich markup so a task like "fix [bug]" no longer breaks the line styling. - builtin /help: drop bold markup tags from status content — StatusRenderer builds a literal Text() that would show the tags as literal square brackets. - tui_app on_user_submitted: always enqueue when a bridge exists (the input loop buffers across reconnect) instead of dropping the message on connected=False. - chat_model stream_start: also reset _current_thinking so a dropped turn (no thinking_end) does not glue the next turn's reasoning onto the old block. - todo renderer update: coerce validation to str before .strip() so a non-string JSON value does not AttributeError. - renderers: remove the unused ArtifactRenderer (no production path emits type=artifact — TUI shows files via the OS); keep the diff renderer test. Full suite: 937 passed, 1 skipped. |
|---|
|
|
| clients/terminal/cli.py |
|---|
| clients/terminal/tui/chat_model.py |
|---|
| clients/terminal/tui/commands/builtin.py |
|---|
| clients/terminal/tui/renderers/__init__.py |
|---|
| clients/terminal/tui/renderers/artifact.py 100644 → 0 |
|---|
| clients/terminal/tui/renderers/todo.py |
|---|
| clients/terminal/tui/screens/command_palette.py |
|---|
| clients/terminal/tui/tui_app.py |
|---|
| clients/terminal/tui/widgets/todo_list.py |
|---|
| docs/code_review_tui.md 0 → 100644 |
|---|
| tests/clients/test_chat_panel.py |
|---|
| tests/clients/test_code_theme.py |
|---|
| tests/clients/test_command_palette.py 0 → 100644 |
|---|
| tests/clients/test_diff_artifact_renderers.py 100644 → 0 |
|---|
| tests/clients/test_diff_renderer.py 0 → 100644 |
|---|
| tests/clients/test_render_plain.py |
|---|
| tests/clients/test_terminal_client.py |
|---|
| tests/clients/test_todo_list.py |
|---|
| tests/clients/test_todo_renderers.py |
|---|
| tests/clients/test_tui_app.py |
|---|