Skip to content

feat: let Tidy rules match files by type - #47

Merged
AmrMsCLL merged 1 commit into
mainfrom
feat/tidy-file-types
Oct 5, 2026
Merged

AmrMsCLL merged 1 commit into
mainfrom
feat/tidy-file-types

Conversation

@AmrMsCLL

@AmrMsCLL AmrMsCLL commented Oct 5, 2026

Copy link
Copy Markdown
Member

Stacked on #46. This is 11d of as2026-10-05-strata-phase-11-next-batch-2.md.

What changes

  • A Tidy tagging rule can match a file type: images, PDFs, documents, spreadsheets, presentations, zip archives or text files. These are the types uploads accept.
  • "Title contains" is optional once a type is chosen. A rule needs words, a type, or both.
  • Types come from the stored MIME type, which uploads already check against the file's content. The Office MIME types are now exported from file-inspection.ts, so Tidy uses the same list.
  • Rule lists, the delete dialog and Tidy history describe file-type rules ("PDFs → Finance").

Migration

20261005100000_tidy_file_types:

ALTER TABLE "tidy_rules" ADD COLUMN "file_type" TEXT;
ALTER TABLE "tidy_rules" ALTER COLUMN "title_contains" SET DEFAULT '';

Contract

  • Tidy rules gain fileType. POST /spaces/:id/tidy-rules accepts fileType, and titleContains is now optional. Tidy history's rule gains fileType.

Verification

  • Server: test/integration/tidy.spec.ts (6 passed) and test/file-inspection.spec.ts (4 passed).
  • Frontend: test/tidy.spec.tsx (5 passed).
  • Lint and build pass.

@github-actions github-actions Bot added the size/m 51-200 changed lines, excluding lockfiles label Oct 5, 2026
@AmrMsCLL
AmrMsCLL force-pushed the feat/note-databases branch from 172c3a0 to 7f0881b Compare October 5, 2026 19:05
Base automatically changed from feat/note-databases to main October 5, 2026 19:05
@AmrMsCLL
AmrMsCLL force-pushed the feat/tidy-file-types branch from de4e1b5 to 1052d34 Compare October 5, 2026 19:05
@AmrMsCLL
AmrMsCLL merged commit 974477c into main Oct 5, 2026
6 checks passed
@AmrMsCLL
AmrMsCLL deleted the feat/tidy-file-types branch October 5, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m 51-200 changed lines, excluding lockfiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant