feat(dashboard): add decision board for strategy selection
Why: - Compare is the wrong surface for two-stage family selection over the 10-doc set. Changes: - Add the Decision Tab; raise GET /experiments default/max so the board can load the grid client-side. Impact: - Operators pick fixed_size ±N vs semantic@Boundary from existing Experiments. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,7 +8,7 @@ Endpoints:
|
||||
GET /experiments List all experiments
|
||||
"""
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi import APIRouter, Query
|
||||
from fastapi.responses import HTMLResponse
|
||||
|
||||
from src.core.exceptions import BenchmarkError, QueryError
|
||||
@@ -185,9 +185,15 @@ async def get_benchmark(experiment_id: str):
|
||||
|
||||
|
||||
@router.get("/experiments")
|
||||
async def list_experiments(document_id: str | None = None):
|
||||
async def list_experiments(
|
||||
document_id: str | None = None,
|
||||
offset: int = Query(0, ge=0),
|
||||
limit: int = Query(200, ge=1, le=500),
|
||||
):
|
||||
"""List all experiments, optionally filtered by document."""
|
||||
result = benchmark_service.list_experiments(document_id=document_id)
|
||||
result = benchmark_service.list_experiments(
|
||||
document_id=document_id, offset=offset, limit=limit
|
||||
)
|
||||
# Enrich with document filenames and best_strategy
|
||||
from src.storage import sqlite as db
|
||||
for item in result.get("items", []):
|
||||
|
||||
Reference in New Issue
Block a user