fix: a trashed note file leaves its note, quieter MCP sweep, bounded compose logs

A note's attachment moved to the trash from the file manager kept
showing on the note; the hydration read now skips it, as the chat one
already did. The MCP session sweep logged a line every minute while any
session was open; it logs only when it cleaned something. The compose
file caps the container log, and three test mocks that pointed at
modules long gone are removed.
This commit is contained in:
Maurice
2026-10-07 16:47:53 +02:00
parent 76df44d8de
commit 72fbbd55d4
9 changed files with 21 additions and 13 deletions
@@ -192,12 +192,18 @@ export class CollabNotesRepository extends TrekRepository<CollabNotes> {
// `TripFilesRepository`.
// -------------------------------------------------------------------------
/** CB6 (`formatNote`'s hydration read) — `SELECT id, filename, original_name, file_size, mime_type FROM trip_files WHERE note_id = ?`. */
/**
* CB6 (`formatNote`'s hydration read) — `SELECT id, filename, original_name,
* file_size, mime_type FROM trip_files WHERE note_id = ? AND deleted_at IS
* NULL`. A note's file can be moved to the trash from the file manager; it
* leaves the note then, as a chat attachment leaves its message.
*/
async listAttachmentsForNote(note_id: number): Promise<NoteAttachmentRow[]> {
return await this.kysely<NoteAttachmentsKyselyDB>()
.selectFrom('trip_files')
.select(['id', 'filename', 'original_name', 'file_size', 'mime_type'])
.where('note_id', '=', note_id)
.where('deleted_at', 'is', null)
.execute();
}