Skip to content

feat: cast init interactive menu + dashboard parse-error fix#4

Merged
shenxianpeng merged 2 commits intomainfrom
claude/review-todo-features-KVdpe
Mar 28, 2026
Merged

feat: cast init interactive menu + dashboard parse-error fix#4
shenxianpeng merged 2 commits intomainfrom
claude/review-todo-features-KVdpe

Conversation

@shenxianpeng
Copy link
Copy Markdown
Member

Summary

  • cast init interactive type selection: when project type detection fails in a TTY, show a numbered menu instead of exiting. Non-TTY/CI keeps the existing exit-1 behavior.
  • Dashboard parse-error fix: parse_sarif() now returns an ERROR dict instead of None on JSON/IO failure. Failed files show as a visible PARSE ERR row (amber) in the dashboard table. The compliance banner shows PARSE ERRORS instead of the misleading ALL CLEAR when unresolved parse failures exist.

Changes

File What changed
src/cast_cli/main.py Add import sys, _prompt_type_selection() helper, TTY-aware branch in init
dashboard/generate.py parse_sarif() returns error dict; generate_dashboard() includes error rows; render_badge/render_table/render_compliance_banner handle ERROR status
dashboard/template.html CSS: --error-row-bg, .row-error, .badge.error, .parse-error-msg, .compliance-banner.has-parse-errors
tests/test_dashboard.py Update 2 tests to match new behavior

Test plan

  • All 65 tests pass (pytest tests/ -v)
  • cast init in a TTY with no project markers shows numbered menu
  • cast init in CI (non-TTY) with no project markers exits 1 with instructions
  • cast init --type go still works as before
  • Dashboard with a malformed SARIF shows PARSE ERR row, not ALL CLEAR
  • Dashboard with both a valid SARIF and a bad SARIF shows both rows correctly

https://claude.ai/code/session_01PovvcUbam7c1xDTrEPRhT7

claude and others added 2 commits March 28, 2026 11:10
cast init: show a numbered type-selection menu when project detection
fails in a TTY environment; non-TTY/CI keeps the existing exit-1 behavior.

Dashboard: parse_sarif() now returns an ERROR dict instead of None on
JSON/IO failure. ERROR rows are rendered in the table with an amber
PARSE ERR badge and the error message. The compliance banner shows
PARSE ERRORS instead of ALL CLEAR when unresolved parse failures exist.
Updated tests to match new behavior (65 passing).

https://claude.ai/code/session_01PovvcUbam7c1xDTrEPRhT7
@shenxianpeng shenxianpeng merged commit 74f1391 into main Mar 28, 2026
6 checks passed
@shenxianpeng shenxianpeng deleted the claude/review-todo-features-KVdpe branch March 28, 2026 14:18
@shenxianpeng shenxianpeng added enhancement New feature or request minor labels Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants