Replace passive recent-task detail reads with bounded, authorized summaries. Keep account isolation, stored history, task actions, and live recovery behavior. Overlap access checks with shell settings and avoid duplicate session and health reads on the first healthy socket opening. Retain domain reconciliation. Add focused coverage and local performance evidence. Isolate the existing cache capacity test from entry expiry on slow CI runners. Co-Authored-By: Paperclip <noreply@paperclip.ing>
5.2 KiB
navigation
| navigation | ||||||
|---|---|---|---|---|---|---|
|
Navigation, profile, and announcements
People organize their sidebar, move between company resources, maintain their profile, and dismiss product announcements with the correct persistence and identity scope.
Implementation: sidebar, profile, announcements.
Agent access: companion.
Sub-features
navigation: use current sidebar links, favorites, recents, and available layout controls.preferences: persist supported ordering/collapse choices for the intended user/company.profile: edit personal identity and inspect public profile links.announcements: inspect and dismiss an announcement with its intended instance-wide user scope.fallbacks: handle missing resources and old deep links without presenting another resource as the target.
How to get to it (user POV)
sidebar-deep-links
Use starred/recent/sidebar links and direct company-prefixed URLs.
profile-announcements
Use Settings → Profile, /u/:userSlug, and the announcement well when a publication is available.
Driving it with Playwright and the Paperclip CLI
Preconditions: follow the baseline. Use two test users and companies; record the selected UI shell and any client-local preference storage.
sidebar-deep-links
Automated: sidebar and sidebar preference routes cover UI/server behavior.
Manual: Star and reorder supported resources, collapse a section, navigate and reload. Switch company/user and inspect the intended preference scope. Open an unavailable resource and a legacy route; verify clear fallback or correct redirect without leaking another company’s state.
Record persistence separately: section collapse is in-memory and reopens after reload; global sidebar collapse is disabled. Streamlined starred projects sort alphabetically. Recents are browser-local by user/company; stars and supported ordering are saved server-side. Local-trusted mode does not prove two-user isolation.
profile-announcements
Automated: profile page, announcement hook, and announcement routes cover separate UI/persistence layers.
Manual: Change a disposable user’s display details, reload, and inspect an attributed profile link. Dismiss a fixture announcement, switch companies, and verify it remains dismissed for that user; check another user still has their own dismissal state.
Gotchas
- Announcement dismissals are intentionally instance-wide user preferences, unlike company-scoped domain data.
- Legacy/production shells need their own navigation check when affected.
- A route redirect is part of the journey; do not document a removed screen as if it still renders.
Storybook verification
preferences
Scope: ui Storybook: Mount Sidebar using real preference boundary with stars/order/collapse/recents state. Clearly distinguish in-memory section collapse, browser-local recents and server-saved stars/order. Production: GET/PUT /sidebar-preferences/me and /companies/{id}/sidebar-preferences/me plus stars must retain intended user/company isolation across reload and switch. Section collapse reopens after reload; global collapse is disabled. Sources: Source: Sidebar.tsx, sidebar-preferences.ts, sidebar-preferences.ts. Tests: Sidebar.test.tsx, sidebar-preferences-routes.test.ts
fallbacks
Scope: browser Storybook: A NotFound rendering story can help polish, but missing-resource/legacy-deep-link capability principally needs real App/router/browser scenarios preserving company and query intent. Production: Cold-open invalid company/resource and retired URL; verify explicit fallback or correct canonical redirect without silently targeting a different resource/company. Sources: Source: NotFound.tsx, App.tsx, company-routes.ts. Tests: App.activity-routing.test.tsx, App.cases-routing.test.tsx, App.test.tsx, company-routes.test.ts
Recent task refresh performance
Saved recent tasks render immediately. One summary batch refreshes at most five IDs per company/account without passive full-detail or workspace inspection. Successful omissions remove unavailable entries; failed reads preserve history. Verify rename, inbox archive, pause/restart, reload, cross-tab updates and account switches. Inbox archive does not remove the task from recent history.