oficina / home Public

Document selected-team dashboard direction

claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 39d80f0b06469350d7d45ab2b9b3b3753ed41b65 parent ba81936
1 file changed, +132 −0
  • docs/superpowers/specs/2026-10-24-dashboard-design.md +132 −0

CI passed — run details

diff --git a/docs/superpowers/specs/2026-10-24-dashboard-design.md b/docs/superpowers/specs/2026-10-24-dashboard-design.md
new file mode 100644
index 0000000..1edf5e6
--- /dev/null
+++ b/docs/superpowers/specs/2026-10-24-dashboard-design.md
@@ -0,0 +1,132 @@
+# Selected-team dashboard
+
+Status: product direction recorded from Paul, 2026-10-24. Implementation proposal;
+not shipped. Independently reviewed and approved as a proposal by GPT-6 (Codex,
+inherited session model; exact variant not exposed), 2026-10-24. Review confirmed
+selected-team scope, omission of todos, and the source assertions below. The
+credential protocol and provider endpoints remain implementation prerequisites
+requiring their own review. Base: Home origin/main at ba81936.
+
+## Product decision
+
+After signing in to oficina.works, show a consolidated dashboard for the selected
+team, including the app launcher and recent work across that team's Oficina apps.
+Paul explicitly chose **only the selected team**, not a combined personal feed
+across teams. Switching teams switches every dashboard section together.
+
+This extends the front-door activity design of 2026-09-05: the app list remains,
+but documents and the calendar become the primary reason to visit Home. Paul
+subsequently clarified that no task support exists today and todos should be left
+out for now; Calendar is a possible future owner, not part of this delivery.
+It does not change the team boundary or move ownership of content into Home.
+
+## Page
+
+Use the existing Oficina chrome and Calma appearance. The heading names the
+selected team and exposes a team switcher. Preserve a compact list of apps near
+the top; recent work occupies most of the page rather than another full tile grid.
+
+- **Recent documents:** one list across Docs, Sheets, Slides, and other participating
+ document apps. Each row has a title, app/type, last-updated time, and a direct
+ link. One row per object, newest updated first; repeated edits do not crowd out
+ other documents. Initially show 20, with links to each app's full list and a
+ clear indication when more items exist. This is recent accessible work, not a
+ claim to record which documents the viewer personally opened.
+- **Calendar:** today's remaining events and the next seven days, in chronological
+ order, with event time, calendar, and a direct link. Preserve all-day dates and
+ use the viewer's chosen timezone for timed events. This is an agenda, not a list
+ sorted by event-edit time.
+
+On narrow screens stack recent documents and the agenda. Navigation,
+team selection, refresh, and item links must work without JavaScript. Use native
+links, headings, lists, and machine-readable time elements.
+
+A successful empty answer says that section has no matching items. An unavailable
+source says which app could not load and offers refresh/open-app navigation.
+Do not claim "no documents" or "nothing scheduled" when a provider
+has not answered. Do not infer support from a 404 or show invented example data
+in the live dashboard. Unsupported sections explain availability without claiming
+an integration exists.
+
+## Implementation evidence and dependencies
+
+The existing signed-in route in `internal/home/directory.go` renders only
+`directoryCatalog`; there is no aggregation handler. `directorydata.Store.Choices`
+provides current member/team/app destinations; it is not a document authorization
+check and is not the personal guest directory described in the older design.
+
+The 2026-09-05 activity spec remains the starting point for response bounds,
+per-person authorization, safe links, partial failures, and memory-only content.
+Its authentication assumptions cannot be copied into code unchanged:
+
+- `internal/home/runtime.go` runs separate credential and directory roles.
+ Directory startup rejects `HOME_ASSERTION_KEY`, and `newDirectory` rejects a
+ signer. The old spec's single-process minting assumption is not the shipped
+ architecture.
+- Current minting uses the assertion library's configured P-256 keypair, not the
+ older spec's stated Ed25519 algorithm.
+- The app sources inspected expose their own document/event lists, but no shipped
+ implementation of the spec's `/activity` endpoint was found in those checkouts.
+ Their latest remote branches must be fetched before implementation work.
+- No Todos repository/task provider was found in the workspace search. The local
+ Calendar importer explicitly skips VTODO. Paul confirmed that no task support
+ exists and explicitly deferred todos. No task provider is required for this
+ delivery, and no empty Todos section should be rendered.
+
+Before wiring live aggregation, specify and independently review a read-only,
+person-bound credential flow compatible with the separated roles. It must bind
+the authenticated person, selected team, destination and read purpose, resist
+replay, and have explicit expiry/revocation behavior. A caller-supplied subject
+plus a service secret is not sufficient. Do not give Directory the credential
+signing key or reuse login assertions without deciding their replay boundary.
+This proposal deliberately does not claim that missing protocol is implemented.
+
+## Data and loading contract
+
+Sources authorize each item for the authenticated viewer in the selected team.
+Home never infers item access from team membership. Guest visibility requires a
+real viewer-specific source directory before it can be advertised as supported.
+Preview origins must have explicit viewer/team mapping before they participate;
+operator configuration alone is not proof of a person's access.
+
+Use separate typed results for recent objects and upcoming event occurrences. The
+existing change-event shape alone cannot describe recurrence, all-day events, or
+stable object deduplication.
+Define a versioned extension and fixtures before provider implementation, with
+stable source-scoped object IDs, safe source-owned URLs, and bounded fields.
+Deduplicate documents by source and object ID; preserve distinct recurrence
+occurrences in the agenda. Keep source truncation visible.
+
+Fan out only to the selected team's viewer-authorized participating sources.
+Bound total render time, response bytes, item counts, and process-wide parallel
+requests. Never follow redirects. Validate source URLs and escape titles. Return
+private no-store responses at the app, Home, and edge. Preserve the prior spec's
+named partial-failure states and bounded per-person/source RAM cache rules.
+Content, titles, event details and deep links must not enter Home's
+database, on-disk caches, logs, metrics or error strings. Revalidate the selected
+team and source access on each request; clear/partition cached results on team or
+person changes and respect the hard maximum age after failed pulls.
+
+## Delivery and acceptance
+
+1. Settle the credential protocol and typed response fixtures. Review amendments
+ to the older activity spec and the suite contract.
+2. Implement authorized source endpoints in document apps and Calendar. Keep
+ capability flags disabled until endpoints and their authorization tests are
+ deployed.
+3. Add the selected-team dashboard renderer, compact app launcher, merger, agenda,
+ source availability states, and bounded client. Select only among the viewer's
+ current teams; preserve the choice through refresh and app navigation. Invalid
+ or removed teams must never fall back to showing another team's content.
+4. Exercise two people and two teams, including unauthorized items, removal of
+ membership, source timeout, 404, malformed/oversized data, redirect, truncation,
+ expired credentials and cache expiry. Verify privacy gates on database/WAL and
+ logs. Exercise timezone, all-day and recurring events and
+ duplicate document edits. Run with JavaScript disabled.
+5. Review the complete change on a deployed canary, check CI, and follow the
+ repository's branch/discussion/review requirements before merging or shipping.
+
+The acceptance case is concrete: signing in with a selected team presents its
+real recent documents, upcoming events, and app links; switching to another team
+replaces all of that data. A failed provider leaves the rest of the dashboard usable and identifies the missing part.
+A launcher with empty placeholder sections does not meet this acceptance case.