···11+# Story Archive Design
22+33+## Summary
44+55+Add a private story archive on the user's own profile page, allowing them to browse and view all past stories (not just the last 24 hours). Old story records already persist in the database — this feature surfaces them.
66+77+## Data Layer
88+99+**New XRPC endpoint: `social.grain.unspecced.getStoryArchive`**
1010+1111+- Params: `actor` (DID, required), `limit` (default 50), `cursor` (string, optional)
1212+- Returns: `{ stories: StoryView[], cursor?: string }`
1313+- Same logic as `getStories` but without the 24-hour cutoff
1414+- Ordered by `created_at DESC` (newest first)
1515+- Cursor-based pagination (cursor is the `created_at` of the last item)
1616+- Applies label moderation (hide-severity filtering) and cross-post hydration
1717+1818+Client query: `storyArchiveQuery(did, cursor?)` in `queries.ts`.
1919+2020+## UI
2121+2222+**Entry point:** A button on the profile page, visible only when `isOwnProfile`. Small archive/clock icon with "Story Archive" label.
2323+2424+**Archive grid:** Inline collapsible section on the profile page.
2525+2626+- 3-column grid of square thumbnails using the story `thumb` URL
2727+- Date overlay on each thumbnail (e.g., "Mar 15")
2828+- Tap opens StoryViewer for that single story
2929+- Infinite scroll with cursor pagination
3030+- Empty state: "No stories yet"
3131+3232+**StoryViewer adjustments:**
3333+3434+- When opened from archive, show a single story (no author swiping)
3535+- Existing delete button works as-is
3636+- `timeAgo` updated to show full date (e.g., "Mar 15") for stories older than 24 hours
3737+3838+## Files
3939+4040+**New:**
4141+- `server/xrpc/getStoryArchive.ts`
4242+- `lexicons/social/grain/unspecced/getStoryArchive.json`
4343+- `app/lib/components/molecules/StoryArchive.svelte`
4444+4545+**Modified:**
4646+- `app/lib/queries.ts` — add `storyArchiveQuery`
4747+- `app/routes/profile/[did]/+page.svelte` — archive button + grid section
4848+- `app/lib/components/organisms/StoryViewer.svelte` — single-story mode, full date for old stories
4949+5050+## Out of Scope
5151+5252+- Highlights / pinning stories to profile
5353+- Separate `/profile/{did}/stories` route
5454+- Retention limits or bulk delete
5555+- Archive visible to other users