# Conversations Tab Implementation Plan > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. **Goal:** Pump every LibreDesk conversation, read-only, into `labeling/auto/conversations//` (JSON, attachments, a readable transcript), launched and shown from a new **Conversations** page of the app. **Architecture:** The pumping lives in `~/aimsight-libredesk/conversations/` (standard library, French, its own `.env` key, a guard test: `GET` only). The app reaches it through a new link `libredesk/` and calls `conversations/pompage.py` as `station.py` calls `extraction/pumping.py`; it lists the pumped folders and renders `transcript.md` safely (escaped, CSP, sandboxed frame, non-image attachments as downloads). **Tech Stack:** Python 3 stdlib (`urllib`, `html.parser`, `unittest`) in aimsight-libredesk; FastAPI + `markdown` and React/Mantine in the app. **Spec:** `docs/superpowers/specs/2026-11-18-conversations-tab-design.md` ## Global Constraints - LibreDesk: only `GET`, only `/api/v1/conversations/all`, `/api/v1/conversations/{uuid}/messages`, and the `attachments[].url` the messages carry; never a URL found in a message's text. - `Authorization: token :` only to the LibreDesk host (`add_unredirected_header`, host compared as in `snippets/envoyer.py`); attachments on another host (S3) downloaded without it. - Key: `LIBREDESK_LECTURE_KEY`, `LIBREDESK_LECTURE_SECRET` in `~/aimsight-libredesk/.env`; URL `LIBREDESK_URL`, default `https://helpdesk.sensima.ch`. Claude never reads a `.env`. - Every conversation: all inboxes, all statuses, private notes included, no filter. - `~/aimsight-libredesk`: standard library only, code/comments/commits in French. The app: English. - Every time in UTC. Commits by path, never `git add -A`; each message ends with a blank line then `Co-Authored-By: Claude Opus 5.5 `. Nothing pushed. - Nothing committed in `~/aimsight-labeling` by this plan: the user commits `auto/conversations/` after looking at the first range. ## Review Focus - An attachment name with `/`, `..`, or an empty name → stays inside `attachments/` (sanitized, uuid fallback). Test in Task 2. - Two attachments with the same name in one conversation → both kept (second prefixed by its uuid). Test in Task 2. - A `reference_number` that is not `[A-Za-z0-9_-]+` → folder named by the conversation's `uuid`. Test in Task 2. - A pumping cut halfway (exception after some conversations) → `pumped.json` unchanged, the next run fetches the rest. Test in Task 2. - A client mail with `
ok
"), "ok") def test_balise_echappee_reste_du_texte(self): # l'app échappe à l'affichage, pas ici self.assertEqual(texte("<script>"), "` and `![p](attachments/p.png)`. Assert: ```python assert [c["reference"] for c in conversations.list_conversations()] == ["42"] assert conversations.list_conversations()[0]["messages"] == 2 page = conversations.transcript("42", False) assert "