Skip to content

feat(plugin-history-sync): expose URL resolver (FEP-2602) - #743

Merged
ENvironmentSet merged 8 commits into
mainfrom
feature/fep-2602
Aug 4, 2026
Merged

feat(plugin-history-sync): expose URL resolver (FEP-2602)#743
ENvironmentSet merged 8 commits into
mainfrom
feature/fep-2602

Conversation

@ENvironmentSet

@ENvironmentSet ENvironmentSet commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator
  • expose the plugin-history-sync URL resolver from the plugin instance.
  • reuse the same resolver for Activity URL generation and boot-time entry URL resolution inside the plugin.

@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f017157

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-history-sync 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

@pkg-pr-new

pkg-pr-new Bot commented Jul 31, 2026

Copy link
Copy Markdown
  • @stackflow/demo

    yarn add https://pkg.pr.new/@stackflow/plugin-history-sync@743.tgz
    

commit: 4005478

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 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 18914c4 Commit Preview URL Aug 04 2026, 12:31 PM

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying stackflow-demo with  Cloudflare Pages  Cloudflare Pages

Latest commit: f017157
Status:⚡️  Build in progress...

View logs

@coderabbitai

coderabbitai Bot commented Jul 31, 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 Plus

Run ID: b3692433-f6d9-4ca6-9313-e607939972b2

📥 Commits

Reviewing files that changed from the base of the PR and between 2833bfd and f017157.

📒 Files selected for processing (5)
  • .changeset/fep-2602-history-sync-url-resolver.md
  • extensions/plugin-history-sync/src/HistorySyncUrlResolver.spec.ts
  • extensions/plugin-history-sync/src/HistorySyncUrlResolver.ts
  • extensions/plugin-history-sync/src/historySyncPlugin.tsx
  • extensions/plugin-history-sync/src/index.ts

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

    • Exposed URL resolution capabilities for history synchronization.
    • Added support for generating activity URLs and resolving entry URLs across browser, hash-based, and server-rendered environments.
    • The history-sync plugin now provides access to its URL resolver for related integrations.
  • Bug Fixes

    • Improved URL handling for route parameters, initial browser locations, and server request paths.
    • Added clearer handling for unrecognized activities during URL generation.

Walkthrough

This PR adds HistorySyncUrlResolver to @stackflow/plugin-history-sync. The resolver generates activity URLs and resolves entry URLs from SSR paths, hash fragments, or captured browser location. historySyncPlugin uses the resolver and exposes it through the returned plugin. The package exports the resolver type and includes a minor release changeset.

Changes

History Sync URL Resolver

Layer / File(s) Summary
Resolver interface and factory implementation
extensions/plugin-history-sync/src/HistorySyncUrlResolver.ts
Adds the resolver interface and factory. The factory generates activity URLs and resolves entry URLs from SSR request paths, hash fragments, or captured pathname and query.
Resolver test coverage
extensions/plugin-history-sync/src/HistorySyncUrlResolver.spec.ts
Tests activity URL generation, captured entry URLs, hash-mode resolution, and SSR request-path precedence.
Plugin integration
extensions/plugin-history-sync/src/historySyncPlugin.tsx
Creates the resolver and uses it for initial path resolution, controller URL generation, and push/replace path normalization. The returned plugin exposes urlResolver.
Public export and changeset
extensions/plugin-history-sync/src/index.ts, .changeset/fep-2602-history-sync-url-resolver.md
Exports HistorySyncUrlResolver and adds a minor release changeset.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant historySyncPlugin
  participant HistorySyncUrlResolver
  participant HistorySyncController

  historySyncPlugin->>HistorySyncUrlResolver: create resolver from routes and location
  historySyncPlugin->>HistorySyncUrlResolver: resolveEntryUrl(initialContext)
  HistorySyncUrlResolver-->>historySyncPlugin: entry URL
  historySyncPlugin->>HistorySyncController: provide makeActivityUrl
  HistorySyncController-->>historySyncPlugin: activity path for push or replace
Loading

Possibly related PRs

✨ 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 feature/fep-2602

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 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

이번 라운드는 문제 정의 / 해결 방향 / 공개 인터페이스 및 규약을 봤습니다.

문제 정의(“URL 해석 규칙의 사본이 실제 동작과 어긋난다”)와 해결 방향(규칙을 추출하지 않고, 플러그인이 실제로 쓰는 인스턴스를 그대로 노출해 내부 호출부 4곳을 전부 그것으로 교체)에는 동의합니다.

공개 인터페이스에서 한 가지 요청 사항을 인라인으로 남겼습니다. 반영 후 이 스레드에 답장 주세요.

Comment thread extensions/plugin-history-sync/src/historySyncPlugin.tsx Outdated
@ENvironmentSet
ENvironmentSet marked this pull request as ready for review August 4, 2026 13:02
@ENvironmentSet
ENvironmentSet enabled auto-merge (squash) August 4, 2026 13:02
@ENvironmentSet
ENvironmentSet merged commit eb798ca into main Aug 4, 2026
5 of 8 checks passed
@ENvironmentSet
ENvironmentSet deleted the feature/fep-2602 branch August 4, 2026 13:03
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