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.
1 parent ed47468 commit 3bae76636abbc9c321abc716a98036a16bf4e303
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 3 hours ago
Showing 20 changed files
View
clients/terminal/cli.py
View
clients/terminal/tui/chat_model.py
View
clients/terminal/tui/commands/builtin.py
View
clients/terminal/tui/renderers/__init__.py
View
clients/terminal/tui/renderers/artifact.py 100644 → 0
View
clients/terminal/tui/renderers/todo.py
View
clients/terminal/tui/screens/command_palette.py
View
clients/terminal/tui/tui_app.py
View
clients/terminal/tui/widgets/todo_list.py
View
docs/code_review_tui.md 0 → 100644
View
tests/clients/test_chat_panel.py
View
tests/clients/test_code_theme.py
View
tests/clients/test_command_palette.py 0 → 100644
View
tests/clients/test_diff_artifact_renderers.py 100644 → 0
View
tests/clients/test_diff_renderer.py 0 → 100644
View
tests/clients/test_render_plain.py
View
tests/clients/test_terminal_client.py
View
tests/clients/test_todo_list.py
View
tests/clients/test_todo_renderers.py
View
tests/clients/test_tui_app.py