Skip to content

Renamed LeadingCapture to ScheduledCapture and related#1363

Merged
matux merged 1 commit into
masterfrom
matux/separate-leading-capture-concerns
Oct 10, 2025
Merged

Renamed LeadingCapture to ScheduledCapture and related#1363
matux merged 1 commit into
masterfrom
matux/separate-leading-capture-concerns

Conversation

@matux

@matux matux commented Oct 10, 2025

Copy link
Copy Markdown
Contributor

Description of the change

The class is a generic utility for coordinating delayed, cursor-based captures. It has no knowledge of "leading" vs "trailing" replays or trigger types. The new name better reflects what it actually does: schedule replay captures with timer coordination.

Changes

  • Renamed leadingCapture.js -> scheduledCapture.js
  • Renamed class LeadingCaptureScheduledCapture
  • Updated class documentation to emphasize generic utility nature
  • Renamed _leadingCapture -> _scheduledCapture in ReplayManager
  • Updated all test references
  • Removed redundant "leading" prefixes from internal properties

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

@matux matux requested a review from Copilot October 10, 2025 11:52
@matux matux self-assigned this Oct 10, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR renames LeadingCapture to ScheduledCapture to better reflect its generic utility nature for coordinating delayed, cursor-based captures rather than being specific to "leading" replay scenarios. The refactoring improves code clarity by emphasizing what the class actually does: schedule replay captures with timer coordination.

  • Renamed class and file from LeadingCapture/leadingCapture.js to ScheduledCapture/scheduledCapture.js
  • Updated all references and variable names throughout the codebase
  • Enhanced class documentation to reflect its generic utility purpose

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/replay/unit/scheduledCapture.test.js Updated all test references from LeadingCapture to ScheduledCapture and related variable names
test/replay/integration/replayManager.bufferIndex.test.js Updated test references from _leadingCapture to _scheduledCapture
test/replay/integration/replayManager.bufferIndex.checkoutResilience.test.js Updated test references from _leadingCapture to _scheduledCapture
src/browser/replay/scheduledCapture.js Renamed class and updated documentation to emphasize generic utility nature
src/browser/replay/replayManager.js Updated import and all internal references from leading-specific to scheduled-specific naming
Comments suppressed due to low confidence (1)

src/browser/replay/replayManager.js:1

  • Error message still references 'leading replay' but should be updated to 'scheduled replay' to match the renamed class.
import * as _ from '../../utility.js';

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Base automatically changed from matux/unit-tests-lead to master October 10, 2025 13:11
@matux matux force-pushed the matux/separate-leading-capture-concerns branch from 559b5ee to 95e69b0 Compare October 10, 2025 13:12
@matux matux force-pushed the matux/separate-leading-capture-concerns branch from 95e69b0 to 4e485c0 Compare October 10, 2025 13:12
@matux matux merged commit 91c75eb into master Oct 10, 2025
6 checks passed
@matux matux deleted the matux/separate-leading-capture-concerns branch October 10, 2025 13:19
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.

3 participants