Skip to content

feat: chat sharing UI and playbook viewer (/playbook/:uuid)#116

Open
nv78 wants to merge 1 commit intoclaude/add-multimodal-support-QBQcafrom
claude/playbook-sharing-ui
Open

feat: chat sharing UI and playbook viewer (/playbook/:uuid)#116
nv78 wants to merge 1 commit intoclaude/add-multimodal-support-QBQcafrom
claude/playbook-sharing-ui

Conversation

@nv78
Copy link
Member

@nv78 nv78 commented Mar 24, 2026

Summary

  • Share button in the Chatbot input bar (shown to authenticated users with an active chat that has messages): clicking calls GET /generate-playbook/:chatId and displays a modal with a copy-to-clipboard shareable URL
  • PlaybookView (/playbook/:uuid): public read-only page that renders a shared chat snapshot; includes an "Import to my chats" button that calls POST /playbook/:uuid and navigates the user to their new copy
  • Backend: extended /retrieve-shared-messages-from-chat to accept playbook_url (UUID), using the existing retrieve_messages_from_share_uuid() DB function that was already implemented but had no HTTP endpoint

What already existed (backend, untouched)

  • GET /generate-playbook/<chat_id> → creates a share record, returns /playbook/{uuid}
  • POST /playbook/<uuid> → imports the shared chat into the requesting user's account
  • create_chat_shareable_url(), access_shareable_chat(), retrieve_messages_from_share_uuid() in database/db.py

Test plan

  • Open a chat with messages → share button appears in the input bar
  • Click share → modal shows with a full URL (/playbook/some-uuid)
  • Click Copy → URL is copied to clipboard, button shows checkmark
  • Open the URL in an incognito window → PlaybookView loads the read-only chat
  • Click "Log in to import" → redirects to root login
  • Log in and open the playbook URL → "Import to my chats" appears
  • Click Import → navigates to /chat/<new_chat_id> with all messages loaded

https://claude.ai/code/session_01C9mHttiQ4ZAaBbQecVV7uu

Frontend:
- Chatbot.js: share button (visible for authenticated users with messages)
  calls GET /generate-playbook/:chat_id → shows modal with copy-to-clipboard URL
- PlaybookView.js: new /playbook/:uuid route renders a read-only snapshot
  of a shared chat with an "Import to my chats" button that calls
  POST /playbook/:uuid and navigates to the new chat
- routes.js + RouteConstants.js: register /playbook/:uuid route (public,
  no auth required)

Backend:
- /retrieve-shared-messages-from-chat now accepts playbook_url in addition
  to chat_id, using retrieve_messages_from_share_uuid() from db.py
- Import retrieve_messages_from_share_uuid in app.py

https://claude.ai/code/session_01C9mHttiQ4ZAaBbQecVV7uu
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.

2 participants