Skip to content

build: use a consistent CAF import - #27

Merged
chrisae9 merged 3 commits into
devfrom
codex/caf-import-cleanup
Aug 8, 2026
Merged

build: use a consistent CAF import#27
chrisae9 merged 3 commits into
devfrom
codex/caf-import-cleanup

Conversation

@chrisae9

@chrisae9 chrisae9 commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace an ineffective dynamic CAF import with the static form already used elsewhere
  • remove Vite's mixed static/dynamic import warning
  • avoid adding manual chunking that provided negligible savings and an extra request

Verification

  • npm ci
  • npm run lint
  • npm test (162 Node tests and 242 Vitest tests)
  • npm audit (0 vulnerabilities)
  • git diff --check
  • production build no longer emits the CAF import warning

Draft while Mac mini validation and CodeRabbit review run.

Summary by CodeRabbit

  • Bug Fixes
    • Improved skip-ahead responsiveness by ensuring required functionality is available immediately when playback controls are used.
    • Improved skip-ahead playback behavior so the configured delay, advanced position, and pause/resume actions are handled consistently.
    • Verified that skip-ahead correctly responds to playback cancellation while maintaining expected timing and playback controls.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@chrisae9, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e50bb974-a8db-4e77-9f93-4ddb78277e8f

📥 Commits

Reviewing files that changed from the base of the PR and between f592a8c and b641c3b.

📒 Files selected for processing (1)
  • src/__tests__/plexclients-sync-strategy.test.js
📝 Walkthrough

Walkthrough

The Plex clients actions module now imports CAF statically. SKIP_AHEAD uses this import and retains delayed execution. Tests verify the delay, offset update, cancellation signal, and playback dispatches.

Changes

Plex clients actions

Layer / File(s) Summary
Static CAF usage and validation
src/store/modules/plexclients/actions.js, src/__tests__/plexclients-sync-strategy.test.js
The module imports CAF at load time. SKIP_AHEAD no longer performs a runtime import. Tests verify delayed execution, offset changes, cancellation-signal propagation, and pause/play dispatches.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: standardizing CAF imports across the project.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/caf-import-cleanup

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

@chrisae9
chrisae9 force-pushed the codex/caf-import-cleanup branch from f592a8c to 90f4869 Compare August 8, 2026 06:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/__tests__/plexclients-sync-strategy.test.js`:
- Around line 130-138: Update the skip-ahead test around skipAhead and timer
advancement to verify the boundary: advance timers by 999 ms and assert
PRESS_PLAY has not been dispatched, then advance one additional millisecond and
await completion. Assert the dispatch calls exactly equal
FETCH_TIMELINE_POLL_DATA_CACHE, SEEK_TO, PRESS_PAUSE, and PRESS_PLAY in that
order, preserving the existing SEEK_TO payload and cancel signal.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0f83a0a5-c165-4ae3-9824-b94d1ec479d3

📥 Commits

Reviewing files that changed from the base of the PR and between b8510ac and f592a8c.

📒 Files selected for processing (1)
  • src/__tests__/plexclients-sync-strategy.test.js

Comment thread src/__tests__/plexclients-sync-strategy.test.js Outdated
@chrisae9
chrisae9 marked this pull request as ready for review August 8, 2026 06:56
@chrisae9
chrisae9 merged commit 19f5b63 into dev Aug 8, 2026
9 checks passed
@chrisae9
chrisae9 deleted the codex/caf-import-cleanup branch August 8, 2026 06:56
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