@@ -4,15 +4,11 @@ import { useMemo, useRef, useState } from "react";
44
55export default function Home ( ) {
66 const fileRef = useRef < HTMLInputElement > ( null ) ;
7- const projectRef = useRef < HTMLInputElement > ( null ) ;
87 const [ selectedFile , setSelectedFile ] = useState < File | null > ( null ) ;
9- const [ projectFile , setProjectFile ] = useState < File | null > ( null ) ;
108 const [ status , setStatus ] = useState < string | null > ( null ) ;
119 const [ result , setResult ] = useState < Record < string , unknown > | null > ( null ) ;
1210 const [ rawResult , setRawResult ] = useState < string | null > ( null ) ;
1311 const [ isUploading , setIsUploading ] = useState ( false ) ;
14- const [ profile , setProfile ] = useState < "basic" | "full" > ( "full" ) ;
15- const [ showAdvanced , setShowAdvanced ] = useState ( false ) ;
1612
1713 const examplePayload = {
1814 report : {
@@ -71,15 +67,6 @@ export default function Home() {
7167 setRawResult ( null ) ;
7268 } ;
7369
74- const handleProjectChange = ( event : React . ChangeEvent < HTMLInputElement > ) => {
75- const file = event . target . files ?. [ 0 ] ?? null ;
76- setProjectFile ( file ) ;
77- setStatus ( file ? `Attached ${ file . name } ` : "Project removed" ) ;
78- } ;
79-
80- const handleChooseProject = ( ) => {
81- projectRef . current ?. click ( ) ;
82- } ;
8370
8471 const handleUpload = async ( ) => {
8572 if ( ! selectedFile || isUploading ) {
@@ -93,10 +80,7 @@ export default function Home() {
9380 try {
9481 const form = new FormData ( ) ;
9582 form . append ( "bundle" , selectedFile ) ;
96- form . append ( "profile" , profile ) ;
97- if ( projectFile ) {
98- form . append ( "project" , projectFile ) ;
99- }
83+ form . append ( "profile" , "full" ) ;
10084
10185 const response = await fetch ( "http://127.0.0.1:7070/api/v1/scan" , {
10286 method : "POST" ,
@@ -234,25 +218,6 @@ export default function Home() {
234218 report for privacy, entitlements, signing, and metadata risks.
235219 Designed for AI agents and human reviewers.
236220 </ p >
237- < div className = "hero-actions" >
238- < button className = "primary-button" type = "button" onClick = { handleChooseFile } >
239- Choose bundle
240- </ button >
241- < button className = "secondary-button" type = "button" onClick = { handleChooseProject } >
242- Attach project zip
243- </ button >
244- < button className = "secondary-button" type = "button" onClick = { handleExampleReport } >
245- View example report
246- </ button >
247- </ div >
248- < input
249- ref = { projectRef }
250- className = "file-input"
251- type = "file"
252- accept = ".zip"
253- onChange = { handleProjectChange }
254- hidden
255- />
256221 < div className = "hero-meta" >
257222 < div >
258223 < strong className = "stat" > 2-4 min</ strong >
@@ -336,39 +301,6 @@ export default function Home() {
336301 { selectedFile ? selectedFile . name : "No file selected" }
337302 </ div >
338303 </ div >
339- { showAdvanced ? (
340- < div className = "advanced-panel" >
341- < div className = "advanced-row" >
342- < label htmlFor = "profile-select" > Profile</ label >
343- < select
344- id = "profile-select"
345- value = { profile }
346- onChange = { ( event ) =>
347- setProfile ( event . target . value as "basic" | "full" )
348- }
349- >
350- < option value = "basic" > Basic (core rules)</ option >
351- < option value = "full" > Full (all rules)</ option >
352- </ select >
353- </ div >
354- < div className = "advanced-row" >
355- < label htmlFor = "project-file" > Project zip (optional)</ label >
356- < input
357- ref = { projectRef }
358- id = "project-file"
359- type = "file"
360- accept = ".zip"
361- onChange = { handleProjectChange }
362- />
363- < span className = "advanced-hint" >
364- Zip your .xcodeproj or .xcworkspace to include project context.
365- </ span >
366- </ div >
367- { projectFile ? (
368- < div className = "upload-status" > Attached { projectFile . name } </ div >
369- ) : null }
370- </ div >
371- ) : null }
372304 { status ? < div className = "status-pill" > { status } </ div > : null }
373305 { result ? (
374306 < div className = "report-stack" >
@@ -481,12 +413,8 @@ export default function Home() {
481413 < div >
482414 < strong > Next:</ strong > privacy manifest, entitlements, ATS rules
483415 </ div >
484- < button
485- className = "ghost-button"
486- type = "button"
487- onClick = { ( ) => setShowAdvanced ( ( prev ) => ! prev ) }
488- >
489- { showAdvanced ? "Hide advanced options" : "Advanced options" }
416+ < button className = "ghost-button" type = "button" onClick = { handleExampleReport } >
417+ View example report
490418 </ button >
491419 </ div >
492420 </ div >
0 commit comments