sessions: share a chat as a public read-only link
A session's owner can hand out one capability link that opens the display
history without an account: no input, no chat list, no artifacts panel.
The token lives in the URL hash, so it never reaches the server in a request
line or a Referer header.

The link is permanent by decision - no expiry, no revoke. Deleting the chat
removes the share row (FK cascade) and closes it, which is the only switch.

Backend: session_shares table (unique token, FK cascade), POST
/sessions/{id}/share issuing the session's one link (owner or admin; a
read-all permission may read another user's chat but not publish it), and
public GET /shared/{token}[/messages] serving display history only, with
session and owner ids left out of the payload.

Webclient: #share=<token> renders a standalone page with the owner's cards,
rating off, interactive UI components filtered out and scroll-up paging; a
share button in the chat header opens a dialog that creates the link.

Also fixes ChatHeader's rename, which called an undefined `api` and failed
silently.
1 parent 2a62965 commit 65b8740e60c90cadd2b4eec22157da727dbbbea9
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored 5 hours ago
Showing 27 changed files
View
docs/api.md
View
docs/sessions.md
View
navi/api/routes/sessions.py
View
navi/api/routes/shared.py 0 → 100644
View
navi/core/pg_session_store.py
View
navi/core/session.py
View
navi/main.py
View
tests/unit/api/test_shared_session.py 0 → 100644
View
tests/unit/core/test_pg_session_store.py
View
webclient/dist/assets/index-9WlL4Sm7.css 100644 → 0
View
webclient/dist/assets/index-Bco2oCCf.js 100644 → 0
Not supported
View
webclient/dist/assets/index-Cz7DGfFX.css 0 → 100644
View
webclient/dist/assets/index-D7CP8OYD.js 0 → 100644
Not supported
View
webclient/dist/index.html
View
webclient/dist/sw.js
View
webclient/src/App.vue
View
webclient/src/api/index.js
View
webclient/src/components/chat/ChatHeader.vue
View
webclient/src/components/chat/ShareChatModal.vue 0 → 100644
View
webclient/src/components/messages/AssistantMessage.vue
View
webclient/src/i18n/messages/en.js
View
webclient/src/i18n/messages/ru.js
View
webclient/src/i18n/messages/uk.js
View
webclient/src/utils/hash.js
View
webclient/src/views/SharedChatView.vue 0 → 100644
View
webclient/tests/unit/components/appRouting.test.js
View
webclient/tests/unit/views/sharedChatView.test.js 0 → 100644