Skip to content

[WIP] Fix inconsistent terminology for the TUI - #528

Merged
Nicola Franco (franconicola) merged 5 commits into
mainfrom
claude/tui-improvements
Jul 26, 2026
Merged

[WIP] Fix inconsistent terminology for the TUI#528
Nicola Franco (franconicola) merged 5 commits into
mainfrom
claude/tui-improvements

Conversation

@Claude

@Claude Claude AI commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.


This section details on the original issue you should resolve

<issue_title>TUI Improvements</issue_title>
<issue_description>Improvements
Inconsistent terminology for the TUI

Check colors, run visualization, attack configs.</issue_description>

Comments on the Issue (you are @claude[agent] in this section)

Claude AI and others added 4 commits July 26, 2026 18:23
Agent-Logs-Url: https://github.com/AISecurityLab/hackagent/sessions/a9d77e06-8cce-42c6-855d-c2a2e49a9036

Co-authored-by: franconicola <51865029+franconicola@users.noreply.github.com>
AttacksTab's stylesheet now references $brand-* variables that are only
registered via HackAgentTUI.get_css_variables(). The integration tests
mounted AttacksTab under a bare textual.app.App, which left those
variables unresolved and crashed every test in this file.
@franconicola
Nicola Franco (franconicola) marked this pull request as ready for review July 26, 2026 16:35
@franconicola

Copy link
Copy Markdown
Member

@claude[agent] resolve the merge conflicts in this pull request

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

main split hackagent/cli/tui/views/attacks.py and views/results.py into
packages while this branch modified the monolithic modules. The branch's
terminology, colour and attack-config changes are re-applied to the new
layout: theme-driven outcome/run-state vocabulary in results/{table,tab,
details}.py and results/formatters/{summaries,traces,run_report}.py, and
the attack config wording plus escalate default in attacks/{layout,runner,
tab}.py. The new snapshot host apps now expose the brand CSS variables.

Co-authored-by: franconicola <51865029+franconicola@users.noreply.github.com>
@Claude

Claude AI commented Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

@claude[agent] resolve the merge conflicts in this pull request

Resolved in c74d7c6.

main had split hackagent/cli/tui/views/attacks.py and views/results.py into packages (#525), so both files came through as modify/delete conflicts. I took main's package layout and re-applied every change from this branch onto the new modules:

  • results/formatters/summaries.py — theme-driven _get_result_status_info
  • results/formatters/traces.py — shared Vulnerable/Mitigated marker
  • results/formatters/run_report.py — outcome-keyed stats bar, "Total Results", fixed bright_{color} markup
  • results/table.py — run-state icons, vulnerable/mitigated ratio, robustness bar
  • results/tab.py — collapsible CSS classes, table columns, counts cache
  • results/details.py — outcome-driven collapsible class/title, run-state icon
  • attacks/{layout,runner,tab}.py — "Attacks" wording, escalate default True, $brand-text

The new snapshot host apps also needed get_css_variables() so the $brand-* variables resolve; one snapshot was regenerated. ruff check/format clean, 302 passed / 106 skipped across tests/unit/cli and tests/integration/tui.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.openai.com
    • Triggering command: /home/REDACTED/work/hackagent/hackagent/.venv/bin/pytest pytest tests/unit tests/integration/tui -q rev-�� --abbrev-ref HEAD (dns block)
  • gitlab.com
    • Triggering command: /home/REDACTED/work/hackagent/hackagent/.venv/bin/pytest pytest tests/unit/cli tests/integration/tui -q ev/n�� /usr/bin/base64 base64 /usr/bin/base64 (dns block)
    • Triggering command: /home/REDACTED/work/hackagent/hackagent/.venv/bin/pytest pytest tests/unit tests/integration/tui -q rev-�� --abbrev-ref HEAD (dns block)
    • Triggering command: /home/REDACTED/work/hackagent/hackagent/.venv/bin/pytest pytest tests/unit/cli tests/integration/tui -q -d /usr/bin/base64 git /home/REDACTED/.cargo/bin/git --abbrev-ref h &amp;&amp; shopt -u ex-d /usr/bin/base64 git rev-�� --abbrev-ref HEAD /usr/bin/base64 cal/bin/sh base64 /usr/bin/base64 base64 (dns block)
  • huggingface.co
    • Triggering command: /home/REDACTED/work/hackagent/hackagent/.venv/bin/pytest pytest tests/unit tests/integration/tui -q rev-�� --abbrev-ref HEAD (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@franconicola
Nicola Franco (franconicola) merged commit 13a881a into main Jul 26, 2026
24 checks passed
@franconicola
Nicola Franco (franconicola) deleted the claude/tui-improvements branch July 26, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI Improvements

2 participants