Repository Analysis

abi/screenshot-to-code

Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)

6.8 Low AI signal View on GitHub
6.8
Adjusted Score
6.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
72,737
Stars
TypeScript
Language
46,098
Lines of Code
234
Files
263
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 16LOW 247

Pattern Findings

263 matches across 9 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers154 hits · 164 pts
SeverityFileLineSnippet
LOWdesign-docs/commits-and-variants.md120async def process_variant_completion(index: int, task: asyncio.Task):
LOWfrontend/src/components/settings/GenerationSettings.tsx33 function setSelectedDesignSystemId(id: string | null) {
LOWfrontend/src/components/agent/AgentActivity.tsx77function formatVariantWallClockDuration(
LOW…tend/src/components/unified-input/UnifiedInputPane.tsx47 function setSelectedDesignSystemId(id: string | null) {
LOWfrontend/src/components/preview/download.ts14function filenameFromContentDisposition(contentDisposition: string | null) {
LOWfrontend/src/lib/design-systems.ts46export function createHttpDesignSystemsRequest(
LOWfrontend/src/lib/design-systems.ts67export function createDesignSystemsClient(
LOWfrontend/src/lib/prompt-history.ts65export function resolveAssetIdsToDataUrls(
LOWfrontend/src/lib/prompt-history.ts100export function buildAssistantHistoryMessage(
LOWbackend/llm.py119def get_openai_reasoning_effort(model: Llm) -> str | None:
LOWbackend/video/utils.py21def get_video_bytes_and_mime_type(video_data_url: str) -> tuple[bytes, str]:
LOWbackend/evals/runner.py27def get_eval_output_subfolder(stack: Stack, model: str) -> str:
LOWbackend/tests/test_status_broadcast.py15async def test_video_update_broadcasts_two_variants() -> None:
LOWbackend/tests/test_status_broadcast.py67async def test_image_update_broadcasts_two_variants() -> None:
LOWbackend/tests/test_screenshot.py8 def test_url_without_protocol(self):
LOWbackend/tests/test_screenshot.py14 def test_url_with_http_protocol(self):
LOWbackend/tests/test_screenshot.py19 def test_url_with_https_protocol(self):
LOWbackend/tests/test_screenshot.py24 def test_url_with_path_and_params(self):
LOWbackend/tests/test_design_systems.py18async def test_design_system_crud_persists_to_backend_file(
LOWbackend/tests/test_openai_input_compare.py9def test_compare_openai_inputs_returns_none_for_identical_inputs() -> None:
LOWbackend/tests/test_openai_input_compare.py26def test_compare_openai_inputs_finds_first_different_block_and_field() -> None:
LOWbackend/tests/test_openai_input_compare.py70def test_compare_openai_inputs_accepts_raw_input_arrays() -> None:
LOWbackend/tests/test_request_parsing.py4def test_parse_prompt_content_with_valid_data() -> None:
LOWbackend/tests/test_request_parsing.py20def test_parse_prompt_content_filters_invalid_media_types() -> None:
LOWbackend/tests/test_request_parsing.py36def test_parse_prompt_content_defaults_for_invalid_payload() -> None:
LOWbackend/tests/test_request_parsing.py42def test_parse_prompt_history_with_valid_entries() -> None:
LOWbackend/tests/test_request_parsing.py76def test_parse_prompt_history_filters_invalid_items() -> None:
LOWbackend/tests/test_request_parsing.py102def test_parse_prompt_history_defaults_for_invalid_payload() -> None:
LOWbackend/tests/test_batching.py12async def test_process_tasks_batches_replicate_calls(
LOWbackend/tests/test_batching.py39async def test_remove_background_batches_calls(
LOWbackend/tests/test_prompts.py94 def test_plan_create_uses_create_from_input(self) -> None:
LOWbackend/tests/test_prompts.py105 async def test_create_prompt_includes_design_system(self) -> None:
LOWbackend/tests/test_prompts.py133 def test_plan_update_with_history_uses_history_strategy(self) -> None:
LOWbackend/tests/test_prompts.py143 def test_plan_update_without_history_uses_file_snapshot_strategy(self) -> None:
LOWbackend/tests/test_prompts.py154 async def test_image_mode_create_single_image(self) -> None:
LOWbackend/tests/test_prompts.py203 async def test_image_mode_create_with_image_generation_disabled(self) -> None:
LOWbackend/tests/test_prompts.py240 async def test_image_mode_update_with_history(self) -> None:
LOWbackend/tests/test_prompts.py299 async def test_update_history_with_image_generation_disabled(self) -> None:
LOWbackend/tests/test_prompts.py325 async def test_text_mode_create_generation(self) -> None:
LOWbackend/tests/test_prompts.py368 async def test_text_mode_update_with_history(self) -> None:
LOWbackend/tests/test_prompts.py435 async def test_video_mode_basic_prompt_creation(self) -> None:
LOWbackend/tests/test_prompts.py489 async def test_create_raises_on_unsupported_input_mode(self) -> None:
LOWbackend/tests/test_prompts.py506 async def test_image_mode_update_with_single_image_in_history(self) -> None:
LOWbackend/tests/test_prompts.py576 async def test_image_mode_update_with_multiple_images_in_history(self) -> None:
LOWbackend/tests/test_prompts.py654 async def test_update_with_empty_images_arrays(self) -> None:
LOWbackend/tests/test_prompts.py711 async def test_update_bootstraps_from_file_state_when_history_is_empty(self) -> None:
LOWbackend/tests/test_prompts.py779 async def test_update_requires_history_or_file_state(self) -> None:
LOWbackend/tests/test_prompts.py790 async def test_update_history_requires_user_message(self) -> None:
LOWbackend/tests/test_agent_tool_runtime.py8def test_edit_file_returns_structured_result_with_diff() -> None:
LOWbackend/tests/test_agent_tool_runtime.py40async def test_execute_edit_file_uses_updated_result_shape() -> None:
LOWbackend/tests/test_image_generation_replicate.py6def test_extract_output_url_from_string() -> None:
LOWbackend/tests/test_image_generation_replicate.py13def test_extract_output_url_from_dict() -> None:
LOWbackend/tests/test_image_generation_replicate.py20def test_extract_output_url_from_list() -> None:
LOWbackend/tests/test_image_generation_replicate.py27def test_extract_output_url_from_list_item_dict() -> None:
LOWbackend/tests/test_image_generation_replicate.py36def test_extract_output_url_invalid_raises() -> None:
LOWbackend/tests/test_image_generation_replicate.py42async def test_call_replicate_uses_flux_model(monkeypatch: pytest.MonkeyPatch) -> None:
LOWbackend/tests/test_image_generation_replicate.py45 async def fake_call_replicate_model(
LOWbackend/tests/test_image_generation_replicate.py63async def test_remove_background_uses_version_and_normalizes_output(
LOWbackend/tests/test_image_generation_replicate.py68 async def fake_call_replicate_version(
LOWbackend/tests/test_openai_reasoning_parser.py12async def test_reasoning_summary_part_skipped_after_summary_delta() -> None:
94 more matches not shown…
Decorative Section Separators12 hits · 45 pts
SeverityFileLineSnippet
MEDIUMbackend/tests/test_token_usage.py41# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py43# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py106# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py108# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py276# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py278# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py12# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py14# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py168# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py170# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py228# ---------------------------------------------------------------------------
MEDIUMbackend/tests/test_token_usage.py230# ---------------------------------------------------------------------------
Unused Imports42 hits · 42 pts
SeverityFileLineSnippet
LOWbackend/video/__init__.py1
LOWbackend/video/__init__.py1
LOWbackend/evals/core.py11
LOWbackend/image_generation/core.py1
LOWbackend/image_generation/core.py1
LOWbackend/image_generation/core.py1
LOWbackend/agent/tools/__init__.py1
LOWbackend/agent/tools/__init__.py2
LOWbackend/agent/tools/__init__.py2
LOWbackend/agent/tools/__init__.py2
LOWbackend/agent/tools/__init__.py7
LOWbackend/agent/tools/__init__.py7
LOWbackend/agent/tools/__init__.py8
LOWbackend/agent/tools/__init__.py8
LOWbackend/agent/tools/__init__.py9
LOWbackend/agent/tools/__init__.py9
LOWbackend/agent/tools/__init__.py9
LOWbackend/agent/tools/runtime.py4
LOWbackend/agent/providers/__init__.py1
LOWbackend/agent/providers/__init__.py1
LOWbackend/agent/providers/__init__.py2
LOWbackend/agent/providers/__init__.py2
LOWbackend/agent/providers/__init__.py2
LOWbackend/agent/providers/__init__.py2
LOWbackend/agent/providers/__init__.py2
LOWbackend/agent/providers/__init__.py9
LOWbackend/agent/providers/__init__.py10
LOWbackend/agent/providers/__init__.py10
LOWbackend/agent/providers/__init__.py11
LOWbackend/agent/providers/__init__.py11
LOWbackend/agent/providers/__init__.py11
LOWbackend/agent/providers/types.py1
LOWbackend/agent/providers/types.py1
LOWbackend/agent/providers/types.py1
LOWbackend/agent/providers/token_usage.py1
LOWbackend/agent/providers/anthropic/__init__.py1
LOWbackend/agent/providers/anthropic/__init__.py1
LOWbackend/agent/providers/anthropic/__init__.py1
LOWbackend/prompts/__init__.py1
LOWbackend/prompts/update/__init__.py1
LOWbackend/prompts/update/__init__.py2
LOWbackend/routes/generate_code.py9
Excessive Try-Catch Wrapping26 hits · 33 pts
SeverityFileLineSnippet
LOWplan.md61 except Exception as e:
LOWbackend/evals/runner.py89 except Exception as e:
LOWbackend/evals/runner.py263 except Exception as e_write:
LOWbackend/evals/runner.py294 except Exception as e_as_completed:
LOWbackend/evals/runner.py329 except Exception as e:
MEDIUMbackend/evals/runner.py330 print(f"Error writing timing file {timing_file_path}: {e}")
LOWbackend/evals/runner.py339 except Exception as e:
MEDIUMbackend/evals/runner.py340 print(f"Error writing failed tasks log {failed_log_path}: {e}")
LOWbackend/image_generation/replicate.py79 except Exception as exc:
LOWbackend/agent/tools/parsing.py73 except Exception:
LOWbackend/agent/providers/gemini.py111 except Exception:
LOWbackend/fs_logging/gemini_prompt_report.py100 except Exception as e:
LOWbackend/fs_logging/openai_turn_inputs.py205 except Exception as e:
MEDIUMbackend/routes/generate_code.py177 print(f"Error (variant {variantIndex + 1}): {value}")
LOWbackend/routes/generate_code.py397 except Exception:
LOWbackend/routes/generate_code.py481 except Exception:
LOWbackend/routes/generate_code.py634 except Exception as e:
MEDIUMbackend/routes/generate_code.py635 print(f"Error in variant {index + 1}: {e}")
LOWbackend/routes/generate_code.py781 except Exception as e:
LOWbackend/routes/evals.py47 except Exception as e:
LOWbackend/routes/evals.py101 except Exception as e:
LOWbackend/routes/evals.py381 except Exception as e:
LOWbackend/routes/evals.py516 except Exception as e:
LOWbackend/routes/export.py355 except Exception as exc:
LOWbackend/routes/screenshot.py105 except Exception as e:
LOWbackend/debug/DebugFileWriter.py26 except Exception as e:
Deep Nesting19 hits · 19 pts
SeverityFileLineSnippet
LOWbackend/utils.py12
LOWbackend/utils.py39
LOWbackend/utils.py100
LOWbackend/utils.py172
LOWbackend/evals/runner.py110
LOWbackend/agent/engine.py149
LOWbackend/agent/providers/gemini.py117
LOWbackend/agent/providers/openai.py27
LOWbackend/agent/providers/openai.py78
LOWbackend/agent/providers/openai.py161
LOWbackend/agent/providers/openai.py81
LOWbackend/agent/providers/anthropic/provider.py171
LOWbackend/fs_logging/openai_input_formatting.py96
LOWbackend/routes/generate_code.py163
LOWbackend/routes/generate_code.py248
LOWbackend/routes/generate_code.py405
LOWbackend/routes/evals.py54
LOWbackend/routes/evals.py112
LOWbackend/routes/evals.py413
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippet
LOWbackend/routes/generate_code.py766 # Check if all variants failed
LOWbackend/routes/screenshot.py20 # Check if we have a scheme
LOWbackend/routes/screenshot.py28 # Check if this might be a domain with port (like example.com:8080)
Fake / Example Data3 hits · 4 pts
SeverityFileLineSnippet
LOWbackend/tests/test_prompt_summary.py17 {"role": "system", "content": "lorem ipsum dolor sit amet"},
LOWbackend/tests/test_prompt_summary.py17 {"role": "system", "content": "lorem ipsum dolor sit amet"},
LOWbackend/tests/test_prompt_summary.py35 assert "SYSTEM: lorem ipsum" in summary
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippet
LOWfrontend/src/index.css141 90deg,
LOWbackend/.pre-commit-config.yaml1# See https://pre-commit.com for more information
LOWbackend/.pre-commit-config.yaml21 # # entry: poetry run --directory backend pyright
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
LOWdocker-compose.yml14 #- BACKEND_PORT=7001 # if you change the port, make sure to also change the VITE_WS_BACKEND_URL at frontend/.env