Run 005: Dashboard pages
Dokončeno
List balíčků z D1 + detail s rendered README
Od: 2026-05-10 Do: 2026-05-10 Vytvořeno 10. 5. 2026
5/5
100%
Tasky v runu
Otevřít kanban →| ID | Název | Status | Priorita | Vytvořeno |
|---|---|---|---|---|
| 72 | Auth gate util require-user Dev escape hatch v middleware nechá Astro.locals.user = null bez Access headeru. Bez gate by neautorizovaný request prošel na dashboard. Přidán shared util require-user, který vrací Response 403 nebo AccessUser — explicit return je idiomatic v Astro page frontmatter (oproti throw). | Hotovo | Střední | 10. 5. 2026 |
| 73 | Drizzle query helpers pro dashboard Dashboard stránky neměly query helpery, raw SQL na page by zaplevelilo frontmatter. Přidán dashboard-queries.ts: listPackages (findMany ordered desc) + getPackageWithLatestRelease (2 queries — package, pak release dle distTags.latest). Relational with-filter nešel kvůli závislosti na parent column. | Hotovo | Střední | 10. 5. 2026 |
| 74 | Markdown rendering bez raw HTML marked v18 neescapuje raw HTML ani nesanitizuje URL schémata — README publisher může injectnout <script> nebo [link](javascript:...). Přidán render-markdown.ts: Marked instance s renderer.html escape + allowlist URL schemes (http/https/mailto/relative) v link/image renderer. | Hotovo | Střední | 10. 5. 2026 |
| 75 | Index stránka s listem balíčků Pod /dashboard byl prázdný placeholder z Run 003. Index page nyní SSR fetchuje balíčky přes listPackages, zobrazí name + latest version + cs-CZ formátované updated_at, link na detail. Empty state pro 0 balíčků. | Hotovo | Střední | 10. 5. 2026 |
| 76 | Detail stránka balíčku s README Detail page chyběl celý. Vytvořen [...name].astro (rest param kvůli scoped balíčkům @scope/pkg), fetch package + latest release, render README přes renderMarkdown. 404 pokud balíček neexistuje, fallback hláška pokud manifest nemá readme field. | Hotovo | Střední | 10. 5. 2026 |
Screenshoty
0
Žádné screenshoty. Nahraj první.