feat: ada dashboard subcommand - #1
Conversation
Adds `ada dashboard [-p PORT]` that launches a Python HTTP server on 0.0.0.0:7070 showing live ATS task status, ada service health, and log file tails with auto-refresh every 5 seconds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3ff63484f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| allowed = any(real.startswith(os.path.realpath(d)) for d in LOG_DIRS) | ||
| if not allowed or not real.endswith(".log"): |
There was a problem hiding this comment.
Enforce directory boundary when authorizing log paths
The /api/logs/tail authorization check uses real.startswith(os.path.realpath(d)), which accepts sibling paths like /tmpfoo/secret.log when /tmp is allowed. That means a caller can read .log files outside the intended ~/.ada/logs and /tmp directories by choosing a prefix-matching path, which is especially risky because the server listens on 0.0.0.0.
Useful? React with 👍 / 👎.
| port=7070 | ||
| while [[ $# -gt 0 ]]; do | ||
| case "$1" in | ||
| -p|--port) port="$2"; shift 2 ;; |
There was a problem hiding this comment.
Validate dashboard port flag before consuming argument
The dashboard option parser reads port="$2" unconditionally for -p/--port; running ada dashboard -p without a value triggers set -u's unbound-variable error instead of a controlled CLI error message. This creates a user-facing failure path for a common argument mistake and bypasses the script’s normal die-based usage handling.
Useful? React with 👍 / 👎.
mikkel
left a comment
There was a problem hiding this comment.
@/ml2/nanobot/.pr-review-state/review-body.tmp
Summary
ada dashboard [-p PORT]subcommand that launches a lightweight Python HTTP server on0.0.0.0:7070~/.ada/logs/and/tmp/*.logTest plan
ada dashboardand open http://localhost:7070 in browser-pflag:ada dashboard -p 8080🤖 Generated with Claude Code