fix(plugin-history-sync): revert activity params string coercion (#705)#717
Conversation
🦋 Changeset detectedLatest commit: 558e028 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
📝 WalkthroughWalkthroughThis PR removes internal param-string coercion and context field propagation from the Stackflow core and history sync plugin. ChangesParameter Coercion and Context Preservation Rollback
🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
@stackflow/core
@stackflow/link
@stackflow/plugin-basic-ui
@stackflow/plugin-blocker
@stackflow/plugin-devtools
@stackflow/plugin-google-analytics-4
@stackflow/plugin-history-sync
@stackflow/plugin-lifecycle
@stackflow/plugin-renderer-basic
@stackflow/plugin-renderer-web
@stackflow/plugin-sentry
@stackflow/plugin-stack-depth-change
@stackflow/react-ui-core
@stackflow/react
commit: |
Deploying stackflow-demo with
|
| Latest commit: |
558e028
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ce34abf5.stackflow-demo.pages.dev |
| Branch Preview URL: | https://feature-fep-2381.stackflow-demo.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
stackflow-docs | 558e028 | Commit Preview URL | Jun 08 2026, 12:44 PM |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@core/src/Stack.ts`:
- Line 1: The file imports the type BaseDomainEvent but never uses it; remove
the unused type-only import to clean up the module by deleting BaseDomainEvent
from the import statement in core/src/Stack.ts (i.e., remove the reference to
BaseDomainEvent so the import becomes unused-free).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: edeebcb7-8fef-4527-b849-e661d876801d
📒 Files selected for processing (17)
.changeset/remove-core-step-context-fields.md.changeset/withdraw-history-sync-param-coercion.mdcore/src/Stack.tscore/src/activity-utils/makeActivityReducer.tscore/src/aggregate.tscore/src/event-types/StepPushedEvent.tscore/src/event-types/StepReplacedEvent.tsdocs/pages/docs/advanced/history-sync.en.mdxdocs/pages/docs/advanced/history-sync.ko.mdxextensions/plugin-history-sync/INTENT.mdextensions/plugin-history-sync/src/coerceParamsToString.spec.tsextensions/plugin-history-sync/src/coerceParamsToString.tsextensions/plugin-history-sync/src/historySyncPlugin.react.spec.tsxextensions/plugin-history-sync/src/historySyncPlugin.spec.tsextensions/plugin-history-sync/src/historySyncPlugin.tsxextensions/plugin-history-sync/src/makeTemplate.spec.tsextensions/plugin-history-sync/src/makeTemplate.ts
💤 Files with no reviewable changes (9)
- extensions/plugin-history-sync/src/coerceParamsToString.spec.ts
- extensions/plugin-history-sync/src/coerceParamsToString.ts
- extensions/plugin-history-sync/INTENT.md
- core/src/event-types/StepPushedEvent.ts
- core/src/aggregate.ts
- docs/pages/docs/advanced/history-sync.ko.mdx
- extensions/plugin-history-sync/src/makeTemplate.spec.ts
- core/src/event-types/StepReplacedEvent.ts
- docs/pages/docs/advanced/history-sync.en.mdx
| @@ -1,3 +1,4 @@ | |||
| import type { BaseDomainEvent } from "event-types/_base"; | |||
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if BaseDomainEvent is referenced in Stack.ts beyond the import line
# Search for BaseDomainEvent usage in Stack.ts, excluding the import line itself
rg -n 'BaseDomainEvent' core/src/Stack.ts | rg -v '^1:import'Repository: daangn/stackflow
Length of output: 42
Remove the unused BaseDomainEvent type-only import from core/src/Stack.ts
BaseDomainEvent is only present in the import statement and has no other references in core/src/Stack.ts, so the import can be removed.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@core/src/Stack.ts` at line 1, The file imports the type BaseDomainEvent but
never uses it; remove the unused type-only import to clean up the module by
deleting BaseDomainEvent from the import statement in core/src/Stack.ts (i.e.,
remove the reference to BaseDomainEvent so the import becomes unused-free).
|
PR #705가 해결하고자 하는 이슈의 핵심은 타입과 동작을 일치시키는 데에 있다고 생각해요. 둘이 상이하면 타입 검사를 신뢰할 수 없게 되고, 디버깅이 복잡해지며, 무엇보다도 복잡한 구현 맥락을 지속적으로 신경쓰며 작업해야 해서 크게 불편해요. 이 관점에서 볼 때, 해당 PR에는 다음과 같은 문제가 있어요.
그런 고로, revert합니다. |
Summary
Reverts #705 which forced activity/step params to
string | undefinedat the@stackflow/plugin-history-syncboundary to unify runtime types across navigation paths.While adopting it in a downstream monorepo (FEP-2363) we found it breaks substantial user code, and on re-review concluded its direction partly conflicts with user needs. Per team agreement (Edward + Anakin), we fully revert and re-release as a patch (no unpublish). FEP-1061's original goal will be retried later with a different approach.
What this reverts
@stackflow/plugin-history-sync— removes the param string-coercion (coerceParamsToString/fillWithoutEncode) and thecontext.pathURL-preservation logic;decodereturns to pre-fix(plugin-history-sync): unify useActivityParams runtime type across navigation paths #705 passthrough.@stackflow/core— removes the internal-only additive fields fix(plugin-history-sync): unify useActivityParams runtime type across navigation paths #705 introduced (StepPushedEvent.stepContext,StepReplacedEvent.stepContext,ActivityStep.context).coerceParamsToString.spec.tsand thedefaultHistory setup through React renderingblock.Versioning (patch, no unpublish)
@stackflow/plugin-history-sync1.11.1→1.11.2@stackflow/core2.0.0→2.0.1🤖 Generated with Claude Code