Skip to content

JUST-OS chat: include references in copy + localStorage chat history (#786)#791

Open
LukasWallrich wants to merge 1 commit into
mainfrom
feat/justos-chat-history-references
Open

JUST-OS chat: include references in copy + localStorage chat history (#786)#791
LukasWallrich wants to merge 1 commit into
mainfrom
feat/justos-chat-history-references

Conversation

@LukasWallrich

Copy link
Copy Markdown
Contributor

Closes #786.

What changed

JUST-OS chatbot improvements, in both the floating widget and the full-page chat.

1. References included in the copy button

  • References now render inside the answer box as a collapsible References (N) list, with the copy button below it.
  • The copy button copies the answer together with its references (full authors · title · URL) — previously it copied the answer only.

2. Multi-chat history in localStorage

  • Conversations now persist in localStorage (previously sessionStorage, wiped on tab close), so they survive browser restarts and are shared between the widget and the full-page chat.
  • New History button in both headers opens a panel listing past conversations (title from the first message + relative time, newest first). Each can be opened or deleted. "New Chat" archives the current conversation rather than discarding it. Capped at 50.

3. Chat font → Inter

  • Loads the Inter webfont and applies it to the chat UI (the site body font is Domine; Inter was previously declared for the navbar but never loaded).

Incidental fix

  • The standalone /just_os_chatbot/ page now keeps initializing even if the floating widget was dismissed earlier in the session (previously init() bailed out early).

Files

  • static/js/just-os-chat.js
  • layouts/partials/chatbot.html
  • layouts/shortcodes/just_os_chat.html

Testing

Verified in-browser (full-page chat and floating widget): references rendered inside the box, copy output including a real bot response with 4 references, history list/open/delete, cross-page persistence via localStorage, and Inter rendering.

🤖 Generated with Claude Code

- References now render inside the answer box as a collapsible list,
  and the copy button copies the answer together with its references
  (full authors, title, URL).
- Persist conversations in localStorage (was sessionStorage) with a
  multi-chat History panel: list, open, and delete past chats. Shared
  between the floating widget and the full-page chat; capped at 50.
- Use the Inter webfont for the chat UI (the site body is Domine).
- Keep initializing the standalone chat page even when the floating
  widget was dismissed earlier in the session.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@LukasWallrich LukasWallrich requested a review from a team as a code owner June 10, 2026 16:28
@github-actions

Copy link
Copy Markdown
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Spell Check Passed

No spelling issues found when checking 3 changed file(s)! 🎉

@LukasWallrich

LukasWallrich commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-06-10 18:17:21 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

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.

Change JUST-OS copy button to include references

1 participant