Skip to content

refactor(file-processing-settings): file-processing-settings#14964

Closed
eeee0717 wants to merge 11 commits into
v2from
v2-file-processing-ui
Closed

refactor(file-processing-settings): file-processing-settings#14964
eeee0717 wants to merge 11 commits into
v2from
v2-file-processing-ui

Conversation

@eeee0717
Copy link
Copy Markdown
Collaborator

@eeee0717 eeee0717 commented May 9, 2026

What this PR does

Before this PR:

File processing settings were split across the legacy document-processing settings UI. Processor configuration was also harder to reason about because renderer and main-process code did not share the same layered preset model.

After this PR:

  • Replaces the legacy document-processing settings entry with a dedicated File Processing settings page.
  • Groups file processors by feature, including image-to-text and document-to-markdown.
  • Moves file processor preset merging helpers into shared code so renderer and main-process resolution use the same model.
  • Adds API key, model, host, PaddleOCR deployment, and Tesseract language settings to the new UI.
  • Adds a Component Lab file-processing test panel for running processors against sample files.
  • Handles available-processor lookup failures by logging the failure and falling back to an empty availability set, which keeps OV OCR hidden while the rest of the UI remains usable.

Fixes #
N/A

Why we need it and why it was done in this way

The following tradeoffs were made:

  • This PR focuses on settings UI and configuration wiring. Processor execution behavior is intentionally kept unchanged unless it is required for the UI to work.
  • OV OCR remains gated by runtime availability. If the availability lookup fails, the UI hides OV OCR instead of surfacing a user-facing error.
  • The old document-processing settings UI is removed in favor of the new File Processing settings page instead of maintaining both UIs in parallel.

The following alternatives were considered:

  • Keeping the legacy document-processing settings UI during the transition was considered, but it would duplicate the configuration surface and make processor preset ownership less clear.
  • Changing OCR runtime behavior in this PR was considered, but deferred because this PR is scoped to UI/settings behavior.
  • Adding a breaking-change fragment was considered, but not added because this is a v2 settings UI refactor and does not require user action.

Links to places where the discussion took place:
N/A

Breaking changes

None.

Special notes for your reviewer

Out of scope / intentionally not addressed in this PR:

  • OCR processor execution logic is not changed in this PR; the current changes are limited to UI/settings wiring and available-processor state handling.
  • No breaking-change fragment is added because there is no required user action for this v2 settings UI refactor.
  • Merge commits in this branch are left as-is because this PR will be squash-merged.
  • useAvailableFileProcessors now exposes a status internally, but this PR does not add a visible error state. On lookup failure, the page logs a warning, hides OV OCR, and leaves the remaining processors visible.

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

Release note

Refined the file processing settings UI and added a Component Lab panel for testing file processors.

eeee0717 added 4 commits May 9, 2026 17:45
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
@DeJeune DeJeune added the v2 label May 9, 2026
0xfullex and others added 7 commits May 10, 2026 13:27
All service methods accepting a Drizzle transaction now follow:
- tx is the first parameter
- method name ends with Tx

Renamed:
- pinService.purgeForEntity / purgeForEntities -> *Tx
- tagService.purgeForEntity / purgeForEntities -> *Tx
- TagService#assertTagsExist (private) -> assertTagsExistTx
- PromptService#assertPromptsExist (private) -> assertPromptsExistTx
- AssistantService#syncRelations (private) -> syncRelationsTx
- AgentService#syncSettingsToSessions (private) -> syncSettingsToSessionsTx

The convention is documented in docs/references/data/data-api-in-main.md
under the new "Transaction Method Naming" section. Behavior is unchanged.
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
#14940)

Co-authored-by: SuYao <sy20010504@gmail.com>
Co-authored-by: fullex <106392080+0xfullex@users.noreply.github.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
Signed-off-by: eeee0717 <chentao020717Work@outlook.com>
@eeee0717 eeee0717 marked this pull request as ready for review May 10, 2026 06:13
@eeee0717 eeee0717 requested a review from a team May 10, 2026 06:13
@eeee0717 eeee0717 requested review from 0xfullex and DeJeune as code owners May 10, 2026 06:13
@eeee0717 eeee0717 closed this May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants