-
Notifications
You must be signed in to change notification settings - Fork 112
feat(core,plugin-history-sync): allow step actions for non-top activities #642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
orionmiz
wants to merge
11
commits into
main
Choose a base branch
from
claude/modify-step-action-scope-011CUNBq87uzYD4N35PjiTbi
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
980c183
feat: allow step actions to target lower activities with targetActivi…
claude 7696863
refactor: improve step action sync with history.back() for step pop
claude 42cde0f
fix: handle multiple step operations correctly
claude 398bcf8
Merge branch 'main' into claude/modify-step-action-scope-011CUNBq87uz…
orionmiz 8f5a022
test: fix aggregate tests by adding hasZIndex field
claude ae7c98d
chore: add changeset for lower activity step actions
claude 289cd62
fix: only sync lower activity steps, not active activity
claude a8167c8
test: add failing tests for lower activity step modifications
claude 57b087f
fix: only sync lower activity steps, not active activity
claude d951a66
fix: prevent lower activity step actions from affecting current history
claude 8807c12
WIP: attempt stepPush/stepReplace sync - has regression
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| "@stackflow/core": minor | ||
| "@stackflow/plugin-history-sync": minor | ||
| --- | ||
|
|
||
| Allow step actions to target lower activities with targetActivityId | ||
|
|
||
| **Core Changes:** | ||
| - Step actions (stepPush, stepPop, stepReplace) can now target any activity in the stack using `targetActivityId` option | ||
| - Previously only the top activity could be targeted | ||
| - Enables modifying lower activity steps when popping current activity | ||
|
|
||
| **History Sync Plugin Changes:** | ||
| - Added intelligent synchronization when navigating to lower activities with removed steps | ||
| - When navigating back to a step that was removed via `stepPop`, automatically skips the removed entry | ||
| - Uses `history.back()` to navigate to the correct remaining step | ||
|
|
||
| **Use Case:** | ||
| ```typescript | ||
| // Remove a step from a lower activity while at top activity | ||
| actions.stepPop({ targetActivityId: lowerActivityId }); | ||
|
|
||
| // When user navigates back, the removed step entry is automatically skipped | ||
| history.back(); // Skips removed step, lands on the correct step | ||
| ``` | ||
|
|
||
| This is backward compatible - existing code works without changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.