chore: creative AI-imbued dashboard UI + fallback context endpoint
CI / lint (push) Has been cancelled
Release / tag-release (push) Has been cancelled
CI / build-frontend (push) Has been cancelled
Release / draft-rc (push) Has been cancelled

This commit is contained in:
timmy committed 2026-07-10 17:47:11 +00:00
1 parent ea91b2d590
commit 8ff742c0fe
12 files changed
+555 -184

No files matched your search

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18 -6
View File
@@ -18,18 +18,30 @@ app.add_middleware(
allow_headers=["*"],
)
app.mount("/static", StaticFiles(directory="frontend/static"), name="static")
app.include_router(frontend_router)
@app.get("/api/v1/context")
async def context() -> JSONResponse:
user_data = await current_user()
try:
user_data = await current_user()
repo_data = await repos()
issues_data = await issues()
prs_data = await pull_requests()
except Exception as e:
return JSONResponse({
"user": {"id": None, "login": "timmy", "full_name": "Timmy Jr", "email": ""},
"repos": [],
"issues": [],
"pull_requests": [],
"view": "dashboard",
"deltas": [
{"panel": "auth", "action": "connect", "target": "stackchain-dashboard backend", "priority": "high"},
{"panel": "gitea", "action": "set GITEA_URL + GITEA_TOKEN", "target": "/root/stackchain-dashboard/.env or systemd env", "priority": "high"},
],
"error": str(e),
})
user_model = User(id=user_data["id"], login=user_data["login"], full_name=user_data.get("full_name", ""), email=user_data.get("email", ""))
repo_data = await repos()
issues_data = await issues()
prs_data = await pull_requests()
repo_models = [
Repo(id=r["id"], name=r["name"], full_name=r["full_name"], description=r.get("description", ""), url=r["html_url"], updated_at=r.get("updated_at", ""))
for r in repo_data[:50]