You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The upload pipeline is hardcoded around PDF. Every variable, function, and storage key uses pdf* naming, and the parsing logic is 200+ lines inlined in generation-preview/page.tsx.
We have 6+ open PRs adding new formats or modifying this pipeline (#41, #44, #65, #140, #160, #191), and they all conflict with each other on the same file.
Plan
Extract the inline parsing into a parseDocument() function with a per-format parser registry (parse-pdf.ts, parse-text.ts, etc.)
Rename pdf* to document* across the pipeline (TypeScript only, no DB migration)
After this lands, adding a new format = one parser file + register the extension. No need to touch the generation pipeline.
What this means for open PRs
PRs in this area will need a rebase after the refactoring. The rebase should simplify your diff, not complicate it. Happy to help with that.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
The upload pipeline is hardcoded around PDF. Every variable, function, and storage key uses
pdf*naming, and the parsing logic is 200+ lines inlined ingeneration-preview/page.tsx.We have 6+ open PRs adding new formats or modifying this pipeline (#41, #44, #65, #140, #160, #191), and they all conflict with each other on the same file.
Plan
parseDocument()function with a per-format parser registry (parse-pdf.ts,parse-text.ts, etc.)pdf*todocument*across the pipeline (TypeScript only, no DB migration)What this means for open PRs
PRs in this area will need a rebase after the refactoring. The rebase should simplify your diff, not complicate it. Happy to help with that.
Roadmap after merge
Feedback welcome.
Beta Was this translation helpful? Give feedback.
All reactions