Skip to content

Trash cleanup, document dates, better post-processing#197

Merged
cmackenzie1 merged 6 commits intomainfrom
feat/cron-cleanup-dedup-date-extraction
Feb 8, 2026
Merged

Trash cleanup, document dates, better post-processing#197
cmackenzie1 merged 6 commits intomainfrom
feat/cron-cleanup-dedup-date-extraction

Conversation

@cmackenzie1
Copy link
Owner

No description provided.

cmackenzie1 and others added 6 commits February 7, 2026 15:42
Runs daily at 3am UTC to permanently delete documents that have been
in trash for more than 30 days, including their R2 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upload API returns 409 with existing document info when a duplicate is
detected. Email import silently skips duplicate attachments. Duplicates
are identified by matching MD5 hash against non-deleted files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a nullable document_date column to differentiate the meaningful
document date (invoice date, letter date, etc.) from the system
created_at timestamp. The AI now extracts dates from document content
and stores them as suggestions that can be accepted by the user.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Display inline error messages with a link to the existing document
when a duplicate upload is detected, instead of just a red icon with
a tooltip. Applies to both the dashboard quick upload card and the
upload modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Return rawResponse and parseError from generateSuggestions so the
queue handler can log them in the wide event. This makes it possible
to debug why AI suggestions are not being generated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e editing

- Switch from llama-3.1-8b-instruct (7968 token context) to
  llama-3.1-8b-instruct-fast (128k context) to fix error 1031
- Include AI model name in suggestion logs for diagnostics
- Change document_date column from timestamptz to date to avoid
  timezone-induced off-by-one-day bugs
- Add manual document date editing in detail panel via PATCH endpoint
  with YYYY-MM-DD validation
- Use head+tail truncation for AI content to capture dates at both
  ends of documents
- Fix documentDate not showing in dashboard table and detail panel
- Make edit button visibility consistent across all detail fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cmackenzie1 cmackenzie1 merged commit 5dbd3c7 into main Feb 8, 2026
3 checks passed
@cmackenzie1 cmackenzie1 deleted the feat/cron-cleanup-dedup-date-extraction branch February 8, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant