Skip to content

chore: remove + skip button in the chat panel (#182) - #187

Merged
EtienneLescot merged 5 commits into
release/v1.8.0from
feat/auto-20260728-309212e1
Jul 28, 2026
Merged

chore: remove + skip button in the chat panel (#182)#187
EtienneLescot merged 5 commits into
release/v1.8.0from
feat/auto-20260728-309212e1

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Removes the chat-panel + skip button and the now-dead code it left behind. The button was the only renderer-side caller of nativeBridgeClient.aiEdition.runTimelineOperation; deleting it also lets us drop the entire IPC chain (renderer method, IPC handler, bridge wiring, dispatch case, type variant) and the backend runTimelineOperation in chat-service.ts:454 stays as a clean main-process API for any future caller. Finally, the trim queue that lived inline in NewEditorShell.tsx (a serialised saveQueueRef with a doc read inside the chain to dodge a race) is now useSequentialTimelineOps, a generic hook any future renderer timeline op can reuse.

3 commits, 23 files, +304/-333.

Related issue

Fixes #182

Type of change

  • Refactor / maintenance

Release impact

  • No release note needed

Desktop impact

  • Not platform-specific

Screenshots / video

N/A — the only visible change is the removal of a button that was never reachable from a usable UX (it asked the user to type startSec-endSec by hand, while the actual flow is the transcript pane's click-word + Backspace).

Testing

  • npx tsc --noEmit — clean
  • npm run i18n:check — PASSED (12 locales, 7 namespaces)
  • npm run test — 1147/1148. The one failure is a pre-existing Windows temp-dir race in document-service.test.ts > concurrent saves (ENOTEMPTY on C:\Users\camil\AppData\Local\Temp\openscreen-ai-edition-*); git diff shows zero changes to that file or its subject, and it passes 23/23 in isolation.
  • New: 4-test suite at src/lib/ai-edition/store/useSequentialTimelineOps.test.ts covering the queue race fix, error swallow, store-empty fallback, and saved-doc return value.

Commits

  1. chore: remove + skip button in the chat panel (the actual chore: remove + skip button in the chat panel #182 fix)
  2. chore: drop the now-unused aiEdition.runTimelineOperation IPC plumbing (follow-up cleanup — the IPC had no other callers)
  3. refactor: extract useSequentialTimelineOps hook from NewEditorShell (the inline saveQueueRef pattern was untested; the hook is generic over AxcutTimelineOperation so a future timeline op can reuse it)

Drops the chat-panel '+ skip' control, its six i18n keys across all 13 locales, and the runAddTrim handler / useOptimisticTimelineOps hook that existed only for it (the hook had no other callers and is removed with the file).

Refs #182.
After removing the chat-panel '+ skip' button (the only renderer-side caller of nativeBridgeClient.aiEdition.runTimelineOperation), the entire IPC chain is dead: the renderer method, the action variant in the IPC request union, the AiEditionService method, the bridge wiring, the IPC handler, and the 'timeline.run' case in the dispatcher.

The backend runTimelineOperation in chat-service.ts is kept (it is a clean main-process API for any future caller). The chat-service.test.ts suite that exercises it is also kept.

Refs #182.
The chat-panel '+ skip' removal (7e2bcaf) left the transcript-pane trim handlers (handleAddTrimRange / handleRemoveTrimRange) as the last user of the saveQueueRef pattern — and they were untested. The pattern is non-trivial: a serialised save queue where the doc read happens INSIDE the chain (after awaiting the previous save), otherwise two rapid Backspaces would race and clobber each other's edit.

Extracts the pattern into src/lib/ai-edition/store/useSequentialTimelineOps.ts with the same three properties the inline version depended on:

  1. Two concurrent apply() calls are serialised — op N+1 reads the doc op N committed, not the pre-op-N doc (race fix preserved).

  2. A save rejection doesn't poison the queue; the next call still has a resolved promise to chain off (error swallow preserved). The original promise returned to the caller keeps its rejection.

  3. The store-empty fallback (no project loaded) returns null instead of crashing.

The hook is generic over the operation type (add_trim_range, remove_trim_range, future timeline ops), not hard-coded to trim ranges — the transcript-pane handlers are now a one-line apply() call each, and any future renderer op (e.g. a timeline ruler drag-to-trim) can use the same hook instead of reinventing the queue.

External signatures of handleAddTrimRange / handleRemoveTrimRange are unchanged (RightPanes doesn't await the return value).

Includes a 4-test suite covering all three properties. NewEditorShell.tsx: -53 / +18 lines.
@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: 439141d5-4ddf-4714-befa-89b25346b1ba

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 feat/auto-20260728-309212e1

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.

EtienneLescot and others added 2 commits July 28, 2026 12:58
…satisfy biome

- Add cameraTrack: null to the asset fixture (the asset schema
  requires it after the v3 -> v4 migrate moved cameraTrack onto
  each asset). This was a new error on PR #187 that pushed the
  test-typecheck baseline from 80 to 81.
- Run biome check --write on the three files the lint job
  flagged (LeftPanel.tsx, NewEditorShell.tsx,
  useSequentialTimelineOps.test.ts) for the unsorted-imports
  and formatter errors. tsc, biome, vitest (1147/1148 — the
  one fail is the pre-existing Windows temp-dir race in
  document-service.test.ts, passes 23/23 in isolation), i18n
  and docs checks all stay clean.
@EtienneLescot
EtienneLescot merged commit bdaad80 into release/v1.8.0 Jul 28, 2026
9 checks passed
@EtienneLescot
EtienneLescot deleted the feat/auto-20260728-309212e1 branch July 28, 2026 12:09
EtienneLescot added a commit that referenced this pull request Jul 29, 2026
…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.
EtienneLescot added a commit that referenced this pull request Jul 31, 2026
…satisfy biome

- Add cameraTrack: null to the asset fixture (the asset schema
  requires it after the v3 -> v4 migrate moved cameraTrack onto
  each asset). This was a new error on PR #187 that pushed the
  test-typecheck baseline from 80 to 81.
- Run biome check --write on the three files the lint job
  flagged (LeftPanel.tsx, NewEditorShell.tsx,
  useSequentialTimelineOps.test.ts) for the unsorted-imports
  and formatter errors. tsc, biome, vitest (1147/1148 — the
  one fail is the pre-existing Windows temp-dir race in
  document-service.test.ts, passes 23/23 in isolation), i18n
  and docs checks all stay clean.
EtienneLescot added a commit that referenced this pull request Jul 31, 2026
…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.
EtienneLescot added a commit that referenced this pull request Aug 1, 2026
…satisfy biome

- Add cameraTrack: null to the asset fixture (the asset schema
  requires it after the v3 -> v4 migrate moved cameraTrack onto
  each asset). This was a new error on PR #187 that pushed the
  test-typecheck baseline from 80 to 81.
- Run biome check --write on the three files the lint job
  flagged (LeftPanel.tsx, NewEditorShell.tsx,
  useSequentialTimelineOps.test.ts) for the unsorted-imports
  and formatter errors. tsc, biome, vitest (1147/1148 — the
  one fail is the pre-existing Windows temp-dir race in
  document-service.test.ts, passes 23/23 in isolation), i18n
  and docs checks all stay clean.
EtienneLescot added a commit that referenced this pull request Aug 1, 2026
…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.
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.

1 participant