Repository navigation
feat(pages): expose current, active, and pending link status - #924
Open
karthickeyan-dev wants to merge 5 commits into
Open
karthickeyan-dev wants to merge 5 commits into
karthickeyan-dev wants to merge 5 commits into
Conversation
karthickeyan-dev
marked this pull request as ready for review
November 26, 2026 06:12
Brooooooklyn
self-requested a review
December 1, 2026 08:37
Solid and Svelte link status derivations returned a fresh object on every navigation or URL change, re-running effects and render-prop children even when current, active, and pending stayed the same. Compare Solid memos by value with a shared linkStatusEquals helper, and derive each Svelte field separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and React Vue's computed and React's useMemo returned a fresh LinkStatus object on every navigation, so watchers, Link renders, memoized children, and effect dependencies reran even when current, active, and pending stayed the same. Reuse the previous object for an equal status in both adapters, and cover unchanged-status notifications for Vue, React, and Svelte plus null-router cases for isLinkActive and isLinkPending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…changes Solid passes <Show>, <For> and lazy components to Link as zero-argument accessors. Link called every function child with the status inside the insert effect, so each current/active/pending change rebuilt that subtree. Only call a child that takes an argument, as <Show> does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Restore the active and pending rule comments on the matchers. - Rename resolvedLinkStatus to getResolvedLinkStatus and drop the duplicate pending check. - Re-export isLinkActive and isLinkPending from each adapter, and LinkProps from @void/react. - Show useLinkStatus in all four adapters, list it in the runtime API table, and note where to call the plain functions. - Type-check the Vue Link status slot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brooooooklyn
force-pushed
the
feat/pages-link-status
branch
from
December 1, 2026 09:00
223e4c3 to
35804b9
Compare
Member
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This branch has not been deployed
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.
Closes #803.
A sidebar button can now read the state of its destination, and a link can show a spinner while its own destination loads. All four Pages adapters expose
useLinkStatus(href, { method, data, activeMatch })and pass the same{ current, active, pending }to link children through a render prop, scoped slot, or snippet. For breadcrumbs and menus,isLinkActiveandisLinkPendingfromvoid/pages-clientcan run inside a loop.Design
Void already distinguishes the current page from an active parent section, and matches pending visits by method, path, full query, and hash. The hook, children, and automatic DOM attributes now use one implementation of those rules. Existing links can keep ordinary children and override the rendered attributes.
Verification
The shared matching tests cover query data, prefix boundaries, methods, hashes, and pending visits. Browser coverage across React, Vue, Svelte, and Solid holds a POST request open, checks that its link label and surrounding component update together, and verifies that both return to idle.