oficina / home Public
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.goruns separate credential and directory roles. Directory startup rejectsHOME_ASSERTION_KEY, andnewDirectoryrejects 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
/activityendpoint 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
- Settle the credential protocol and typed response fixtures. Review amendments to the older activity spec and the suite contract.
- Implement authorized source endpoints in document apps and Calendar. Keep capability flags disabled until endpoints and their authorization tests are deployed.
- 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.
- 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.
- 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.
Implementation amendment, 2026-10-25
Paul authorized build, review and deployment. GPT-6 independently reviewed the credential protocol and pilot mapping below before implementation.
Directory starts a bounded browser-bound pending request carrying the current session digest, actual subject, selected team and pinned source set. Credential reads its own session and signs one 120-second, single-use token per source under oficina/dashboard/read/v1, separate from login assertions. Claims bind issuer, source audience, Directory recipient, subject, team, purpose, nonce and jti. A fixed-origin form returns the batch; Directory validates it against pending state and its current session before consuming the pending request and pulling. Sources consume replay IDs durably before resolving existing accounts and item access. No signing key moves into Directory, and no service accepts a supplied subject as proof of identity. Fresh uncached pulls require a new browser round trip.
The live apex sources are explicitly assigned to one pilot team grouping. This is navigation configuration, not roster-established membership: no owner/member claim, inferred identity link, provisioning or roster write follows from it. Each provider independently resolves an existing Home link, rechecks current local admission, and uses its usual item scope. A failed link is not an empty success. Each origin belongs to exactly one grouping and verifies that configured team. Only the selected grouping is pulled; failure never selects another grouping. This pilot exception supersedes the draft's requirement for a preexisting Home roster for these sources. The reviewer withdrew that prerequisite after checking the actual source authorization boundary; no item access follows from grouping.
The implementation uses a 30-second refresh TTL and 120-second absolute maximum for RAM-only results, with bounded entry count and expiry sweeps on each request. Every cache key includes session digest, subject, team and source configuration; sign-out loses access to that key. Existing short-lived bearer tokens can still be spent once until expiry. Source unlink and permission changes are enforced on each new pull; displayed cached content has the explicit bounded staleness above.