Skip to content

feat: add session export (Markdown, JSON, Plain Text)#51

Merged
matt1398 merged 1 commit intomatt1398:mainfrom
holstein13:feat/session-export
Feb 21, 2026
Merged

feat: add session export (Markdown, JSON, Plain Text)#51
matt1398 merged 1 commit intomatt1398:mainfrom
holstein13:feat/session-export

Conversation

@holstein13
Copy link
Contributor

@holstein13 holstein13 commented Feb 21, 2026

Summary

  • Adds an export button (↓) to the TabBar header, between Search and Notifications
  • Only visible when viewing a session tab with loaded data
  • Clicking opens a dropdown with three export format choices:
    • Markdown (.md) — structured with headings, tables, code blocks, blockquotes for thinking
    • JSON (.json) — full SessionDetail object, pretty-printed
    • Plain Text (.txt) — flat transcript with USER/ASSISTANT/TOOL/THINKING labels

Files changed

File Change
src/renderer/utils/sessionExporter.ts New — formatters + download trigger
src/renderer/components/common/ExportDropdown.tsx New — dropdown UI component
src/renderer/components/layout/TabBar.tsx Modified — integrates ExportDropdown
test/renderer/utils/sessionExporter.test.ts New — 51 tests

Test plan

  • pnpm typecheck passes
  • pnpm lint passes (0 errors, 0 warnings)
  • pnpm test passes (583/583, including 51 new)
  • pnpm build passes
  • Manual: open session tab, verify export icon appears in header
  • Manual: click each format, verify file downloads with correct content
  • Manual: switch to dashboard tab, verify export icon disappears

🤖 Generated with Claude Code
Closes #52

Add an export button to the TabBar header that lets users export
the current session as Markdown, JSON, or Plain Text. The button
appears between Search and Notifications, only for session tabs.

- sessionExporter.ts: formatters for all three formats + download trigger
- ExportDropdown.tsx: dropdown UI component with format selection
- TabBar.tsx: integration with conditional rendering for session tabs
- 51 new tests covering all formatters, edge cases, and download

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@matt1398
Copy link
Owner

Great idea! This is a really useful addition. Merging!

@matt1398 matt1398 merged commit 05b7888 into matt1398:main Feb 21, 2026
3 checks passed
@holstein13 holstein13 deleted the feat/session-export branch February 23, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Session export button (Markdown, JSON, Plain Text)

2 participants