Skip to content

feat: remove selected filler words by transcript ID - #857

Open
auberginewly wants to merge 1 commit into
getopenscreen:mainfrom
auberginewly:feat/agent-filler-word-id-trims
Open

auberginewly wants to merge 1 commit into
getopenscreen:mainfrom
auberginewly:feat/agent-filler-word-id-trims

Conversation

@auberginewly

@auberginewly auberginewly commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a chat Agent tool, removeFillerWords, that accepts transcript word IDs chosen from getTranscriptWords after reading the surrounding speech.
  • Resolve each ID to its recorded asset, validate its source timestamps, and require exactly one clip to contain the whole word before editing. Reject the entire request on a missing, invalid, duplicate, already-cut, or ambiguous target.
  • Create non-destructive, clip-anchored trims through the existing addTrim executor and return each word, asset, clip, trim ID, and the actual stored trim span. The Agent prompt restricts use to explicit filler-word cleanup requests.
  • Add tests for a repeated word whose second occurrence is meaningful, cross-asset resolution, invalid IDs/timestamps, ambiguous clips, and edit consent.

Related issue

Closes #853

Type of change

  • Feature

Release impact

  • Minor

Desktop impact

  • Not platform-specific

Screenshots / video

No UI changes.

Testing

  • fnm exec --using 22.22.1 npm run test — 263 files passed; 3342 tests passed, 2 skipped.
  • fnm exec --using 22.22.1 npx tsc --noEmit — passed.
  • fnm exec --using 22.22.1 npx tsc -p tsconfig.test.json --noEmit — passed.
  • fnm exec --using 22.22.1 npm run lint — exit 0; 24 existing warnings elsewhere in the repository.
  • git diff --check — passed.

Known limitations

  • This is a chat Agent action only. It does not add a one-click cleanup UI or voice enhancement.
  • Filler classification remains contextual Agent judgment. The tool refuses transcript words without trustworthy timing or a unique fully covering clip; it does not guess a range.
  • Open feat: a demo is never ugly (audit integration) #814 may shape addTrim cut boundaries. This tool reports the span actually stored after that edit path rather than assuming the word's original timestamps are the final cut.

Summary by CodeRabbit

  • New Features
    • Added a transcript editing option to remove selected filler words. The edit is applied only when each selected word can be matched safely to a clip; invalid or ambiguous selections are rejected without partial changes.
    • Removal is available when explicitly requested and respects edit-consent settings.
    • Results report the removed words and associated trims.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 98eb59b7-8c15-4057-a403-aeca7f97cad8

📥 Commits

Reviewing files that changed from the base of the PR and between 0c74907 and cd7e904.

📒 Files selected for processing (4)
  • electron/ai-edition/agent-tools.test.ts
  • electron/ai-edition/agent-tools.ts
  • electron/ai-edition/deep-agent/service.test.ts
  • electron/ai-edition/deep-agent/service.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The agent now has a mutating tool that removes selected transcript words by ID. The tool validates each target, creates clip-anchored trims, and returns the removed words and actual trim bounds.

Changes

Filler-word removal

Layer / File(s) Summary
Tool contract and agent exposure
electron/ai-edition/agent-tools.ts, electron/ai-edition/deep-agent/service.ts, electron/ai-edition/deep-agent/service.test.ts, electron/ai-edition/agent-tools.test.ts
Adds the removeFillerWords schema and tool registrations. The agent instructions limit use to explicit requests and direct the agent to select transcript word IDs.
Transcript word resolution and validation
electron/ai-edition/agent-tools.ts
Resolves requested IDs across current and legacy transcript storage. Validates word uniqueness, timestamps, asset type, clip coverage, and existing trims before applying edits.
Trim creation and result reporting
electron/ai-edition/agent-tools.ts, electron/ai-edition/agent-tools.test.ts
Creates trims through addTrim and returns the removed words with actual trim bounds. Tests cover successful removal and refusal cases, including unknown IDs, invalid timestamps, ambiguous clips, and edits-disabled behavior.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Agent
  participant removeFillerWords
  participant TranscriptStorage
  participant addTrim
  Agent->>removeFillerWords: Submit selected word IDs
  removeFillerWords->>TranscriptStorage: Resolve transcript words
  removeFillerWords->>addTrim: Add clip-anchored trim for each validated word
  addTrim-->>removeFillerWords: Return trim result
  removeFillerWords-->>Agent: Return removed words and trim bounds
Loading

Merge Risk: ⚪ Minimal · up to cd7e9

No actionable merge-blocking issue was established for the filler-word cleanup tool. It is ready for normal merge checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to cd7e9

The new action can change a project, but it uses the existing edit-permission check and validates its targets before making cuts. No new access to other projects or services was established. How concurrent changes and interrupted saves are handled remains uncertain.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated edit scope is the supplied project document: an allowed call can create cuts across its recorded assets where each selected word maps to one clip. No new cross-project or external-service write path was established.

Trust Boundaries and Controls

  • observed — Word IDs and model-selected arguments are checked against recorded assets, valid timestamps, unique clip containment, and existing cuts before editing. Explicit user intent and filler classification are not independently checked by this executor; the known production path instead supplies the existing project-edit setting.

Resilience and Maintainability Implications

  • observed — The agent wrapper advances its in-memory document only when an execution returns a document. Within the new action, unsuccessful steps do not return the locally accumulated edits.

Hardening Proposals

  • proposed — If explicit filler-cleanup intent must be a separate authorization condition, pass a caller-established permission to the executor rather than relying on model instructions. Define the save-boundary behavior for stale documents and interrupted or repeated requests.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: adding removal of selected filler words by transcript ID.
Description check ✅ Passed The description covers the feature, related issue, change type, release impact, desktop impact, testing, limitations, and the absence of UI changes. It matches the pull request objectives and provides…
Linked Issues check ✅ Passed The PR satisfies the coding requirements in issue #853. removeFillerWords accepts transcript word IDs, selects IDs from contextual transcript reads only after an explicit cleanup request, resolves e…
Out of Scope Changes check ✅ Passed The changes remain within issue #853. They add the chat tool, agent exposure and guidance, validation, edit-consent handling, tool registration, and automated tests. No unrelated one-click cleanup UI …
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

This branch has not been deployed

No deployments
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.

[Feature]: Agent-driven filler-word removal using transcript word IDs

1 participant