fix: reliability batch 2A — one unified post-transcription pipeline for classic and adaptive modes - #82
Merged
Merged
Conversation
3 tasks
Batch 1 changed set_active_model to return ModelSwitchOutcome { reason }.
The Playwright mock still returned the pre-batch unit (null) shape, so
modelStore.selectModel's result.data.reason access threw during first-run
onboarding, stalling the model->shortcut step. Update the mock to the real
shape and null-guard the frontend read defensively.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before Submitting This PR
Human Written Description
This unifies the two post-transcription paths that had silently diverged. The bug that motivated it: turning on adaptive profiles quietly disabled the LLM post-processing you had explicitly configured, and the "smart" profile prompts the adaptive system built were never actually sent to any model. Both modes now run one explicit pipeline, so what the settings promise is what actually executes.
What's in the batch
src-tauri/src/pipeline.rs): OpenCC zh-variant conversion → profile deterministic cleanup (adaptive only) → smart formatting → optional single LLM stage → validation. Structured result separates raw input, deterministic output, LLM output, and final text, withzh_conversion_applied/llm_invoked/fallback_reason.adaptive_default_profile_idinstead of hardcodeddefault_cleanfor unknown/casual targets.preserve_numbersandpreserve_raw_languagenow validate LLM output, falling back to the deterministic text with a recorded reason.Testing
tsc, ESLint, Prettier, translations, settings-lock coverage, cargo-deny: pass. No new dependencies.post_process_requested && adaptive_profile.is_none()) at the processor entry — test fails (invocation count 0 vs 1); removing the mutant restores green. Verified independently in two sessions.Needs installed-product verification (follow-up): real LLM provider round-trip in adaptive mode; zh conversion end-to-end through recording→history→insertion; retry semantics in the installed app.
AI Assistance
If AI was used:
🤖 Generated with Claude Code