Skip to content

[Feature] Archive stories with sidebar toggle #148

@realproject7

Description

@realproject7

Problem

Users accumulate stories over time but have no way to organize them. Old/completed stories clutter the sidebar alongside active ones.

Solution

Add an archive feature for stories that have structure.md (confirmed stories only — not untitled sessions).

Archive button

Located on the top-right of the terminal session tab (same position as the Cancel button for untitled sessions). Only visible for confirmed stories (those with structure.md).

┌─────────────────────────────────────────────┐
│ ● seoul-slowly ×                [Archive]   │
│─────────────────────────────────────────────│
│  Claude Code v2.1.92                        │

Clicking shows a confirmation: "Archive this story? You can restore it later."

On archive:

Move the story folder from ~/.plotlink-ows/stories/{name}/ to ~/.plotlink-ows/stories/.archived/{name}/. The .archived prefix hides it from the normal story scan.

Sidebar toggle

Replace the bottom area (where "+ New Story" used to be) with a "View Archives" toggle button.

NORMAL VIEW:
┌──────────────┐
│ Stories    2  │
│ [+ New Story]│
│              │
│ ▸ new-emp... │
│ ▸ seoul-s... │
│              │
│              │
│ [📦 Archives]│  ← bottom of sidebar
└──────────────┘

ARCHIVE VIEW:
┌──────────────┐
│ 📦 Archives 1│
│ [← Back]     │
│              │
│ ▸ old-story  │  
│   [Restore]  │  ← per-story restore button
│              │
└──────────────┘

Archive view behavior:

  • Sidebar switches to show only archived stories
  • Each archived story has a "Restore" button/action
  • Restoring moves the folder back from .archived/ to stories/
  • "← Back" returns to the normal stories view
  • No terminal sessions for archived stories (read-only browse)

API endpoints:

  • POST /api/stories/archive — body: { name } — moves to .archived/
  • POST /api/stories/restore — body: { name } — moves back from .archived/
  • GET /api/stories/archived — lists stories in .archived/

Files

  • app/web/components/StoryBrowser.tsx — archive view toggle, restore buttons
  • app/web/components/TerminalPanel.tsx — archive button on session tab
  • app/web/components/StoriesPage.tsx — archive state management
  • app/routes/stories.ts — archive/restore/list-archived endpoints

Acceptance Criteria

  • Archive button on top-right of terminal for confirmed stories
  • Confirmation popup before archiving
  • Story folder moved to .archived/ subdirectory
  • Archived story removed from main sidebar
  • "Archives" toggle at bottom of sidebar
  • Archive view shows archived stories with Restore button
  • Restore moves story back to main stories list
  • "← Back" returns to normal view
  • Untitled sessions show Cancel button (not Archive)
  • Only stories with structure.md can be archived

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions