Skip to content

Conversation

@ra1028
Copy link
Owner

@ra1028 ra1028 commented Oct 3, 2025

Pull Request Type

  • Bug fix
  • New feature
  • Refactoring
  • Documentation update
  • Chore

Copilot AI review requested due to automatic review settings October 3, 2025 08:15
Copy link

Copilot AI left a comment

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 introduces a new "previous" modifier for atoms that provides access to the previous value of an atom rather than the current value. The modifier returns an optional type since there may not be a previous value initially.

Key changes:

  • Implements PreviousModifier that tracks and returns the previous value of any atom
  • Adds comprehensive test coverage for the modifier functionality
  • Updates documentation to include the new modifier

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
Sources/Atoms/Modifier/PreviousModifier.swift Core implementation of the previous value modifier with storage management
Tests/AtomsTests/Modifier/PreviousModifierTests.swift Complete test suite covering basic functionality, multiple watchers, and downstream updates
Sources/Atoms/Atoms.docc/Atoms.md Documentation index updates to include the new modifier
README.md User-facing documentation with usage examples

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

@ra1028 ra1028 merged commit b85fd84 into main Oct 3, 2025
6 checks passed
@ra1028 ra1028 deleted the previous-modifier branch October 3, 2025 08:22
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