Repository navigation
Conversation
Co-authored-by: codex <codex@openai.com>
Co-authored-by: codex <codex@openai.com>
Codex Review SummaryThis 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. |
|
Website preview: https://pr-128-eclipsa.xiarenda61.workers.dev Commit: eb2e6ec |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 79d3a5346d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
| } | ||
| return Object.values(payload.components ?? {}).some((component) => !!component.external) | ||
| return Object.values(payload.components ?? {}).some( | ||
| (component) => !!component.external || (component.mountCount ?? 0) > 0, |
There was a problem hiding this comment.
Activate components that declare mount callbacks
Triggering the full runtime when mountCount is nonzero does not actually run these callbacks. The startup path in resume-full.ts restores only external components and components eligible for restoreResumedLocalSignalEffects; therefore an SSR component with onMount() but no signals or external renderer remains inactive and its mount callback is never scheduled. Add a restoration pass for components with a positive mount count.
AGENTS.md reference: packages/eclipsa/core/AGENTS.md:L13-L17
Useful? React with 👍 / 👎.
| const clientRenderer = | ||
| !container.symbols.has(activateSymbol) && !container.imports.has(activateSymbol) | ||
| ? component.clientRenderer | ||
| : null | ||
| const module: RuntimeSymbolModule = clientRenderer | ||
| ? { default: (_scope, props) => clientRenderer(props) } |
There was a problem hiding this comment.
Allow client renderers through scheduled dirty flushes
This fallback is not reached for normal reactive updates: when a client-created library component without a symbol URL reads a signal, notifySignalWrite marks it dirty, but scheduleDirtyFlush refuses to run because canFlushDirtyComponents still requires every dirty component to have an import or symbol URL. The new test masks this by invoking flushDirtyComponents directly, while in the application the component remains dirty and its UI stays stale; the scheduling eligibility check must also accept clientRenderer.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🟡 Changes recommended
The new “client renderer fallback” for missing symbol URLs may still be blocked by dirty-flush gating that requires imports/symbols entries, potentially preventing reactive rerenders for client-created library components.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes several documentation-site navigation and runtime resume edge cases in Eclipsa, focusing on preserving native link behavior, correctly handling same-page fragment/query navigations, and ensuring resumable components can reactivate even when a compiler-generated symbol URL is unavailable (e.g., client-created library components like motion).
Changes:
- Add mount-callback serialization tracking (
mountCount) and amountCursorto drive “needs full resume” decisions and avoid missing-onMount behavior during startup resume. - Fix router navigation for same-path hash/search changes (handle fragments without route-data fetch; rerender when only
?searchchanges; reset scroll appropriately). - Improve initial-resume click handling to preserve native browser behavior for modified/middle/external/download/target/prevented/malformed links, and switch docs TOC fragment links to native hash anchors; add regression tests (unit + e2e).
File summaries
| File | Description |
|---|---|
| packages/eclipsa/core/runtime/types.ts | Adds mount/client-renderer tracking fields to runtime state and frame types for resume/reactivation support. |
| packages/eclipsa/core/runtime.ts | Implements mount tracking, client-renderer fallback activation for missing symbol URLs, and improved fragment/query navigation + scroll behavior. |
| packages/eclipsa/core/runtime.test.ts | Adds unit regressions for client-created component reactivation, fragment navigation without data fetch, and search-only rerendering. |
| packages/eclipsa/core/resume-loader.ts | Adjusts first-interaction promotion logic to preserve native click behaviors and uses mount serialization to decide full resume. |
| packages/eclipsa/core/resume-loader.test.ts | Adds tests for mount-serialized full-resume requirement and native click preservation cases. |
| e2e/test/example.dev.test.ts | Adds e2e regressions for scroll reset on Link nav and onMount behavior on direct loads. |
| e2e/app/hash-nav/+page.tsx | Extends hash-nav example page to cover deep-scroll → route navigation behavior. |
| docs/app/docs/+page.tsx | Uses replace navigation for /docs redirect and provides a visible fallback link. |
| docs/app/docs/[...slug]/+layout.tsx | Switches docs TOC “On this page” links to native hash anchors (no router interception). |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| component.props = props | ||
| component.rawProps = rawProps ?? null | ||
| component.clientRenderer = mode === 'client' ? componentFn : null | ||
| component.projectionSlots = meta.projectionSlots ?? null |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
The documentation could change its URL without updating its body, retain stale table-of-contents entries, and stop updating interactive controls after navigation. The Playground also shipped an empty WebAssembly compiler.
Changes:
Includes #126's startup/scroll commits with their original history.
Verification:
Limitations:
Preview: https://pr-128-eclipsa.xiarenda61.workers.dev
Production is unchanged; this PR is not merged.