Spaces:
Running
Running
feat(ui): activity-aware project sidebar
Browse files- Projects sorted by last activity (latest run, else creation) — the project
a researcher wants is almost always the one they last touched
- Recency groups: Today / This week / Earlier
- Per-project context: run count + relative time (2h ago) instead of raw date
- Search box always visible (was gated behind >5 projects)
- Backend: ProjectOut gains last_activity_at + n_runs (single aggregate query)
- Test: ordering + activity fields (33 tests total)
- CHANGELOG.md +5 -0
- backend/app/main.py +36 -2
- backend/app/schemas.py +2 -0
- backend/static/assets/index-BDrO2FRr.css +1 -0
- backend/static/assets/{index-gF2iJ3kV.js → index-CHG17tHs.js} +0 -0
- backend/static/assets/index-CPF9wqlU.css +0 -1
- backend/static/index.html +2 -2
- backend/tests/test_api.py +10 -0
- frontend/src/App.jsx +98 -48
- frontend/src/Workspace.jsx +23 -27
- frontend/src/styles.css +81 -7
CHANGELOG.md
CHANGED
|
@@ -5,8 +5,13 @@ Format: [Keep a Changelog](https://keepachangelog.com/). User-visible changes on
|
|
| 5 |
## [Unreleased]
|
| 6 |
|
| 7 |
### Fixed
|
|
|
|
|
|
|
|
|
|
| 8 |
- Improved dashboard responsive layout, focus states, and table overflow handling on
|
| 9 |
narrow screens.
|
|
|
|
|
|
|
| 10 |
|
| 11 |
### Added
|
| 12 |
- Repository initialized from the public demo (v0.1 feature set: projects, tolerant CSV/XLSX
|
|
|
|
| 5 |
## [Unreleased]
|
| 6 |
|
| 7 |
### Fixed
|
| 8 |
+
- Project sidebar redesigned for growing lists: always-visible search, recency groups
|
| 9 |
+
(Today / This week / Earlier), per-project run count + relative last-activity time,
|
| 10 |
+
and ordering by last activity instead of creation date.
|
| 11 |
- Improved dashboard responsive layout, focus states, and table overflow handling on
|
| 12 |
narrow screens.
|
| 13 |
+
- Aligned the run-analysis action with the model/language controls and made the project
|
| 14 |
+
sidebar scroll cleanly as project counts grow.
|
| 15 |
|
| 16 |
### Added
|
| 17 |
- Repository initialized from the public demo (v0.1 feature set: projects, tolerant CSV/XLSX
|
backend/app/main.py
CHANGED
|
@@ -156,7 +156,34 @@ def list_languages():
|
|
| 156 |
# --------------------------------------------------------------- projects
|
| 157 |
@app.get("/api/projects", response_model=list[ProjectOut])
|
| 158 |
def list_projects(db: Session = Depends(get_db)):
|
| 159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
|
| 162 |
@app.post("/api/projects", response_model=ProjectOut, status_code=201)
|
|
@@ -164,7 +191,14 @@ def create_project(body: ProjectCreate, db: Session = Depends(get_db)):
|
|
| 164 |
project = Project(name=body.name.strip(), description=body.description.strip())
|
| 165 |
db.add(project)
|
| 166 |
db.commit()
|
| 167 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
|
| 169 |
|
| 170 |
# ----------------------------------------------------------------- corpora
|
|
|
|
| 156 |
# --------------------------------------------------------------- projects
|
| 157 |
@app.get("/api/projects", response_model=list[ProjectOut])
|
| 158 |
def list_projects(db: Session = Depends(get_db)):
|
| 159 |
+
"""Projects ordered by last activity (latest run, else creation) — the
|
| 160 |
+
project a researcher wants is almost always the one they last worked on."""
|
| 161 |
+
from sqlalchemy import func
|
| 162 |
+
|
| 163 |
+
activity = {
|
| 164 |
+
pid: (last, count)
|
| 165 |
+
for pid, last, count in db.query(
|
| 166 |
+
Job.project_id, func.max(Job.created_at), func.count(Job.id)
|
| 167 |
+
)
|
| 168 |
+
.group_by(Job.project_id)
|
| 169 |
+
.all()
|
| 170 |
+
}
|
| 171 |
+
rows = db.query(Project).all()
|
| 172 |
+
out = []
|
| 173 |
+
for p in rows:
|
| 174 |
+
last, count = activity.get(p.id, (None, 0))
|
| 175 |
+
out.append(
|
| 176 |
+
ProjectOut(
|
| 177 |
+
id=p.id,
|
| 178 |
+
name=p.name,
|
| 179 |
+
description=p.description,
|
| 180 |
+
created_at=p.created_at,
|
| 181 |
+
last_activity_at=last or p.created_at,
|
| 182 |
+
n_runs=count,
|
| 183 |
+
)
|
| 184 |
+
)
|
| 185 |
+
out.sort(key=lambda x: x.last_activity_at, reverse=True)
|
| 186 |
+
return out
|
| 187 |
|
| 188 |
|
| 189 |
@app.post("/api/projects", response_model=ProjectOut, status_code=201)
|
|
|
|
| 191 |
project = Project(name=body.name.strip(), description=body.description.strip())
|
| 192 |
db.add(project)
|
| 193 |
db.commit()
|
| 194 |
+
return ProjectOut(
|
| 195 |
+
id=project.id,
|
| 196 |
+
name=project.name,
|
| 197 |
+
description=project.description,
|
| 198 |
+
created_at=project.created_at,
|
| 199 |
+
last_activity_at=project.created_at,
|
| 200 |
+
n_runs=0,
|
| 201 |
+
)
|
| 202 |
|
| 203 |
|
| 204 |
# ----------------------------------------------------------------- corpora
|
backend/app/schemas.py
CHANGED
|
@@ -13,6 +13,8 @@ class ProjectOut(BaseModel):
|
|
| 13 |
name: str
|
| 14 |
description: str
|
| 15 |
created_at: str
|
|
|
|
|
|
|
| 16 |
|
| 17 |
|
| 18 |
class CorpusOut(BaseModel):
|
|
|
|
| 13 |
name: str
|
| 14 |
description: str
|
| 15 |
created_at: str
|
| 16 |
+
last_activity_at: str = "" # latest run creation, else project creation
|
| 17 |
+
n_runs: int = 0
|
| 18 |
|
| 19 |
|
| 20 |
class CorpusOut(BaseModel):
|
backend/static/assets/index-BDrO2FRr.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
:root{--maroon: #7a1f3d;--maroon-dark: #5e1730;--ink: #1d2129;--muted: #667085;--line: #e5e7eb;--bg: #f7f7f8;--card: #ffffff;--ok: #157f3d;--err: #b42318;--accent-soft: #f6ebef;--control-height: 40px}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,sans-serif;color:var(--ink);background:var(--bg);font-size:14.5px;line-height:1.5}.app{display:flex;flex-direction:column;min-height:100vh}.header{background:var(--maroon);color:#fff;padding:14px 28px;display:flex;align-items:baseline;flex-wrap:wrap;gap:14px}.header h1{flex:0 0 auto;font-size:17px;margin:0;font-weight:650;letter-spacing:.2px;white-space:nowrap}.header .sub{flex:1 1 280px;min-width:0;font-size:12.5px;opacity:.85}.layout{display:flex;flex:1;min-width:0;min-height:0}.sidebar{width:250px;background:var(--card);border-right:1px solid var(--line);padding:18px 14px;flex-shrink:0;display:flex;flex-direction:column;min-height:0}.sidebar h2{font-size:11.5px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted);margin:0 0 10px 4px;display:flex;align-items:center;gap:8px}.sidebar h2 .count{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:0 8px;font-size:10.5px;letter-spacing:0;color:var(--muted)}.sidebar-filter{width:100%;padding:7px 10px;margin-bottom:10px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:13px;background:#fff;color:var(--ink)}.sidebar-filter:focus{outline:none;border-color:var(--maroon)}.project-list{flex:1;min-height:0;overflow-y:auto;margin:0 -4px;padding:0 4px 4px}.group-label{font-size:10.5px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:10px 4px 5px}div:first-child>.group-label{margin-top:2px}.project-item{display:block;width:100%;text-align:left;padding:9px 12px;margin-bottom:5px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;font:inherit;color:var(--ink)}.project-item:hover{background:var(--bg)}.project-item.active{background:var(--accent-soft);border-color:var(--maroon);font-weight:600}.project-item .project-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.project-item .date{display:block;font-size:11.5px;color:var(--muted);font-weight:400}.project-create{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}.project-create>button{width:100%}.main{flex:1;padding:22px 28px;overflow-y:auto;min-width:0}.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:18px 20px;margin-bottom:16px}.card h3{margin:0 0 4px;font-size:15px}.card .hint{color:var(--muted);font-size:12.5px;margin:0 0 12px}.step-badge{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:var(--maroon);color:#fff;font-size:12px;font-weight:700;margin-right:8px;vertical-align:-3px}button{white-space:nowrap}button.primary{background:var(--maroon);color:#fff;border:none;min-height:var(--control-height);display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer;line-height:1.2}button.primary:hover{background:var(--maroon-dark)}button.primary:disabled{background:#c9ccd1;cursor:not-allowed}button.ghost{background:none;border:1px solid var(--line);color:var(--ink);min-height:var(--control-height);display:inline-flex;align-items:center;justify-content:center;padding:0 14px;border-radius:8px;font:inherit;cursor:pointer;line-height:1.2}button.ghost:hover{border-color:var(--maroon);color:var(--maroon)}button.linkish{background:none;border:none;color:var(--maroon);font:inherit;cursor:pointer;padding:0;text-decoration:underline}input[type=text],textarea,select{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font:inherit;background:#fff;color:var(--ink)}input[type=text],select{height:var(--control-height)}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid rgba(122,31,61,.38);outline-offset:2px}input[type=file]{display:block;max-width:100%;margin-top:6px;font-size:13px;color:var(--muted)}input[type=file]::file-selector-button{background:#fff;border:1px solid var(--line);color:var(--ink);padding:7px 14px;border-radius:8px;font:inherit;font-size:13px;cursor:pointer;margin-right:10px}input[type=file]::file-selector-button:hover{border-color:var(--maroon);color:var(--maroon)}.row>button{align-self:flex-end;margin-bottom:1px}textarea{resize:vertical}label.field{display:block;margin-bottom:10px;font-size:13px;font-weight:600}label.field>*{margin-top:4px;font-weight:400}.row{display:flex;gap:14px;flex-wrap:wrap}.row>*{min-width:0}.row>.grow{flex:1;min-width:min(220px,100%)}.language-control{min-width:170px}.model-control{min-width:260px}.run-settings{display:grid;grid-template-columns:minmax(160px,230px) minmax(320px,720px) max-content;justify-content:start;gap:14px;align-items:end}.run-settings .field{margin-bottom:0}.run-button{min-width:180px;height:var(--control-height)}.construct-row{display:grid;grid-template-columns:minmax(320px,1120px) max-content;justify-content:start;align-items:end;gap:14px}.results-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;flex-wrap:wrap}.result-actions{justify-content:flex-end}.result-actions a{display:inline-flex;text-decoration:none}.pill{display:inline-block;padding:2px 10px;border-radius:999px;font-size:11.5px;font-weight:600}.pill.completed{background:#e6f4ea;color:var(--ok)}.pill.running{background:#fff3e0;color:#b45309}.pill.queued{background:#eef2f7;color:var(--muted)}.pill.failed{background:#fdecea;color:var(--err)}.progress-track{background:var(--line);border-radius:999px;height:7px;overflow:hidden}.progress-fill{background:var(--maroon);height:100%;transition:width .4s ease}.warnings{background:#fff8e6;border:1px solid #f2dfa8;color:#7a5b00;border-radius:8px;padding:10px 14px}.error-banner{background:#fdecea;color:var(--err);border:1px solid #f5c6c0;padding:10px 14px;border-radius:8px;margin-bottom:14px;font-size:13px}.table-wrap{width:100%;overflow-x:auto}table.docs{width:100%;border-collapse:collapse;font-size:13px}table.docs th{text-align:left;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;padding:6px 8px;border-bottom:1px solid var(--line)}table.docs td{padding:7px 8px;border-bottom:1px solid var(--bg);vertical-align:top;overflow-wrap:anywhere}table.docs td.score{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.stat-grid{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:4px}.stat{flex:1;min-width:110px;background:var(--bg);border-radius:8px;padding:10px 14px}.stat .v{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}.stat .k{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}.item-bar-row{display:flex;align-items:center;gap:10px;margin-bottom:7px}.item-bar-label{flex:1;font-size:12.5px;min-width:0;overflow-wrap:anywhere}.item-bar-track{flex:1.2;background:var(--bg);border-radius:999px;height:10px}.item-bar-fill{background:var(--maroon);opacity:.85;height:100%;border-radius:999px}.item-bar-val{width:52px;text-align:right;font-variant-numeric:tabular-nums;font-size:12.5px;font-weight:600}.construct-items{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:12.5px}.construct-items li{margin-bottom:2px}.meta-footer{font-size:12px;color:var(--muted);background:var(--bg);border-radius:8px;padding:10px 14px;margin-top:14px;font-variant-numeric:tabular-nums}.meta-footer code{font-size:11.5px}.muted{color:var(--muted)}.small{font-size:12.5px}.mt{margin-top:12px}@media (max-width: 820px){body{font-size:14px}.header{padding:12px 16px;align-items:flex-start;gap:2px 12px}.header h1{font-size:16px}.header .sub{flex:1 1 210px;font-size:12px;line-height:1.35}.layout{display:block}.sidebar{width:100%;border-right:0;border-bottom:1px solid var(--line);padding:14px}.project-list{max-height:220px;margin-right:0;flex:none}.project-create{border-top:0}.main{width:100%;padding:16px 14px 28px;overflow:visible}.card{padding:16px;margin-bottom:14px}.row,.run-settings,.construct-row,.results-toolbar,.result-actions{gap:10px}.row,.results-toolbar,.result-actions{flex-direction:column;align-items:stretch}.run-settings,.construct-row{grid-template-columns:1fr}.row>.grow,.construct-row>.grow,.language-control,.model-control{width:100%;min-width:0}.main .row>button,.main .row>a,.main .row>a>button,.results-toolbar>button{align-self:stretch;margin-bottom:0;width:100%}.run-button{width:100%;min-width:0}.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.stat{min-width:0}.item-bar-row{display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:6px 10px}.item-bar-track{grid-column:1 / -1;width:100%}.item-bar-val{width:auto}table.docs{min-width:520px}}@media (max-width: 460px){.header .sub{flex-basis:100%}.stat-grid{grid-template-columns:1fr}}
|
backend/static/assets/{index-gF2iJ3kV.js → index-CHG17tHs.js}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
backend/static/assets/index-CPF9wqlU.css
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
:root{--maroon: #7a1f3d;--maroon-dark: #5e1730;--ink: #1d2129;--muted: #667085;--line: #e5e7eb;--bg: #f7f7f8;--card: #ffffff;--ok: #157f3d;--err: #b42318;--accent-soft: #f6ebef}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,sans-serif;color:var(--ink);background:var(--bg);font-size:14.5px;line-height:1.5}.app{display:flex;flex-direction:column;min-height:100vh}.header{background:var(--maroon);color:#fff;padding:14px 28px;display:flex;align-items:baseline;flex-wrap:wrap;gap:14px}.header h1{flex:0 0 auto;font-size:17px;margin:0;font-weight:650;letter-spacing:.2px;white-space:nowrap}.header .sub{flex:1 1 280px;min-width:0;font-size:12.5px;opacity:.85}.layout{display:flex;flex:1;min-width:0;min-height:0}.sidebar{width:250px;background:var(--card);border-right:1px solid var(--line);padding:18px 14px;flex-shrink:0}.sidebar h2{font-size:11.5px;text-transform:uppercase;letter-spacing:.7px;color:var(--muted);margin:0 0 10px 4px;display:flex;align-items:center;gap:8px}.sidebar h2 .count{background:var(--bg);border:1px solid var(--line);border-radius:999px;padding:0 8px;font-size:10.5px;letter-spacing:0;color:var(--muted)}.sidebar-filter{width:100%;padding:7px 10px;margin-bottom:8px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:13px;background:#fff;color:var(--ink)}.sidebar-filter:focus{outline:none;border-color:var(--maroon)}.project-list{max-height:calc(100vh - 210px);overflow-y:auto;margin:0 -4px;padding:0 4px}.project-item{display:block;width:100%;text-align:left;padding:9px 12px;margin-bottom:4px;border:1px solid transparent;border-radius:8px;background:none;cursor:pointer;font:inherit;color:var(--ink)}.project-item:hover{background:var(--bg)}.project-item.active{background:var(--accent-soft);border-color:var(--maroon);font-weight:600}.project-item .date{display:block;font-size:11.5px;color:var(--muted);font-weight:400}.main{flex:1;padding:22px 28px;overflow-y:auto;min-width:0}.card{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:18px 20px;margin-bottom:16px}.card h3{margin:0 0 4px;font-size:15px}.card .hint{color:var(--muted);font-size:12.5px;margin:0 0 12px}.step-badge{display:inline-flex;align-items:center;justify-content:center;width:21px;height:21px;border-radius:50%;background:var(--maroon);color:#fff;font-size:12px;font-weight:700;margin-right:8px;vertical-align:-3px}button{white-space:nowrap}button.primary{background:var(--maroon);color:#fff;border:none;padding:9px 18px;border-radius:8px;font:inherit;font-weight:600;cursor:pointer}button.primary:hover{background:var(--maroon-dark)}button.primary:disabled{background:#c9ccd1;cursor:not-allowed}button.ghost{background:none;border:1px solid var(--line);color:var(--ink);padding:8px 14px;border-radius:8px;font:inherit;cursor:pointer}button.ghost:hover{border-color:var(--maroon);color:var(--maroon)}button.linkish{background:none;border:none;color:var(--maroon);font:inherit;cursor:pointer;padding:0;text-decoration:underline}input[type=text],textarea,select{width:100%;padding:8px 10px;border:1px solid var(--line);border-radius:8px;font:inherit;background:#fff;color:var(--ink)}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid rgba(122,31,61,.38);outline-offset:2px}input[type=file]{display:block;max-width:100%;margin-top:6px;font-size:13px;color:var(--muted)}input[type=file]::file-selector-button{background:#fff;border:1px solid var(--line);color:var(--ink);padding:7px 14px;border-radius:8px;font:inherit;font-size:13px;cursor:pointer;margin-right:10px}input[type=file]::file-selector-button:hover{border-color:var(--maroon);color:var(--maroon)}.row>button{align-self:flex-end;margin-bottom:1px}textarea{resize:vertical}label.field{display:block;margin-bottom:10px;font-size:13px;font-weight:600}label.field>*{margin-top:4px;font-weight:400}.row{display:flex;gap:14px;flex-wrap:wrap}.row>*{min-width:0}.row>.grow{flex:1;min-width:min(220px,100%)}.language-control{min-width:170px}.results-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px;flex-wrap:wrap}.result-actions{justify-content:flex-end}.result-actions a{display:inline-flex;text-decoration:none}.pill{display:inline-block;padding:2px 10px;border-radius:999px;font-size:11.5px;font-weight:600}.pill.completed{background:#e6f4ea;color:var(--ok)}.pill.running{background:#fff3e0;color:#b45309}.pill.queued{background:#eef2f7;color:var(--muted)}.pill.failed{background:#fdecea;color:var(--err)}.progress-track{background:var(--line);border-radius:999px;height:7px;overflow:hidden}.progress-fill{background:var(--maroon);height:100%;transition:width .4s ease}.warnings{background:#fff8e6;border:1px solid #f2dfa8;color:#7a5b00;border-radius:8px;padding:10px 14px}.error-banner{background:#fdecea;color:var(--err);border:1px solid #f5c6c0;padding:10px 14px;border-radius:8px;margin-bottom:14px;font-size:13px}.table-wrap{width:100%;overflow-x:auto}table.docs{width:100%;border-collapse:collapse;font-size:13px}table.docs th{text-align:left;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.5px;padding:6px 8px;border-bottom:1px solid var(--line)}table.docs td{padding:7px 8px;border-bottom:1px solid var(--bg);vertical-align:top;overflow-wrap:anywhere}table.docs td.score{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.stat-grid{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:4px}.stat{flex:1;min-width:110px;background:var(--bg);border-radius:8px;padding:10px 14px}.stat .v{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}.stat .k{font-size:11.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}.item-bar-row{display:flex;align-items:center;gap:10px;margin-bottom:7px}.item-bar-label{flex:1;font-size:12.5px;min-width:0;overflow-wrap:anywhere}.item-bar-track{flex:1.2;background:var(--bg);border-radius:999px;height:10px}.item-bar-fill{background:var(--maroon);opacity:.85;height:100%;border-radius:999px}.item-bar-val{width:52px;text-align:right;font-variant-numeric:tabular-nums;font-size:12.5px;font-weight:600}.construct-items{margin:8px 0 0;padding-left:20px;color:var(--muted);font-size:12.5px}.construct-items li{margin-bottom:2px}.meta-footer{font-size:12px;color:var(--muted);background:var(--bg);border-radius:8px;padding:10px 14px;margin-top:14px;font-variant-numeric:tabular-nums}.meta-footer code{font-size:11.5px}.muted{color:var(--muted)}.small{font-size:12.5px}.mt{margin-top:12px}@media (max-width: 820px){body{font-size:14px}.header{padding:12px 16px;align-items:flex-start;gap:2px 12px}.header h1{font-size:16px}.header .sub{flex:1 1 210px;font-size:12px;line-height:1.35}.layout{display:block}.sidebar{width:100%;border-right:0;border-bottom:1px solid var(--line);padding:14px}.project-list{max-height:220px;margin-right:0}.main{width:100%;padding:16px 14px 28px;overflow:visible}.card{padding:16px;margin-bottom:14px}.row,.results-toolbar,.result-actions{flex-direction:column;align-items:stretch;gap:10px}.row>.grow,.language-control{width:100%;min-width:0}.main .row>button,.main .row>a,.main .row>a>button,.results-toolbar>button{align-self:stretch;margin-bottom:0;width:100%}.stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.stat{min-width:0}.item-bar-row{display:grid;grid-template-columns:minmax(0,1fr) 56px;gap:6px 10px}.item-bar-track{grid-column:1 / -1;width:100%}.item-bar-val{width:auto}table.docs{min-width:520px}}@media (max-width: 460px){.header .sub{flex-basis:100%}.stat-grid{grid-template-columns:1fr}}
|
|
|
|
|
|
backend/static/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
<title>CCR Platform — Contextualized Construct Representations</title>
|
| 7 |
-
<script type="module" crossorigin src="/assets/index-
|
| 8 |
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
| 9 |
</head>
|
| 10 |
<body>
|
| 11 |
<div id="root"></div>
|
|
|
|
| 4 |
<meta charset="UTF-8" />
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
<title>CCR Platform — Contextualized Construct Representations</title>
|
| 7 |
+
<script type="module" crossorigin src="/assets/index-CHG17tHs.js"></script>
|
| 8 |
+
<link rel="stylesheet" crossorigin href="/assets/index-BDrO2FRr.css">
|
| 9 |
</head>
|
| 10 |
<body>
|
| 11 |
<div id="root"></div>
|
backend/tests/test_api.py
CHANGED
|
@@ -187,6 +187,16 @@ def test_validation_errors(client, flow):
|
|
| 187 |
assert resp.status_code == 400
|
| 188 |
|
| 189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 190 |
# --------------------------------------------------- spec 0003: models API
|
| 191 |
def test_models_endpoint_from_registry(client):
|
| 192 |
models = client.get("/api/models").json()
|
|
|
|
| 187 |
assert resp.status_code == 400
|
| 188 |
|
| 189 |
|
| 190 |
+
def test_projects_carry_activity_and_sort_by_it(client, flow):
|
| 191 |
+
projects = client.get("/api/projects").json()
|
| 192 |
+
demo = next(p for p in projects if p["id"] == flow["project"]["id"])
|
| 193 |
+
assert demo["n_runs"] >= 1
|
| 194 |
+
assert demo["last_activity_at"] >= demo["created_at"]
|
| 195 |
+
# the project with runs sorts above a freshly created empty one from earlier tests
|
| 196 |
+
order = [p["last_activity_at"] for p in projects]
|
| 197 |
+
assert order == sorted(order, reverse=True)
|
| 198 |
+
|
| 199 |
+
|
| 200 |
# --------------------------------------------------- spec 0003: models API
|
| 201 |
def test_models_endpoint_from_registry(client):
|
| 202 |
models = client.get("/api/models").json()
|
frontend/src/App.jsx
CHANGED
|
@@ -2,6 +2,36 @@ import { useEffect, useState } from "react";
|
|
| 2 |
import { api } from "./api.js";
|
| 3 |
import Workspace from "./Workspace.jsx";
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
export default function App() {
|
| 6 |
const [projects, setProjects] = useState([]);
|
| 7 |
const [selectedId, setSelectedId] = useState(null);
|
|
@@ -17,6 +47,16 @@ export default function App() {
|
|
| 17 |
loadProjects();
|
| 18 |
}, []);
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
async function createProject(e) {
|
| 21 |
e.preventDefault();
|
| 22 |
if (!newName.trim()) return;
|
|
@@ -32,6 +72,10 @@ export default function App() {
|
|
| 32 |
}
|
| 33 |
|
| 34 |
const selected = projects.find((p) => p.id === selectedId) || null;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
return (
|
| 37 |
<div className="app">
|
|
@@ -48,57 +92,63 @@ export default function App() {
|
|
| 48 |
Projects
|
| 49 |
{projects.length > 0 && <span className="count">{projects.length}</span>}
|
| 50 |
</h2>
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
/>
|
| 59 |
-
)}
|
| 60 |
<div className="project-list">
|
| 61 |
-
{
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
</div>
|
| 78 |
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
<
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
<
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
| 102 |
</aside>
|
| 103 |
|
| 104 |
<main className="main">
|
|
|
|
| 2 |
import { api } from "./api.js";
|
| 3 |
import Workspace from "./Workspace.jsx";
|
| 4 |
|
| 5 |
+
function relativeTime(iso) {
|
| 6 |
+
if (!iso) return "";
|
| 7 |
+
const then = new Date(iso.endsWith("Z") || iso.includes("+") ? iso : iso + "Z");
|
| 8 |
+
const mins = Math.max(0, Math.floor((Date.now() - then.getTime()) / 60000));
|
| 9 |
+
if (mins < 1) return "just now";
|
| 10 |
+
if (mins < 60) return `${mins}m ago`;
|
| 11 |
+
const hours = Math.floor(mins / 60);
|
| 12 |
+
if (hours < 24) return `${hours}h ago`;
|
| 13 |
+
const days = Math.floor(hours / 24);
|
| 14 |
+
if (days < 7) return `${days}d ago`;
|
| 15 |
+
return then.toISOString().slice(0, 10);
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
function groupProjects(projects) {
|
| 19 |
+
// Buckets by last activity: Today / This week / Earlier. Projects arrive
|
| 20 |
+
// sorted by last activity (backend), so group order falls out naturally.
|
| 21 |
+
const now = Date.now();
|
| 22 |
+
const DAY = 86400000;
|
| 23 |
+
const groups = { Today: [], "This week": [], Earlier: [] };
|
| 24 |
+
for (const p of projects) {
|
| 25 |
+
const iso = p.last_activity_at || p.created_at;
|
| 26 |
+
const t = new Date(iso.endsWith("Z") || iso.includes("+") ? iso : iso + "Z").getTime();
|
| 27 |
+
const age = now - t;
|
| 28 |
+
if (age < DAY) groups.Today.push(p);
|
| 29 |
+
else if (age < 7 * DAY) groups["This week"].push(p);
|
| 30 |
+
else groups.Earlier.push(p);
|
| 31 |
+
}
|
| 32 |
+
return Object.entries(groups).filter(([, items]) => items.length > 0);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
export default function App() {
|
| 36 |
const [projects, setProjects] = useState([]);
|
| 37 |
const [selectedId, setSelectedId] = useState(null);
|
|
|
|
| 47 |
loadProjects();
|
| 48 |
}, []);
|
| 49 |
|
| 50 |
+
useEffect(() => {
|
| 51 |
+
if (projects.length === 0) {
|
| 52 |
+
setSelectedId(null);
|
| 53 |
+
return;
|
| 54 |
+
}
|
| 55 |
+
if (!selectedId || !projects.some((p) => p.id === selectedId)) {
|
| 56 |
+
setSelectedId(projects[0].id);
|
| 57 |
+
}
|
| 58 |
+
}, [projects, selectedId]);
|
| 59 |
+
|
| 60 |
async function createProject(e) {
|
| 61 |
e.preventDefault();
|
| 62 |
if (!newName.trim()) return;
|
|
|
|
| 72 |
}
|
| 73 |
|
| 74 |
const selected = projects.find((p) => p.id === selectedId) || null;
|
| 75 |
+
const normalizedFilter = filter.trim().toLowerCase();
|
| 76 |
+
const visibleProjects = projects.filter((p) =>
|
| 77 |
+
p.name.toLowerCase().includes(normalizedFilter)
|
| 78 |
+
);
|
| 79 |
|
| 80 |
return (
|
| 81 |
<div className="app">
|
|
|
|
| 92 |
Projects
|
| 93 |
{projects.length > 0 && <span className="count">{projects.length}</span>}
|
| 94 |
</h2>
|
| 95 |
+
<input
|
| 96 |
+
type="text"
|
| 97 |
+
className="sidebar-filter"
|
| 98 |
+
placeholder="Search projects..."
|
| 99 |
+
value={filter}
|
| 100 |
+
onChange={(e) => setFilter(e.target.value)}
|
| 101 |
+
/>
|
|
|
|
|
|
|
| 102 |
<div className="project-list">
|
| 103 |
+
{groupProjects(visibleProjects).map(([groupLabel, items]) => (
|
| 104 |
+
<div key={groupLabel}>
|
| 105 |
+
<div className="group-label">{groupLabel}</div>
|
| 106 |
+
{items.map((p) => (
|
| 107 |
+
<button
|
| 108 |
+
key={p.id}
|
| 109 |
+
className={"project-item" + (p.id === selectedId ? " active" : "")}
|
| 110 |
+
onClick={() => setSelectedId(p.id)}
|
| 111 |
+
title={p.name}
|
| 112 |
+
>
|
| 113 |
+
<span className="project-name">{p.name}</span>
|
| 114 |
+
<span className="date">
|
| 115 |
+
{p.n_runs > 0 ? `${p.n_runs} run${p.n_runs === 1 ? "" : "s"} · ` : ""}
|
| 116 |
+
{relativeTime(p.last_activity_at || p.created_at)}
|
| 117 |
+
</span>
|
| 118 |
+
</button>
|
| 119 |
+
))}
|
| 120 |
+
</div>
|
| 121 |
+
))}
|
| 122 |
+
{filter && visibleProjects.length === 0 && (
|
| 123 |
+
<p className="small muted">No projects match "{filter}".</p>
|
| 124 |
+
)}
|
| 125 |
</div>
|
| 126 |
|
| 127 |
+
<div className="project-create">
|
| 128 |
+
{creating ? (
|
| 129 |
+
<form onSubmit={createProject}>
|
| 130 |
+
<input
|
| 131 |
+
type="text"
|
| 132 |
+
autoFocus
|
| 133 |
+
placeholder="Project name"
|
| 134 |
+
value={newName}
|
| 135 |
+
onChange={(e) => setNewName(e.target.value)}
|
| 136 |
+
/>
|
| 137 |
+
<div className="row mt">
|
| 138 |
+
<button className="primary" type="submit">
|
| 139 |
+
Create
|
| 140 |
+
</button>
|
| 141 |
+
<button className="ghost" type="button" onClick={() => setCreating(false)}>
|
| 142 |
+
Cancel
|
| 143 |
+
</button>
|
| 144 |
+
</div>
|
| 145 |
+
</form>
|
| 146 |
+
) : (
|
| 147 |
+
<button className="ghost" onClick={() => setCreating(true)}>
|
| 148 |
+
+ New project
|
| 149 |
+
</button>
|
| 150 |
+
)}
|
| 151 |
+
</div>
|
| 152 |
</aside>
|
| 153 |
|
| 154 |
<main className="main">
|
frontend/src/Workspace.jsx
CHANGED
|
@@ -181,7 +181,7 @@ export default function Workspace({ project }) {
|
|
| 181 |
Pick a validated scale from the library, or define custom items. CCR scores each
|
| 182 |
text by its similarity to these items.
|
| 183 |
</p>
|
| 184 |
-
<div className="row">
|
| 185 |
<div className="grow">
|
| 186 |
<select value={constructId} onChange={(e) => setConstructId(e.target.value)}>
|
| 187 |
<option value="">— select construct —</option>
|
|
@@ -242,32 +242,28 @@ export default function Workspace({ project }) {
|
|
| 242 |
in the run metadata. If the corpus doesn't match the selected language or the
|
| 243 |
model doesn't support it, you'll get a warning — never a silent result.
|
| 244 |
</p>
|
| 245 |
-
<div className="
|
| 246 |
-
<
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
{
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
</select>
|
| 268 |
-
</label>
|
| 269 |
-
</div>
|
| 270 |
-
<button className="primary" disabled={!canRun} onClick={handleRun}>
|
| 271 |
{running ? "Starting…" : "Run CCR analysis"}
|
| 272 |
</button>
|
| 273 |
</div>
|
|
|
|
| 181 |
Pick a validated scale from the library, or define custom items. CCR scores each
|
| 182 |
text by its similarity to these items.
|
| 183 |
</p>
|
| 184 |
+
<div className="construct-row">
|
| 185 |
<div className="grow">
|
| 186 |
<select value={constructId} onChange={(e) => setConstructId(e.target.value)}>
|
| 187 |
<option value="">— select construct —</option>
|
|
|
|
| 242 |
in the run metadata. If the corpus doesn't match the selected language or the
|
| 243 |
model doesn't support it, you'll get a warning — never a silent result.
|
| 244 |
</p>
|
| 245 |
+
<div className="run-settings">
|
| 246 |
+
<label className="field language-control">
|
| 247 |
+
Text language
|
| 248 |
+
<select value={language} onChange={(e) => setLanguage(e.target.value)}>
|
| 249 |
+
{languages.map((l) => (
|
| 250 |
+
<option key={l} value={l}>
|
| 251 |
+
{l}
|
| 252 |
+
</option>
|
| 253 |
+
))}
|
| 254 |
+
</select>
|
| 255 |
+
</label>
|
| 256 |
+
<label className="field model-control">
|
| 257 |
+
Embedding model
|
| 258 |
+
<select value={modelName} onChange={(e) => setModelName(e.target.value)}>
|
| 259 |
+
{models.map((m) => (
|
| 260 |
+
<option key={m.id} value={m.id}>
|
| 261 |
+
{m.label}
|
| 262 |
+
</option>
|
| 263 |
+
))}
|
| 264 |
+
</select>
|
| 265 |
+
</label>
|
| 266 |
+
<button className="primary run-button" disabled={!canRun} onClick={handleRun}>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
{running ? "Starting…" : "Run CCR analysis"}
|
| 268 |
</button>
|
| 269 |
</div>
|
frontend/src/styles.css
CHANGED
|
@@ -9,6 +9,7 @@
|
|
| 9 |
--ok: #157f3d;
|
| 10 |
--err: #b42318;
|
| 11 |
--accent-soft: #f6ebef;
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
* { box-sizing: border-box; }
|
|
@@ -53,6 +54,9 @@ body {
|
|
| 53 |
border-right: 1px solid var(--line);
|
| 54 |
padding: 18px 14px;
|
| 55 |
flex-shrink: 0;
|
|
|
|
|
|
|
|
|
|
| 56 |
}
|
| 57 |
.sidebar h2 {
|
| 58 |
font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.7px;
|
|
@@ -64,23 +68,44 @@ body {
|
|
| 64 |
padding: 0 8px; font-size: 10.5px; letter-spacing: 0; color: var(--muted);
|
| 65 |
}
|
| 66 |
.sidebar-filter {
|
| 67 |
-
width: 100%; padding: 7px 10px; margin-bottom:
|
| 68 |
border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px;
|
| 69 |
background: #fff; color: var(--ink);
|
| 70 |
}
|
| 71 |
.sidebar-filter:focus { outline: none; border-color: var(--maroon); }
|
| 72 |
.project-list {
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
}
|
|
|
|
| 75 |
.project-item {
|
| 76 |
display: block; width: 100%; text-align: left;
|
| 77 |
-
padding: 9px 12px; margin-bottom:
|
| 78 |
border: 1px solid transparent; border-radius: 8px;
|
| 79 |
background: none; cursor: pointer; font: inherit; color: var(--ink);
|
| 80 |
}
|
| 81 |
.project-item:hover { background: var(--bg); }
|
| 82 |
.project-item.active { background: var(--accent-soft); border-color: var(--maroon); font-weight: 600; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
.project-item .date { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
/* ---------- main ---------- */
|
| 86 |
.main { flex: 1; padding: 22px 28px; overflow-y: auto; min-width: 0; }
|
|
@@ -104,13 +129,23 @@ button { white-space: nowrap; }
|
|
| 104 |
|
| 105 |
button.primary {
|
| 106 |
background: var(--maroon); color: #fff; border: none;
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
}
|
| 109 |
button.primary:hover { background: var(--maroon-dark); }
|
| 110 |
button.primary:disabled { background: #c9ccd1; cursor: not-allowed; }
|
| 111 |
button.ghost {
|
| 112 |
background: none; border: 1px solid var(--line); color: var(--ink);
|
| 113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 114 |
}
|
| 115 |
button.ghost:hover { border-color: var(--maroon); color: var(--maroon); }
|
| 116 |
button.linkish {
|
|
@@ -122,6 +157,7 @@ input[type="text"], textarea, select {
|
|
| 122 |
width: 100%; padding: 8px 10px; border: 1px solid var(--line);
|
| 123 |
border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
|
| 124 |
}
|
|
|
|
| 125 |
|
| 126 |
button:focus-visible,
|
| 127 |
input:focus-visible,
|
|
@@ -156,6 +192,26 @@ label.field > * { margin-top: 4px; font-weight: 400; }
|
|
| 156 |
.row > * { min-width: 0; }
|
| 157 |
.row > .grow { flex: 1; min-width: min(220px, 100%); }
|
| 158 |
.language-control { min-width: 170px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
.results-toolbar {
|
| 160 |
display: flex;
|
| 161 |
align-items: center;
|
|
@@ -255,7 +311,9 @@ table.docs td.score { font-variant-numeric: tabular-nums; font-weight: 600; whit
|
|
| 255 |
.project-list {
|
| 256 |
max-height: 220px;
|
| 257 |
margin-right: 0;
|
|
|
|
| 258 |
}
|
|
|
|
| 259 |
.main {
|
| 260 |
width: 100%;
|
| 261 |
padding: 16px 14px 28px;
|
|
@@ -266,15 +324,27 @@ table.docs td.score { font-variant-numeric: tabular-nums; font-weight: 600; whit
|
|
| 266 |
margin-bottom: 14px;
|
| 267 |
}
|
| 268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
.row,
|
| 270 |
.results-toolbar,
|
| 271 |
.result-actions {
|
| 272 |
flex-direction: column;
|
| 273 |
align-items: stretch;
|
| 274 |
-
|
|
|
|
|
|
|
|
|
|
| 275 |
}
|
| 276 |
.row > .grow,
|
| 277 |
-
.
|
|
|
|
|
|
|
| 278 |
width: 100%;
|
| 279 |
min-width: 0;
|
| 280 |
}
|
|
@@ -286,6 +356,10 @@ table.docs td.score { font-variant-numeric: tabular-nums; font-weight: 600; whit
|
|
| 286 |
margin-bottom: 0;
|
| 287 |
width: 100%;
|
| 288 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 289 |
|
| 290 |
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
| 291 |
.stat { min-width: 0; }
|
|
|
|
| 9 |
--ok: #157f3d;
|
| 10 |
--err: #b42318;
|
| 11 |
--accent-soft: #f6ebef;
|
| 12 |
+
--control-height: 40px;
|
| 13 |
}
|
| 14 |
|
| 15 |
* { box-sizing: border-box; }
|
|
|
|
| 54 |
border-right: 1px solid var(--line);
|
| 55 |
padding: 18px 14px;
|
| 56 |
flex-shrink: 0;
|
| 57 |
+
display: flex;
|
| 58 |
+
flex-direction: column;
|
| 59 |
+
min-height: 0;
|
| 60 |
}
|
| 61 |
.sidebar h2 {
|
| 62 |
font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.7px;
|
|
|
|
| 68 |
padding: 0 8px; font-size: 10.5px; letter-spacing: 0; color: var(--muted);
|
| 69 |
}
|
| 70 |
.sidebar-filter {
|
| 71 |
+
width: 100%; padding: 7px 10px; margin-bottom: 10px;
|
| 72 |
border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px;
|
| 73 |
background: #fff; color: var(--ink);
|
| 74 |
}
|
| 75 |
.sidebar-filter:focus { outline: none; border-color: var(--maroon); }
|
| 76 |
.project-list {
|
| 77 |
+
flex: 1;
|
| 78 |
+
min-height: 0;
|
| 79 |
+
overflow-y: auto;
|
| 80 |
+
margin: 0 -4px;
|
| 81 |
+
padding: 0 4px 4px;
|
| 82 |
+
}
|
| 83 |
+
.group-label {
|
| 84 |
+
font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.6px;
|
| 85 |
+
color: var(--muted); margin: 10px 4px 5px;
|
| 86 |
}
|
| 87 |
+
div:first-child > .group-label { margin-top: 2px; }
|
| 88 |
.project-item {
|
| 89 |
display: block; width: 100%; text-align: left;
|
| 90 |
+
padding: 9px 12px; margin-bottom: 5px;
|
| 91 |
border: 1px solid transparent; border-radius: 8px;
|
| 92 |
background: none; cursor: pointer; font: inherit; color: var(--ink);
|
| 93 |
}
|
| 94 |
.project-item:hover { background: var(--bg); }
|
| 95 |
.project-item.active { background: var(--accent-soft); border-color: var(--maroon); font-weight: 600; }
|
| 96 |
+
.project-item .project-name {
|
| 97 |
+
display: block;
|
| 98 |
+
overflow: hidden;
|
| 99 |
+
text-overflow: ellipsis;
|
| 100 |
+
white-space: nowrap;
|
| 101 |
+
}
|
| 102 |
.project-item .date { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
|
| 103 |
+
.project-create {
|
| 104 |
+
margin-top: 12px;
|
| 105 |
+
padding-top: 12px;
|
| 106 |
+
border-top: 1px solid var(--line);
|
| 107 |
+
}
|
| 108 |
+
.project-create > button { width: 100%; }
|
| 109 |
|
| 110 |
/* ---------- main ---------- */
|
| 111 |
.main { flex: 1; padding: 22px 28px; overflow-y: auto; min-width: 0; }
|
|
|
|
| 129 |
|
| 130 |
button.primary {
|
| 131 |
background: var(--maroon); color: #fff; border: none;
|
| 132 |
+
min-height: var(--control-height);
|
| 133 |
+
display: inline-flex;
|
| 134 |
+
align-items: center;
|
| 135 |
+
justify-content: center;
|
| 136 |
+
padding: 0 18px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
|
| 137 |
+
line-height: 1.2;
|
| 138 |
}
|
| 139 |
button.primary:hover { background: var(--maroon-dark); }
|
| 140 |
button.primary:disabled { background: #c9ccd1; cursor: not-allowed; }
|
| 141 |
button.ghost {
|
| 142 |
background: none; border: 1px solid var(--line); color: var(--ink);
|
| 143 |
+
min-height: var(--control-height);
|
| 144 |
+
display: inline-flex;
|
| 145 |
+
align-items: center;
|
| 146 |
+
justify-content: center;
|
| 147 |
+
padding: 0 14px; border-radius: 8px; font: inherit; cursor: pointer;
|
| 148 |
+
line-height: 1.2;
|
| 149 |
}
|
| 150 |
button.ghost:hover { border-color: var(--maroon); color: var(--maroon); }
|
| 151 |
button.linkish {
|
|
|
|
| 157 |
width: 100%; padding: 8px 10px; border: 1px solid var(--line);
|
| 158 |
border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
|
| 159 |
}
|
| 160 |
+
input[type="text"], select { height: var(--control-height); }
|
| 161 |
|
| 162 |
button:focus-visible,
|
| 163 |
input:focus-visible,
|
|
|
|
| 192 |
.row > * { min-width: 0; }
|
| 193 |
.row > .grow { flex: 1; min-width: min(220px, 100%); }
|
| 194 |
.language-control { min-width: 170px; }
|
| 195 |
+
.model-control { min-width: 260px; }
|
| 196 |
+
.run-settings {
|
| 197 |
+
display: grid;
|
| 198 |
+
grid-template-columns: minmax(160px, 230px) minmax(320px, 720px) max-content;
|
| 199 |
+
justify-content: start;
|
| 200 |
+
gap: 14px;
|
| 201 |
+
align-items: end;
|
| 202 |
+
}
|
| 203 |
+
.run-settings .field { margin-bottom: 0; }
|
| 204 |
+
.run-button {
|
| 205 |
+
min-width: 180px;
|
| 206 |
+
height: var(--control-height);
|
| 207 |
+
}
|
| 208 |
+
.construct-row {
|
| 209 |
+
display: grid;
|
| 210 |
+
grid-template-columns: minmax(320px, 1120px) max-content;
|
| 211 |
+
justify-content: start;
|
| 212 |
+
align-items: end;
|
| 213 |
+
gap: 14px;
|
| 214 |
+
}
|
| 215 |
.results-toolbar {
|
| 216 |
display: flex;
|
| 217 |
align-items: center;
|
|
|
|
| 311 |
.project-list {
|
| 312 |
max-height: 220px;
|
| 313 |
margin-right: 0;
|
| 314 |
+
flex: none;
|
| 315 |
}
|
| 316 |
+
.project-create { border-top: 0; }
|
| 317 |
.main {
|
| 318 |
width: 100%;
|
| 319 |
padding: 16px 14px 28px;
|
|
|
|
| 324 |
margin-bottom: 14px;
|
| 325 |
}
|
| 326 |
|
| 327 |
+
.row,
|
| 328 |
+
.run-settings,
|
| 329 |
+
.construct-row,
|
| 330 |
+
.results-toolbar,
|
| 331 |
+
.result-actions {
|
| 332 |
+
gap: 10px;
|
| 333 |
+
}
|
| 334 |
.row,
|
| 335 |
.results-toolbar,
|
| 336 |
.result-actions {
|
| 337 |
flex-direction: column;
|
| 338 |
align-items: stretch;
|
| 339 |
+
}
|
| 340 |
+
.run-settings,
|
| 341 |
+
.construct-row {
|
| 342 |
+
grid-template-columns: 1fr;
|
| 343 |
}
|
| 344 |
.row > .grow,
|
| 345 |
+
.construct-row > .grow,
|
| 346 |
+
.language-control,
|
| 347 |
+
.model-control {
|
| 348 |
width: 100%;
|
| 349 |
min-width: 0;
|
| 350 |
}
|
|
|
|
| 356 |
margin-bottom: 0;
|
| 357 |
width: 100%;
|
| 358 |
}
|
| 359 |
+
.run-button {
|
| 360 |
+
width: 100%;
|
| 361 |
+
min-width: 0;
|
| 362 |
+
}
|
| 363 |
|
| 364 |
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
| 365 |
.stat { min-width: 0; }
|