forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to src/components/notes/rag-output-document.tsClear filter

2026-09-18

feat(notes): render and export the extracted RAG passages in the AI output drawerAhmet Kaan Gümüş · 2decb6a
feat(notes): render and export the extracted RAG passages in the AI output drawer

The stored payload's `passages` list — the indexed chunks the service has
been returning — was landing in the generic field dump as JSON, so clicking
an output showed the same text as a wall of raw keys. It now has its own
section (`Çıkarılan metin` / Extracted text): each passage shows its source
(attachment name via `files[]`, the note title for the note's own body
chunks, a neutral label otherwise — never a raw id), its page range when the
service recorded one, and its verbatim text with line breaks kept —
scrollable past a height cap on screen, flowed out in full for print.

`passages_truncated` renders the honest sentence with the total from
`chunks`. Copy / Download (.md) / Print build the same section, in the same
order, from the same document reader, so the export cannot diverge from the
view. Stored rows without `passages` keep the previous rendering and render
no section.
feat: ✨ view and export AI outputs from the note studioAhmet Kaan Gümüş · 84c2372
feat: ✨ view and export AI outputs from the note studio

Every stored AI output was a one-sentence summary with a delete action, so
the service's own payload (attachments, produced prose, lesser fields) was
unreachable from the UI. Clicking a card — or the new View item in its menu —
now opens a drawer that shows the output by name: date, note title, source
attachments, the produced text, the remaining payload fields with labels,
and the raw record behind a Technical details disclosure. Degraded outputs
(failed attachments, no text) render as an honest sentence, not a blank
drawer.

The drawer also exports what it renders: Copy writes the same Markdown to
the clipboard with a visible confirmation, Download (.md) saves it as a
dated file, and Print / PDF isolates the document from the app chrome (and
hides the actions and the raw disclosure) with a print stylesheet.

Delete is unchanged. Drawer copy lives in a lane-scoped typed module
(src/components/notes/rag-output-messages.ts) instead of the shared i18n
table, which sibling lanes are editing this hour.

Tests: rag-output-drawer.test.tsx (card opens the drawer and shows the
output; the built Markdown carries title, date, source names and body with
no raw ids; clipboard receives exactly that string and the confirmation
shows; download blob carries it; a failed[]-and-no-text output shows the
honest sentence); existing rag-outputs-panel.test.tsx still green.
bun run check clean.