Skip to content

Receiver: clickable attachment links, clean display, dedup SSE init#7

Merged
Taure merged 2 commits into
mainfrom
feat/receiver-links-and-dedup
Jun 24, 2026
Merged

Receiver: clickable attachment links, clean display, dedup SSE init#7
Taure merged 2 commits into
mainfrom
feat/receiver-links-and-dedup

Conversation

@Taure

@Taure Taure commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Addresses three issues seen while testing the live receiver feed:

  1. Attachment links unreachable from the browser - the URL used the internal chatli:8090 host. Added chatli_public_path (browser-facing) for building attachment URLs, and normalize stored URLs onto that host at display time so existing rows work too.
  2. Links not clickable - the feed showed the raw stored JSON. Now it shows the message's inner payload as text, and attachment messages render a clickable <a> link.
  3. Same batch repeating - message_init appended the full list on every SSE (re)connect, so a reconnect duplicated everything. Now it replaces (#messages inner) - idempotent re-sync; live messages still append.

Verified in headless Chrome: text rows show clean payload, attachment row is a clickable localhost:8090 link, no duplicate rows across the held SSE.

Taure added 2 commits June 24, 2026 19:34
Receiver feed improvements:
- show the message's inner payload (text), not the raw stored JSON;
  attachment messages render a clickable link
- attachment URLs are rewritten to a browser-reachable host: add
  chatli_public_path config (the internal chatli:8090 host isn't
  resolvable from the browser); normalize stored URLs at display time so
  existing rows work too
- message_init replaces (#messages inner) instead of appending, so an
  SSE reconnect re-syncs instead of duplicating the whole batch

Verified in headless Chrome.
@Taure Taure merged commit 9921036 into main Jun 24, 2026
2 checks passed
@Taure Taure deleted the feat/receiver-links-and-dedup branch June 24, 2026 17:42
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