Players list view: SSR table at /players #4
Loading…
Add table
Add a link
Reference in a new issue
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?
Type
Feature
Lineage
First end-to-end user-visible feature. Hard depends on
forgejo_admin/westside-admin#6(scaffolding),#1(Drizzle),#2(Auth),#3(Tenant helper). Indirect dep onforgejo_admin/pal-e-platform#301(Keycloak client) +#302(Postgres user) since #2 and #1 depend on those.Repo
forgejo_admin/westside-adminUser Story
story-westside-admin-admin-row-crud. The READ half of the core story — concrete on theplayerstable first per locked decision (validate the stack on one table before generalizing).Context
First end-to-end seam: auth → tenant scoping → Drizzle query → SSR render. Picks the
playerstable because it's the widest (37 columns), most actively edited, and most representative — if the stack handlesplayerscleanly it'll handle the other 21 tables.UI is intentionally minimal in v1: paginated table, filter by name, type-aware rendering (enums as colored badges, dates formatted, jsonb collapsed). NO generic introspection-driven table component yet — that's a later iteration once the seam is proven.
File Targets
Create:
src/routes/players/+page.server.ts—load()queriesscopedDb.select().from(players)with pagination + name filtersrc/routes/players/+page.svelte— renders typeddata.playersas<table>, pagination links, filter inputsrc/lib/components/EnumBadge.svelte— renders a string with a color derived from the value (consistent across renders)src/lib/components/DateCell.svelte— formats timestamp asYYYY-MM-DD HH:mmsrc/lib/components/JsonbCell.svelte— collapsed by default, click to expand to<pre>Modify:
src/routes/+layout.svelte— add nav link to/playersDo NOT create:
Acceptance Criteria
/playersshows the first 50 players (oldest first)?page=2,?page=3, etc. — 50 per page?name=foofilter does a case-insensitive partial match onplayers.nameTest Expectations
/playersas admin, assert 50 rows rendered + pagination/players?name=Marcusreturns rows where name contains "Marcus" (case-insensitive)#6establishes (likelyvitest)Constraints
scopedDb(no directdbimport — would fail lint from #3)feedback_no_tailwindChecklist
Related
project-westside-adminarch-dataflow-westside-adminFlow 1arch-domain-westside-admin(players entity)#6,#1,#2,#3Scope Review: NEEDS_REFINEMENT
Review note:
review-1092-2026-04-25Scope, traceability, and template completeness are solid. Story note + arch backing notes verified. Refinement is on dependency-traceability hygiene only — no structural rewrite needed.
Issues to address:
[BODY]Lineage names blockers in prose ("scaffolding + Drizzle + auth + tenant helper") but does not list specific issue numbers. Add: "Blocked by westside-admin#6 (sveltekit scaffolding), #1 + #3 (scopedDb / tenant helper), #2 (hooks-server auth), and pal-e-platform#301 (Keycloak), #302 (postgres-grants)."[SCOPE]Sequencing: 6 upstream tickets must merge before this ticket can move pastnext_up. Hold intodoafter refinement.[BODY]Optional: name the test runner once scaffolding (#6) lands (likelynpm test/ vitest).Decomposition: not needed. 5 new files + 1 modify is at the upper edge of the 5-minute rule but forms a single coherent SSR seam (server load ↔ page render ↔ cell components are mutually dependent). Splitting would fragment the contract.
arch:page-serverlabel resolves toarch-dataflow-westside-adminFlow 1 (referenced in Related). Noarch-page-servernote expected — page-server is a SvelteKit primitive, not a domain component.Scope Review v2: APPROVED
Review note:
review-1092-2026-04-25-v2Both [BODY] gaps from v1 (
review-1092-2026-04-25) are resolved:No structural changes. Ticket is READY for backlog -> todo. Operational note: hold in
todountil all 6 blockers merge before promoting tonext_up.