fix(journey): keep photo deletes out of the assistant and never let the capture reader block an upload

delete_journey_photos removes uploaded files for good and has no undo; its
generic approval card could only list ids, so the assistant is not offered it.
External MCP clients keep the tool.

A HEIC upload no longer fails when the lazily loaded capture reader cannot be
loaded: the photo goes up without its capture, as before. The upload schema's
doc comment is back on the schema it describes.
This commit is contained in:
Maurice
2026-11-30 14:46:20 +01:00
parent e59cd23e60
commit 535503b73d
5 changed files with 42 additions and 12 deletions
+8 -8
View File
@@ -366,14 +366,6 @@ export type JourneyEntryCreateRequest = z.infer<typeof journeyEntryCreateRequest
export const journeyEntryUpdateRequestSchema = z.looseObject({});
export type JourneyEntryUpdateRequest = z.infer<typeof journeyEntryUpdateRequestSchema>;
/**
* Multipart field alongside the uploaded files.
*
* `.optional()` is not decoration: a multipart request with files and no text
* fields arrives with NO body at all, and the handler answers 'No files
* uploaded' for the empty case. Without this the pipe would answer
* 'body: Invalid input: expected object' first and the message would change.
*/
/**
* When and where an uploaded photo was taken, as the client read it from a HEIC
* before converting it to a JPEG that no longer carries it (#3120). Multipart
@@ -390,6 +382,14 @@ export const journeyPhotoCaptureFieldsSchema = z.object({
});
export type JourneyPhotoCaptureFields = z.infer<typeof journeyPhotoCaptureFieldsSchema>;
/**
* Multipart field alongside the uploaded files.
*
* `.optional()` is not decoration: a multipart request with files and no text
* fields arrives with NO body at all, and the handler answers 'No files
* uploaded' for the empty case. Without this the pipe would answer
* 'body: Invalid input: expected object' first and the message would change.
*/
export const journeyEntryPhotoUploadRequestSchema = z
.looseObject({
caption: z.unknown().optional(),