mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 14:06:27 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user