test: TanStack Router upstream compat on Lynx for Web (PR2) - #23
Draft
Huxpro wants to merge 1 commit into
Draft
Conversation
Add examples/tanstack-lynx-web-compat that ports a high-signal subset of TanStack Router upstream cases and runs them against experimental Lynx for Web (@lynx-js/web-core <lynx-view>). Findings frozen in RESULTS.md — critical: without aliasing use-sync-external-store to @lynx-js/use-sync-external-store, navigate() updates router.state but the UI never re-renders. Also backport that alias (+ react-dom flushSync shim) to router-demo. Co-authored-by: Xuan Huang (黄玄) <Huxpro@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
PR2 verification of the Sparkling Router soft-nav stack: run a sufficiently large TanStack Router upstream-derived suite against experimental Lynx for Web.
Lynx Web on main? Gallery path yes (
@lynx-js/web-core/@lynx-js/go-webon the website). Fullsparkling-web-shellMPA host is not on main — it lives on PR #3 /stack/3-sparkling-web-shell. This suite uses a minimal<lynx-view>harness instead.Stacked on PR1: #21 (
cursor/sparkling-router-foundation-ea10).Scoreboard
What works
@tanstack/historymemory APIrouter.navigatepath / params / search / replace / relative..redirect(),notFound()CompositeHistorysoft + hard boundary + soft-back→hard-popRouterProvideruse-sync-external-store→@lynx-js/use-sync-external-storebindtap(after that alias)globalProps.queryItemsinto lynx-viewWhat does not work / gaps
button,getByRole,createBrowserHistory)router.statebut UI never re-renderscreateBrowserHistory<Link>/<a>/ IO preloaduseNavigate+bindtapwindowcreateRoutertoucheswindow.origineven with memory historyDetails:
examples/tanstack-lynx-web-compat/RESULTS.mdChanges
examples/tanstack-lynx-web-compat(unit ports + Playwright harness)examples/router-demo(use-sync-external-store,react-domflushSync shim)How to test
Checklist
CONTRIBUTING.md.