Skip to content

Add optional vault tags with filename, OCR, and upload-profile rules - #219

Open
FlintSH wants to merge 2 commits into
mainfrom
feat/vault-tags
Open

FlintSH wants to merge 2 commits into
mainfrom
feat/vault-tags

Conversation

@FlintSH

@FlintSH FlintSH commented Sep 18, 2026

Copy link
Copy Markdown
Owner

What does your PR do?

Adds private tags as an optional filter over Your Files. All files still open together; files can have several tags and never move or change URLs. Tags can be applied from a file’s existing menu or to a selection of files, with inline creation, an Untagged filter, and small neutral chips on tagged files.

Each tag can optionally match a phrase in the original file name or extracted OCR text. Upload profiles can also add tags. Rules run for new uploads or new OCR results; applying them to older files is an explicit action. Removing an automatic tag is remembered, including across retries and backfills.

Why are you making these changes?

Issue #126 asks for organization without losing Flare’s simplicity. I reviewed #179 and its revert. That attempt introduced nested folders, three view modes, a sidebar, breadcrumbs, colored tags, and a feature toggle. This takes the lighter tagging direction raised in the issue: one home, one additional filter, and optional automation inside the tag editor. Search, existing filters, pagination, and image browsing continue to compose with tags.

How did you implement it?

  • OCR results and pending tag work are saved together. A background worker and cached OCR requests retry unfinished tagging; transactional application preserves extracted text and manual removals across failures, concurrent requests, and process restarts.
  • Owner-scoped tag APIs and transactional bulk updates, with normalized unique names and remembered exclusions for manually removed tags.
  • Literal, case-insensitive matching using existing local OCR. No external service. OCR rules currently cover images; the rule editor explains that dependency.
  • Profile choices flow through the shared upload finalizer, including normal/chunked uploads and pastes. Profile-bound tokens cannot override their tag defaults. Deleting a tag cleans profile references and leaves files intact.
  • New VaultTag/VaultFileTag tables avoid collisions with the retired tables left on installations that applied feat: Folders & Tags — organize uploads with grid/list/folder views #179. The migration preserves those tables; it does not import their data.

Usage and behavior notes

Screenshots / Recordings (if UI)

Filtered files, using the existing vault:

Files filtered by Travel

Optional automatic rule:

Automatic tagging rule

Mobile files Tagging a selection
Mobile files filtered by Travel Edit tags across selected files

Tag filter · Upload profile tag picker

Related Issues

Closes #126. Related to the reverted #179 and the existing gallery in #212.

Additional Info

Validation:

  • 568 unit tests passed; TypeScript, lint, and repository formatting checks passed.
  • 31 PostgreSQL integration checks passed, including existing customization/upload contracts, tag ownership, exclusions, backfill, profile cleanup, fresh migrations, and compatibility with retained legacy tables. New database tests run in CI.
  • OCR retry regression tests cover a failed first request, a successful retry from cached text without re-extraction, no repeat application after completion, unavailable databases, and concurrent background retries.
  • Real browser/API checks passed for multipart uploads, chunk completion/retries, the Paste UI, randomized URLs, upload profiles, and actual Tesseract OCR matching.
  • Desktop and mobile checks passed for tag creation, filtering/reload/reset, image browsing within a tag, mixed-selection bulk edits, rule editing, and overflow.
  • The initial feature commit’s production container build and disposable-database smoke test passed in GitHub Actions. Cloud visual review is blocked by the project plan limit: after a successful upload, Meticulous refused to create a test run (“Cloud test run creation was rate limited for project fl1nt.dev/Flare”). There is no cloud test-run result to classify. Local replay review covered the new library controls; the profile replay baseline predates other merged layout changes, so the profile picker was checked directly in the browser.

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown

Flare PR preview: expired

The 24-hour preview lifetime ended. A new commit or a re-run of the image workflow creates a fresh preview.

Commit: 92327611b584
Image build and logs

Public, disposable test instance running untrusted PR code. Anyone can view or change its test data. Do not enter passwords you use elsewhere, credentials, or private files.

@FlintSH
FlintSH marked this pull request as ready for review September 18, 2026 01:24
@greptile-apps

greptile-apps Bot commented Sep 18, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

Safe to merge.

Summary

This PR adds owner-scoped vault tags, filename and OCR automation rules, upload-profile defaults, filtering and bulk-management UI, and durable retry handling for OCR-derived tags.

It persists unfinished OCR tag work and applies it through serialized background and on-demand retries, preventing successful OCR results from being permanently left without matching tags after a transient tagging failure.

Reviews (2) · Last reviewed commit: "Persist and retry unfinished OCR tag app..."

Comment thread lib/ocr/processor.ts Outdated
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.

[FEATURE] Folders/Tagging/Grouping Uploads

1 participant