feat: Sparkling Router foundation (stack protocol + CompositeHistory + codegen) - #21
Draft
Huxpro wants to merge 1 commit into
Draft
feat: Sparkling Router foundation (stack protocol + CompositeHistory + codegen)#21Huxpro wants to merge 1 commit into
Huxpro wants to merge 1 commit into
Conversation
… codegen URL-first dual-layer navigation scaffold from the Sparkling Router RFC: - sparkling-navigation: router.stack.* JS API + iOS StackRouterService stubs - sparkling-router: CompositeHistory, GlobalStackMirror, scheme/manifest helpers - sparkling-router-plugin: _container boundary scan → multi-entry + manifest - sparkling-sdk iOS: SPKContainerRegistry, SPKStackCoordinator, present fallback - examples/router-demo: S0 soft-nav demo + container-boundary authoring sample S3′ decision: keep _container*.tsx markers; TanStack ignores via routeFileIgnorePattern. Android stack host interface stubbed for P3. Co-authored-by: Xuan Huang (黄玄) <Huxpro@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implements the Sparkling Router RFC foundation from scratch: URL-first dual-layer navigation (soft in-container TanStack + hard cross-container stack protocol), with codegen for
_containerboundaries and an S0 soft-nav demo.Related issues
Standalone RFC foundation (Draft / seeking review). No prior branch work reused.
Changes
sparkling-navigation:router.stack.*JS API (push/pop/popTo/replace/reset/getState/prefetch/syncOwnLocation+sparklingStackChanged); iOSStackRouterService+ PipeMethod stubs; AndroidIHostStackRouterDependopt-in interfacesparkling-router(new):CompositeHistory,GlobalStackMirror, scheme↔manifest translation, in-memory stack for tests/demos,createSparklingHistorysparkling-router-plugin(new): scans_container(.modal).tsx→route-manifest.gen.json+ per-container entries (S3′ decision: keep_container*spelling; TanStack ignores viarouteFileIgnorePattern)sparkling-sdkiOS:SPKContainerRegistry,SPKStackCoordinator, present fallback when noUINavigationController, gesture/back → stack-changed broadcastexamples/router-demo: S0 soft-nav (TanStack + CompositeHistory + ReactLynxuseshim) building cleanlyHow to test
Verification (2026-07-26)
Local re-run after CI green:
sparkling-navigationjestsparkling-routerjestsparkling-router-pluginjestrouter-demorspeedy build (lynx + web)main.web.bundle344 kB)Checklist
CONTRIBUTING.md.Follow-ups
@lynx-js/web-core/<lynx-view>) — what works / what doesn'tStackRouterServicehost impl (S4), Android conformance (P3),awaitResult/ loader (P1), multi-entry hard-nav e2e (P4)