Status drift warnings

This commit is contained in:
2026-05-02 11:54:07 +02:00
parent 06ed12b2c7
commit 010d23bc38
10 changed files with 538 additions and 8 deletions

View File

@@ -721,6 +721,18 @@ def repository_detail(
<thead><tr><th>Run</th><th>Status</th><th>Started</th><th>Compare</th><th>Error</th></tr></thead>
<tbody>{run_rows or '<tr><td colspan="5" class="muted">No runs yet.</td></tr>'}</tbody>
</table>
<h2>Rebuild Characteristics</h2>
<form class="stack" method="post" action="/ui/repos/{repository_id}/characteristics/rebuild">
<label>Override source path <input name="source_path" placeholder="Optional local path"></label>
<label class="checkbox"><input type="checkbox" name="use_cached_checkout" value="1"> Use cached checkout</label>
<label class="checkbox"><input type="checkbox" name="use_llm_assistance" value="1" checked> Use LLM assistance if configured</label>
<label class="checkbox"><input type="checkbox" name="dry_run" value="1" checked> Dry run only</label>
<label class="checkbox"><input type="checkbox" name="confirm" value="1"> Confirm clearing approved characteristics when dry run is off</label>
<div class="actions">
<button class="secondary" type="submit">Rebuild</button>
<span data-pending>Rebuilding...</span>
</div>
</form>
</section>
<section class="stack">
<div class="panel">
@@ -1146,6 +1158,30 @@ def create_analysis_run_from_form(
)
@router.post("/ui/repos/{repository_id}/characteristics/rebuild")
def rebuild_characteristics_from_form(
repository_id: int,
source_path: str = Form(""),
use_cached_checkout: str | None = Form(None),
use_llm_assistance: str | None = Form(None),
dry_run: str | None = Form(None),
confirm: str | None = Form(None),
service: RegistryService = Depends(get_service),
) -> RedirectResponse:
result = service.rebuild_characteristics_from_scratch(
repository_id,
dry_run=bool(dry_run),
confirm=bool(confirm),
source_path=source_path or None,
use_cached_checkout=bool(use_cached_checkout),
use_llm_assistance=bool(use_llm_assistance),
)
return RedirectResponse(
f"/ui/repos/{repository_id}/analysis-runs/{result.analysis_run.id}",
status_code=303,
)
@router.get("/ui/repos/{repository_id}/analysis-runs/{analysis_run_id}")
def analysis_run_detail(
repository_id: int,