Skip to content

feat(plugin-stack-persistence): pass Stack to createMetadata - #731

Merged
ENvironmentSet merged 2 commits into
mainfrom
feature/fep-2609
Jul 21, 2026
Merged

feat(plugin-stack-persistence): pass Stack to createMetadata#731
ENvironmentSet merged 2 commits into
mainfrom
feature/fep-2609

Conversation

@ENvironmentSet

@ENvironmentSet ENvironmentSet commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • pass the current Stack to StackSnapshotStrategy.createMetadata
  • keep the Stack and StackSnapshot paired at the same persistence save point

Linear: FEP-2609

@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 015eb80

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stackflow/plugin-stack-persistence Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5c316962-53cd-4b76-96e8-3783d34d35db

📥 Commits

Reviewing files that changed from the base of the PR and between ddf3982 and 015eb80.

📒 Files selected for processing (1)
  • .changeset/fep-2609-create-metadata-stack.md

Disabled knowledge base sources:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Persistence metadata generation now uses both the current navigation stack and the captured snapshot, producing more accurate, context-aware metadata for saved state.
  • Compatibility
    • Custom persistence strategies may need to update their metadata creation logic to accept the additional stack input.
  • Bug Fixes
    • Snapshot saving and loading behavior remains the same, with metadata now derived from the same stack state used when the snapshot was captured.

Walkthrough

The stack persistence strategy now accepts the active stack alongside its snapshot when creating metadata, and the persistence plugin passes both values during idle saves. A minor release changeset documents the updated contract.

Changes

Stack persistence metadata

Layer / File(s) Summary
Expand metadata creation input
extensions/plugin-stack-persistence/src/StackSnapshotStrategy.ts, extensions/plugin-stack-persistence/src/stackPersistencePlugin.ts, .changeset/fep-2609-create-metadata-stack.md
createMetadata now requires stack and snapshot, saveIfIdle passes both values, and the package receives a minor version changeset.

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

Possibly related PRs

  • daangn/stackflow#723: Introduces related snapshot API and initialization-context changes.
  • daangn/stackflow#727: Adds the preceding stack-persistence strategy and plugin implementation using the prior metadata input contract.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: passing Stack into createMetadata.
Description check ✅ Passed The description matches the implemented change by describing the new Stack argument and paired persistence save point.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/fep-2609

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.

@ENvironmentSet
ENvironmentSet marked this pull request as ready for review July 21, 2026 11:50
@ENvironmentSet
ENvironmentSet enabled auto-merge (squash) July 21, 2026 11:50
@pkg-pr-new

pkg-pr-new Bot commented Jul 21, 2026

Copy link
Copy Markdown
  • @stackflow/demo

    yarn add https://pkg.pr.new/daangn/stackflow/@stackflow/plugin-stack-persistence@731.tgz
    

commit: ddf3982

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploying stackflow-demo with  Cloudflare Pages  Cloudflare Pages

Latest commit: 015eb80
Status:⚡️  Build in progress...

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
stackflow-docs 015eb80 Commit Preview URL Jul 21 2026, 11:59 AM

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FFhwNMAYBFo7v4aQR1vqvk
@ENvironmentSet
ENvironmentSet merged commit f52b5f4 into main Jul 21, 2026
5 of 8 checks passed
@ENvironmentSet
ENvironmentSet deleted the feature/fep-2609 branch July 21, 2026 11: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