Skip to content

chore(cleanup): remove dead exports, scripts, and an always-true feature flag - #191

Merged
EtienneLescot merged 3 commits into
release/v1.8.0from
ponytail/cleanup-dead-code
Jul 29, 2026
Merged

chore(cleanup): remove dead exports, scripts, and an always-true feature flag#191
EtienneLescot merged 3 commits into
release/v1.8.0from
ponytail/cleanup-dead-code

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Findings from the v1.8.0 ponytail audit. Pure deletions + comment updates, no behavior change.

  • Delete src/utils/getTestId.ts (the TestId type and helper are not imported anywhere; tests use hardcoded data-testid strings).
  • Delete src/components/video-editor/featureFlags.ts and inline the always-true AI_FEATURES_ENABLED gate at its two call sites in LeftPanel.tsx.
  • Drop MIN_DELTA and VIEWPORT_SCALE exports from src/components/video-editor/videoPlayback/constants.ts (only used in their own file).
  • 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 ffmpeg.exe exclude via bench-export.mjs.
  • Update technical-documentation/architecture/decisions.md and ai-agent.md to describe the new "always mounted, no provider = no-op welcome" gate.

Type of change

  • Bug fix
  • Feature
  • Enhancement
  • Documentation
  • Refactor / maintenance
  • Performance
  • Security

Release impact

  • Patch
  • Minor
  • Major / breaking change
  • No release note needed

Desktop impact

  • Windows
  • macOS
  • Linux
  • Installer / packaging
  • Not platform-specific

Testing

npx tsc --noEmit clean, npm run test 1144/1144 pass, npm run lint no new warnings.

…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.
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 28bd5f8b-985b-4f16-9321-efc35cdeac93

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ponytail/cleanup-dead-code

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

sepion02 and others added 2 commits July 28, 2026 20:49
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.
@EtienneLescot
EtienneLescot merged commit 9bc0977 into release/v1.8.0 Jul 29, 2026
9 checks passed
@EtienneLescot
EtienneLescot deleted the ponytail/cleanup-dead-code branch July 29, 2026 06:49
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.

2 participants