littlefig-bench / check_ui.py
ticketguy's picture
Check and fix mobile responsiveness
2e5fc71 verified
#!/usr/bin/env python3
"""Read the Little Fig UI, check mobile responsiveness, fix if needed."""
import subprocess, os
TOKEN = "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"
subprocess.run(["git", "clone", f"https://{TOKEN}@github.com/ticketguy/littlefig.git", "/app/littlefig"], check=True)
os.chdir("/app/littlefig")
subprocess.run(["git", "config", "user.name", "0xticketguy"], check=True)
subprocess.run(["git", "config", "user.email", "0xticketguy@harboria.dev"], check=True)
# Read the current UI
html_path = "src/little_fig/web/static/index.html"
with open(html_path, "r") as f:
html = f.read()
print(f"UI file size: {len(html)} chars")
print(f"Has viewport meta: {'viewport' in html}")
print(f"Has media queries: {'@media' in html}")
print(f"Has Tailwind: {'tailwind' in html.lower()}")
print(f"Has flex/grid: {'flex' in html or 'grid' in html}")
print(f"\nFirst 200 chars:\n{html[:200]}")
print(f"\n... (middle) ...\n")
# Find style section
if '<style' in html:
style_start = html.find('<style')
style_end = html.find('</style>', style_start)
style = html[style_start:style_end+8]
print(f"Style section length: {len(style)} chars")
print(f"Style preview:\n{style[:500]}")
print(f"\nLast 200 chars:\n{html[-200:]}")