Skip to content

Add pin/unpin and chat export from sillanaresh/chorus-test#71

Closed
rmichelena wants to merge 3 commits into
meltylabs:mainfrom
rmichelena:rmichelena/fork-pin-export
Closed

Add pin/unpin and chat export from sillanaresh/chorus-test#71
rmichelena wants to merge 3 commits into
meltylabs:mainfrom
rmichelena:rmichelena/fork-pin-export

Conversation

@rmichelena
Copy link
Copy Markdown

Cherry-picks 3 commits from the fork sillanaresh/chorus-test:

  • 48faec8 Add pin/unpin functionality for conversations
  • 35cfc66 Fix cache update sorting to respect pinned status
  • 7b42ed1 Add chat export functionality (JSON and Markdown)

Minor conflicts were resolved during cherry-pick:

  • ChatAPI.ts: kept totalCostUsd field alongside the activated pinned field
  • AppSidebar.tsx: kept both formatCost and ExportAPI imports

Test plan

  • Pin a chat — it moves to the top of the sidebar list
  • Unpin a chat — it returns to its position by updated_at
  • Send a new message to a pinned chat — it stays pinned at the top
  • Right-click (or open the context menu) on a chat — Export to JSON and Export to Markdown options are visible
  • Export a chat to JSON — file downloads and contains correct messages
  • Export a chat to Markdown — file downloads and conversation is formatted correctly with multi-model responses grouped by turn
  • Existing chat list ordering still works for unpinned chats (most recent at top)

🤖 Generated with Claude Code

Naresh Silla and others added 3 commits May 5, 2026 11:15
This commit implements a conversation pinning feature that allows users to pin important chats to the top of their chat list for quick access.

Changes:
- Added useTogglePinChat mutation in ChatAPI.ts to toggle pin status
- Updated fetchChats query to sort pinned chats first (ORDER BY pinned DESC)
- Removed deprecated comment from pinned field in Chat type
- Added Pin/PinOff icons from lucide-react to AppSidebar
- Implemented pin toggle button in chat list items
- Pin icon shows as filled when chat is pinned, appears on hover when unpinned
- Added tooltip showing "Pin chat" or "Unpin chat" based on state

The pinned field already existed in the database schema but was marked as deprecated and unused. This change activates that functionality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Addresses code review comment from greptile-apps bot.

The useCacheUpdateChat function was sorting only by updatedAt,
which didn't match the database query sorting (pinned DESC, updated_at DESC).
Now sorts pinned chats first, then by updatedAt.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implements export feature that allows users to export chats as JSON or Markdown files. Properly handles multi-model conversations by grouping AI responses side-by-side for each user message turn.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@rmichelena
Copy link
Copy Markdown
Author

Opened by mistake against upstream. The correct PR is in the personal fork.

@rmichelena rmichelena closed this May 5, 2026
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.

1 participant