import json

try:
    with open(r'C:\Users\Variet-Worker\.gemini\antigravity\bridge\deep-inspect-result.json', 'r', encoding='utf-8', errors='ignore') as f:
        data = json.load(f)

    for node in data.get('nodes', []):
        label = node.get('label', 'unknown')
        btns = node.get('buttons', [])
        print(f"\n[Node] {label} (Total btns: {len(btns)})")
        for i, b in enumerate(btns):
            t = b.get('text', '').replace('\n', ' ').strip()
            hidden = b.get("hidden")
            cls = b.get("class")
            print(f"  {i:3d}: \"{t[:50]}\" (Hidden: {hidden}, Class: {cls[:30]})")

except Exception as e:
    print(f'Error reading JSON: {e}')
