chore(cleanup): remove dead exports, scripts, and an always-true feature flag - #191
Merged
Merged
Conversation
…ure flag Findings from the v1.8.0 ponytail audit (see also PR #187): - Delete \src/utils/getTestId.ts\: the TestId type and getTestId() helper are not imported anywhere; tests use hardcoded data-testid strings. - Delete \src/components/video-editor/featureFlags.ts\: the single constant \AI_FEATURES_ENABLED = true\ is referenced only by a doc comment and by \LeftPanel.tsx\ as a runtime gate. Inline the gate in the two sites that used it and update the architecture docs to match. The new editor ships as the default from Phase 1 PR 1.3 onward; an always-true flag was carrying its own explanation as cargo. - Drop the \MIN_DELTA\ and \VIEWPORT_SCALE\ exports from \src/components/video-editor/videoPlayback/constants.ts\: only the source file references either. - Demote \RenderableChatMessage\, \estimateTokens\, and \DEFAULT_CHAT_BUDGET_TOKENS\ in \src/components/ai-edition/chatBudget.ts\ to file-private — no external importer. - Delete \scripts/bench-export.mjs\ (retired harness, runner already removed per rendering-performance.md:371), \scripts/stt-dev-server.mjs\, \scripts/e2e-pipeline-smoke.mjs\, \scripts/e2e-stt-smoke.mjs\. None are wired into \package.json\ scripts. - Tidy the now-stale comment in \electron-builder.json5\ that explained the \fmpeg.exe\ exclude via \�ench-export.mjs\. No behavior change: tsc clean, lint unchanged, 1144/1144 unit tests pass.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fetch-ffmpeg.mjs still justified keeping ffmpeg.exe 'so scripts/bench-export.mjs can use it' — the same stale reference this PR already fixed in electron-builder.json5. The real reason it stays is the licence check below it. rendering-performance.md still said bench-export.mjs 'survives', and ai-agent.md claimed the no-provider state renders no chat rail; the rail entry is now unconditional and opening it shows the welcome view.
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.
Summary
Findings from the v1.8.0 ponytail audit. Pure deletions + comment updates, no behavior change.
src/utils/getTestId.ts(the TestId type and helper are not imported anywhere; tests use hardcodeddata-testidstrings).src/components/video-editor/featureFlags.tsand inline the always-trueAI_FEATURES_ENABLEDgate at its two call sites inLeftPanel.tsx.MIN_DELTAandVIEWPORT_SCALEexports fromsrc/components/video-editor/videoPlayback/constants.ts(only used in their own file).RenderableChatMessage,estimateTokens, andDEFAULT_CHAT_BUDGET_TOKENSinsrc/components/ai-edition/chatBudget.tsto file-private — no external importer.scripts/bench-export.mjs(retired harness, runner already removed perrendering-performance.md:371),scripts/stt-dev-server.mjs,scripts/e2e-pipeline-smoke.mjs,scripts/e2e-stt-smoke.mjs. None are wired intopackage.jsonscripts.electron-builder.json5that explained theffmpeg.exeexclude viabench-export.mjs.technical-documentation/architecture/decisions.mdandai-agent.mdto describe the new "always mounted, no provider = no-op welcome" gate.Type of change
Release impact
Desktop impact
Testing
npx tsc --noEmitclean,npm run test1144/1144 pass,npm run lintno new warnings.