Skip to content

feat: folder-grouped tabular reviews with per-user page limit#54

Open
ecarjat wants to merge 1 commit intowillchen96:mainfrom
ecarjat:feat/folder-grouped-tabular-reviews
Open

feat: folder-grouped tabular reviews with per-user page limit#54
ecarjat wants to merge 1 commit intowillchen96:mainfrom
ecarjat:feat/folder-grouped-tabular-reviews

Conversation

@ecarjat
Copy link
Copy Markdown

@ecarjat ecarjat commented May 10, 2026

Summary

  • Folder-grouped rows: a new toggle in the tabular review creation flow lets users treat all documents inside the same project subfolder as a single review row (label = folder path, subtitle = N documents). Documents without a subfolder still get their own row.
  • Per-user page limit: a configurable tabular_max_pages setting (10–2000, default 250) in Account → Models & API Keys controls how large a grouped row can be before it is skipped. Rows that exceed the limit now surface a single, full-width error banner instead of repeating the error icon in every column.
  • PDF.js noise fixes: all getDocument calls now pass standardFontDataUrl and verbosity: 0, eliminating the standardFontDataUrl and TT: undefined function: 32 console warnings.

Database changes

Two new migrations ship alongside an updated schema.sql:

Migration Purpose
20260510000000_tabular_review_rows.sql Adds document_grouping to tabular_reviews; introduces tabular_review_rows and tabular_review_row_sources tables; backfills existing cells; adds RLS policies
20260510000001_user_tabular_max_pages.sql Adds tabular_max_pages integer default 250 to user_profiles

The initial schema (20240101000000_initial_schema.sql) is also updated to keep it in sync with the new tables for fresh installs.

Test plan

  • Create a project with at least two subfolders, each containing multiple documents
  • Start a tabular review → enable "Treat documents in the same subfolder as one row" → confirm rows are grouped by folder with correct labels and document counts
  • Run all columns → confirm each folder row is processed as a unit
  • In Account → Models & API Keys, set Max pages to a low value (e.g. 10) and re-run → confirm the row shows the full-width error banner with the page-count message
  • Confirm no standardFontDataUrl or TT: undefined function warnings in backend logs after PDF upload/processing

🤖 Generated with Claude Code

Adds the ability to treat all documents within the same project
subfolder as a single tabular review row, plus a per-user configurable
page limit for grouped rows with clear error reporting.

**Folder-grouped rows**
- New `document_grouping` column on `tabular_reviews` (`document` | `folder`)
- New `tabular_review_rows` and `tabular_review_row_sources` tables replace
  the implicit per-document model; every row carries an explicit source list
- Backfill migration moves existing cell data into the new row model
- Frontend toggle ("treat subfolder documents as one row") in the
  Add Review modal and side panel
- Row label shows folder path with document count subtitle

**Per-user page limit**
- `tabular_max_pages` column on `user_profiles` (10–2000, default 250)
- Setting exposed in Account → Models & API Keys
- Rows exceeding the limit are skipped with a single row-level error
  banner (instead of per-cell error icons)
- Error cells now show a tooltip with the failure reason

**PDF.js fixes**
- Pass `standardFontDataUrl` and `verbosity: 0` to all `getDocument`
  calls to eliminate `standardFontDataUrl` and `TT: undefined function`
  console warnings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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