#617 Move Recent Activity Into A Global Activity Panel - #771
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cielbellerose
left a comment
There was a problem hiding this comment.
Code Review — Cycle 1 · needs revision
2 open — 1 🟠 Medium, 1 🟡 Low (see inline)
Revision — Cycle 1fixed R1-M1, R1-L1 · 4552659 |
cielbellerose
left a comment
There was a problem hiding this comment.
Code Review — Cycle 2 · approved
0 open
cielbellerose
left a comment
There was a problem hiding this comment.
Code Review — Cycle 3 · needs revision
2 open — operator feedback after approval (from the Vercel preview)
R3-M1 (Medium, UX) — the panel's empty state has no horizontal padding.
The "No recent activity" empty state ("Updates to your applications and new applications to the positions you manage will show up here.") runs to the edges of the Sheet. SheetContent is p-0, and the roomy SectionCardEmpty in components/ui/section-card.tsx has only py-10, no horizontal padding. Add horizontal padding in the panel, for example px-6 on the empty-state wrapper in ActivityFeed / the panel's scroll body, so the text wraps inside the panel with comfortable margins at every width.
- Keep the fix scoped to the panel. Don't change
SectionCardEmpty's shared styles, which other cards rely on. - Check the compact error fallback ("Couldn't load recent activity.") lines up with the new padding.
R3-M2 (Medium, UX) — remove the description under the panel title.
The header should show only the title Recent activity. Remove the visible SheetDescription from components/features/activity-panel.tsx, and drop the now-unused description prop plus the ACTIVITY_FEED_COPY[*].description entries in lib/constants.ts, along with any call site in app-shell.tsx / sidebar.tsx / mobile-nav.tsx.
- Radix
Dialogwarns in the console when aDialogContenthas no description. Passaria-describedby={undefined}onSheetContent(the Radix-sanctioned opt-out) rather than keeping a hidden description. - Keep
emptyDescription; it's still used by the empty state. - Update
docs/WORKFLOWS.mdXC-10 if it mentions the header description.
Revision — Cycle 3fixed R3-M1, R3-M2 · e9f4be5 |
cielbellerose
left a comment
There was a problem hiding this comment.
Code Review — Cycle 4 · needs revision
1 open — 1 🟠 Medium (see inline)
Operator decision — R4-M1 (won't fix, by design)The
Future reviews should not re-flag this pattern for this component. |
cielbellerose
left a comment
There was a problem hiding this comment.
Code Review — Cycle 5 · needs revision
1 open — operator feedback after approval (from the Vercel preview)
R5-M1 (Medium, UX) — activity messages are cut off at two lines.
components/features/activity-feed.tsx:30 clamps each activity sentence with line-clamp-2. On mobile, and in the narrow side sheet on desktop, normal-length messages get truncated, so the user can't read the full update. Change it to line-clamp-3 at every width, which fits nearly all messages in full.
- Don't add responsive clamp variants: the panel is narrow at every breakpoint.
- Update
ActivityFeedGroupSkeleton/ActivityFeedListSkeletononly if their row height assumes two lines. Otherwise leave them alone. - No other changes. In particular, leave the activity button's hover colour as it is (operator decision).
Relocates the dashboard "Recent activity" card into a Sheet reachable from every authenticated page (sidebar on desktop, mobile-nav on mobile), so activity isn't tied to standing on the dashboard. getActivityGroups composes the caller's own applications with a reviewer group scoped to managed/all positions, self-filtered so a reviewer's own application never appears twice. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Match the activity skeleton to the resolved two-heading layout for reviewer scopes, and fall back to a muted message instead of the global error boundary when the feed's fetch throws. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
e9f4be5 to
6578536
Compare
Revision — Cycle 5fixed R5-M1 · 6578536 |
cielbellerose
left a comment
There was a problem hiding this comment.
Code Review — Cycle 6 · approved
0 open
Closes #617
Summary
Sheetreachable from every authenticated page — top-right of the sidebar header on desktop, immediately left of the hamburger menu on mobile.getActivityGroups(userId, isAdmin)(prisma/data/activity.ts,cache()d) composes the caller's own submitted-application activity with a reviewer group (managed positions for a manager, all published positions for an admin), self-filtering out the viewer's own application from the reviewer group so it never shows twice.Changes
lib/types.ts—ActivityScope,ActivityGroups.lib/constants.ts—ACTIVITY_FEED_COPY(description/empty copy per scope),ACTIVITY_MINE_TITLE.prisma/data/activity.ts(new) —getActivityGroups, composinggetMyRecentActivityandgetRecentApplicationsin parallel, with the self-filter and sentence mapping moved here fromactivity-feed.tsx.components/features/activity-feed.tsx— replaced the two dashboard-only wrappers (ApplicantActivityFeed,ReviewerActivityFeed) with a single asyncActivityFeed, a bareActivityFeedList, a privateActivityFeedGroup, and an exportedActivityFeedListSkeleton.components/features/activity-panel.tsx(new, client) — theSheettrigger + content, opening from the right so it never reads as the same surface asMobileNav's left-side menu drawer.components/layouts/app-shell.tsx— derivesscope, builds the panel node once when signed in, passes it to bothSidebarandMobileNav.components/layouts/sidebar.tsx/mobile-nav.tsx— newactivityPanelprop, rendered top-right of eachh-14header.components/features/user-dashboard.tsx,manager-dashboard.tsx,admin-dashboard.tsx— removed the activity-feedSuspenseblock and its import.components/ui/section-card.tsx— removed the now-unused'timeline'skeleton row shape (its markup lives inActivityFeedListSkeletonnow).tests/db/authorization.test.ts— newgetActivityGroups composition and scopingdescribe block.docs/WORKFLOWS.md— newXC-10 Activity panelentry (+ TOC link); AP-1 and PM-1 updated to drop the activity feed and link XC-10; AD intro notes theallscope.Testing plan
/positions: no activity trigger at any width.managedcopy.[activity] [menu]; the activity sheet opens right, the menu sheet opens left; each closes independently./for all three personas: no "Recent Activity" card on any dashboard./profile,/manage/applications): the trigger is present and the panel works.getActivityGroupsdb tests: applicant-only, neither-role, draft-only, manager-only, manager-who-applied (self-filter + public status), admin-who-applied (self-filter + draft/deleted exclusion) — added totests/db/authorization.test.ts.Automated checks
npm run prettier:check— passnpm run eslint:check— passnpm run tsc:check— passnpm run test:unit— 439 passed (2 pre-existing, unrelated suites fail on import because this sandboxed worktree has noDATABASE_URL/reachable Postgres — port 5432 is already bound by an unrelated container, sonpm run db:startcannot bind it either). The newtests/db/authorization.test.tscases could not be run locally in this environment; they'll run in CI, which has its own Postgres service.Notes
Notificationmodel, no/notificationspage — this relocates and improves access to information the app already computes.router.refresh(), or any revalidating server action — not on a plain client-side link navigation. Documented in the newXC-10entry.🤖 Generated with Claude Code