Skip to content

docs(js): document Derived on the @moq/signals page - #2753

Merged
kixelated merged 1 commit into
mainfrom
claude/signals-doc-derived
Aug 12, 2026
Merged

docs(js): document Derived on the @moq/signals page#2753
kixelated merged 1 commit into
mainfrom
claude/signals-doc-derived

Conversation

@kixelated

@kixelated kixelated commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the Derived section to doc/lib/js/@moq/signals.md: what it buys over Computed (sources named up front instead of tracked, a correct first read rather than undefined, no close()), what it costs (fn runs on every read, so it must stay cheap and pure), and the notify-on-actual-change behavior that lets a source move without moving the view.
  • Also restores the two supporting mentions: the Overview line and the list of readables getter() accepts.

Why this was split from #2752

An adversarial review flagged the section in #2752: Derived does not exist on main or dev. It lives only in commit 3870cd1a on claude/js-origin-extract (#2705). #2752 therefore shipped without it, describing only what main exports, and the section was parked here.

Merging ahead of the implementation

This lands before #2705, which is the PR that actually adds the class, so the published page documents Derived ahead of the code. Until #2705 merges to dev and dev reaches main, a reader who copies the sample gets a failing import. Deliberate and self-correcting once #2705 propagates; flagged here so the gap is on the record rather than a surprise.

Public API changes

None. Documentation only.

Test plan

  • Extracted all 31 fenced code blocks on the page and type-checked them under the repo's strict base config, with js/signals/src/index.ts taken from 3870cd1a so Derived resolves: zero errors. This confirms the new Derived([this.#peers], (peers) => peers.size > 0) sample infers correctly through the const S extends readonly Getter<unknown>[] generic and that peek() returns boolean.
  • bun remark . --quiet --frail passes.
  • just check on this branch cannot exercise the sample, since Derived is not in the tree here. Worth re-running once feat(js/net)!: route publish and consume through Origins, share one connection per relay #2705 lands.

(Written by Opus 5)

@kixelated
kixelated marked this pull request as ready for review August 12, 2026 03:34
@kixelated
kixelated force-pushed the claude/unruffled-hawking-b52554 branch from dbffa4d to f41f052 Compare August 12, 2026 03:35
@kixelated
kixelated force-pushed the claude/signals-doc-derived branch from 6e5ffe4 to 22e5f42 Compare August 12, 2026 03:36
Base automatically changed from claude/unruffled-hawking-b52554 to main August 12, 2026 03:42
Splits back out of #2752, which had to drop this section because Derived does
not exist on main or dev yet.

Covers what Derived buys over Computed (named sources instead of tracking, a
correct first read, no close()) and what it costs (fn runs per read, so it must
stay cheap and pure), plus the notify-on-actual-change behavior that lets a
source move without moving the view.

Blocked on #2705, which adds the class.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kixelated
kixelated force-pushed the claude/signals-doc-derived branch from 22e5f42 to 62f2a79 Compare August 12, 2026 03:42
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@kixelated, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6f68855f-66ef-4774-bee3-fcd35dc0eb62

📥 Commits

Reviewing files that changed from the base of the PR and between 60ba0e4 and 62f2a79.

📒 Files selected for processing (1)
  • doc/lib/js/@moq/signals.md

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@kixelated
kixelated enabled auto-merge (squash) August 12, 2026 03:45
@kixelated
kixelated merged commit 7523172 into main Aug 12, 2026
1 check passed
@kixelated
kixelated deleted the claude/signals-doc-derived branch August 12, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant