Data display model — additive Custom Views layer + unified inbox subsume + render-shape switcher #5
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?
Problem
paliad currently builds a fixed page per use case:
/agenda,/events?type=deadline(Fristen),/events?type=appointment(Termine),/inbox(approvals),/dashboard. Each page is bespoke code with hand-tuned filters, render shape, and data hydration. Adding a new viewpoint means a new page + handler + bundle.m's direction (2026-05-06): rethink this as an additive Custom Views layer on top of the fixed defaults. The deeper substrate question: what is paliad's data-display model? What cards do we render, against what underlying data, with what filter grammar, and what render shapes (calendar / cards / list / kanban / connections-graph)?
Goals
(filter spec, render shape, data slice)that surfaces as its own sidebar button under a "Meine Sichten" group. The fixed defaults are themselves system-shipped saved views — same data layer, same render components.Out of scope (v1)
Locked direction (m, 2026-05-06)
Open design questions (for inventor — m will answer in design pass)
Data substrate
paliad.deadlines,paliad.appointments,paliad.project_events,paliad.approval_requests. Is the new substrate a single virtualview_rowthat unions all of them, an explicit registry of "data sources" the view picks from, or something else?WHERE due_date > now() AND project_id IN ...)? Structured JSON ({ "due_date": { ">": "now" }, "project_id": ["..."] })? UI-built only (no DSL exposed)? Inventor: propose, m signs off.Render shapes
View persistence + sidebar
paliad.user_views. Fields: id, user_id, name, filter_spec jsonb, render_shape, render_config jsonb, sort_order, icon, color? Inventor: propose, m signs off.paliad.user_viewsflaggedis_system=trueper user? Inventor proposes; tradeoff is config-as-code (clean, ships with new releases) vs config-as-data (user-editable, drifts).View authoring UX
/views/newpage? Both (saving an ad-hoc filter combo is the common case; full-page editor is the power case)?Approval / unified-inbox integration
approval_statuspredicate that any view can opt into, OR is "approval candidates" a separate data source that views can union?/inboxpage. Stays as a system view? Becomes a Custom View that ships seeded? Or refactored away entirely (the unified-inbox concept replaces it)?Migration / coexistence
/views/{user-view-id}or/views/{slug}make sense? Does it deep-link to filter state (so "open my view with the date set to today" works)?paliad.user_views.user_idis user-scoped. Views never leak across users. What about views that reference a project the user later loses access to — fail open, fail closed, hide?Performance
References
/inboxpage is the v1 of the approval surface)paliad.deadlines,paliad.appointments,paliad.project_events,paliad.approval_requests— current data tablesinternal/services/event_service.go— current "union" data path (deadlines + appointments) — closest existing precedent for a unified substratefrontend/src/agenda.tsx,frontend/src/events.tsx,frontend/src/inbox.tsx,frontend/src/dashboard.tsx— current bespoke pagesInventor brief
mai/<inventor>/inventor-data-display-modeldocs/design-data-display-model-2026-05-06.md. Three coordinated sub-designs:/mai-coder. Awaits m's go on the design before any coder shift.LOCKED 2026-05-07 — m signed off (commit
956ff10).Q4 correction: activity is a content selection (sources + filters), not a render shape. Folded into
listshape withdensity: "compact"+ actor/time columns. Shape ⊥ source — any source renders in any shape. Render shapes for v1: list / cards / calendar (3, was 4).All Q1–Q18 + Q19–Q27 locked at recommended values.
PR split (delegated to inventor):
/api/*endpoints, full backend test coverage. No user-visible change; smoke-testable via curl. ~1800 LoC./views/{slug}), editor, 3 render-shape components, sidebar Meine Sichten group, i18n, CSS. Builds on A1. ~1600 LoC.Merge order: A1 → main → A2 → main.
Inventor → coder transition initiated. noether starts on A1.
A1 SHIPPED — backend substrate + Custom Views API on
mai/noether/inventor-data-display@b516201(pushed). 15 files, 3134 LoC.What landed:
paliad.user_views(RLS-bounded to caller, UNIQUE(user_id, slug), no is_system flag)FilterSpec+RenderSpectypes with full server-side validators (3 shapes: list / cards / calendar; 4 sources: deadline + appointment + project_event + approval_request)SystemViewregistry — 5 code-resident defs (dashboard / agenda / events / inbox / inbox-mine)ViewService.RunSpec— 4-source substrate; Q17 fail-open withinaccessible_project_idsattributionUserViewService— CRUD + Touch + MostRecent/api/user-views/*+/api/views/{slug}/run+/api/views/system+/api/views/runTests: 32 pure-Go cases pass (filter + render + system view validators). 12 live-DB CRUD cases skip cleanly when
TEST_DATABASE_URLunset.go vet ./...clean.Coexistence: substrate uses the existing visibility predicate that t-139's migration 055 extends — derivation transparently widens results when 055 lands. Approval source delegates to
ApprovalService.ListPendingForApprover/ListSubmittedByUser(already extended forderived_peerauthority in t-139 Phase 3).No user-visible change in A1. Smoke-testable via curl after migration 056 applies.
A2 (frontend Custom Views UI) is the next coder shift — generic view shell, editor, render-shape components, sidebar Meine Sichten group. Awaiting m's go on A1 + merge to main.
A2 SHIPPED — frontend Custom Views UI on
mai/noether/inventor-data-display@fdde9eb(pushed). 16 files, 2113 LoC. Builds clean.What landed:
/views(most-recently-used redirect or onboarding),/views/{slug},/views/new,/views/{slug}/editclient/views/:shape-list.ts(table fordensity=comfortable, compact one-line stream fordensity=compact),shape-cards.ts(day-grouped grid),shape-calendar.ts(month grid + day-pills, mobile fallback notice <600px)/api/views/{slug}/run, dispatches to shape; 3-button shape switcher swaps live render without re-fetching; inaccessible-projects toast (Q17)/api/user-views. Always shows+ Neue Sichteven when empty. Optional count badge per view (show_count=trueopt-in)views.*+nav.group.user_views)Render shapes: list / cards / calendar (3, per Q4 lock-in 2026-05-07). Activity-feed look =
shape: list+density: compact+ actor/time columns when sources includeproject_event/approval_request— not a separate shape.Build: i18n codegen 1700→1791 keys. IIFE wrap intact on new bundles.
go build + vet + test ./...all clean.Ready for browser smoke against deployed A1 substrate. After A2 merges, design's Phase B (refactor system pages onto the substrate internally) is a separate task.