feat: public overview of all topics + votes (index page) #2
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add a public overview / index page to dasbes.de that lists all existing topics with their vote activity. It's for users to browse what's there — and doubles as a lightweight admin overview.
What to build
/alle, pick what reads best) listing every topic that has content, each row showing:/<thema>?admin=<token>, reuse the existingADMIN_TOKEN): additionally show hidden/empty topics and per-row delete/hide controls. Without the token it's the clean public list.Constraints
dasbesschema on mRiver Supabase — extend with a query that aggregates per topic; no new dependencies).noindexstays.Definition of Done
/alle(or chosen route) live: all topics with suggestion + vote counts, sorted by activity, each linking to its topic page; total count shown.status:done(don't close).Reference: the app built in #1 (server.ts + dasbes schema). Repo m/dasbes, deployed as a Dokploy compose on mLake serving dasbes.de.
✅ Done —
/alleoverview liveLive: https://dasbes.de/alle
Commit:
30b683623d(branchmai/lovelace/issue-2-overview)What shipped
GET /alle— public overview listing every topic that has content, each row showing:/<thema>/alle?admin=<ADMIN_TOKEN>) — additionally lists hidden/empty topics (dashed, with a „K versteckt" badge) and reveals a per-row delete control.POST /api/delete-topic {topic, token}hard-deletes a whole topic + all its suggestions/votes (cascade), constant-time token check; without the token it's the clean public list.topicsOverview()indb.ts(Postgresarray_agg … filterfor the top answer + counts in a single round-trip), no new dependencies. Dark/yellow mobile-first style kept,noindexstays.Verified
dasbesschema on mRiver (empty-topic path: excluded from public, shown to admin;deleteTopicround-trip create→delete; clean-up confirmed — no test data left).403wrong token,404unknown topic,400bad slug).⚠️ Deploy note (tech debt to flag)
The Dokploy compose for dasbes tracks a feature branch, not
main— it was left onmai/hopper/issue-1-dasbes-votingafter #1. To deploy this without merging tomain(gitster doesn't ownmain), I repointed the compose's Gitea branch tomai/lovelace/issue-2-overviewand triggered the build. Recommend: after merging this branch tomain, repoint the compose's source branch tomainso production deploys from the canonical branch and isn't pinned to an ephemeral feature branch.Leaving the issue open per policy; setting
status:done.